You are on page 1of 4

Virtual University of Pakistan SEMESTER Fall 2023

CS409 – Introduction to Database Administration


Assignment No.1 (Graded)

Maximum Marks: 20
Instructions
Due Date: 22 November 2023

The purpose of this assignment is to give you hands-on practice. It is expected that students
will solve the assignment themselves. The following rules will apply during the evaluation
of the assignment.

● Cheating from any source will result in zero marks in


the assignment.
● The submitted assignment does NOT open or file is corrupted.

● No assignment after the due date will be accepted.

● Student can submit HTML, Images & Plain text only in this inline Mode. You
may also insert image file/table.
● DOC/pdf File uploading option will not be available) in inline assignment
submission.
Uploading Assignment Instruction
Follow the given instructions to submit inline assignments.

You have to write SQL commands in assignment inline interface.


Virtual University of Pakistan SEMESTER Fall 2023
Objective & Learning Outcome

Objectives:
The objectives of this assignment are to:
 Map ERD (Entity relationship diagram) to relational data model.
 Apply SQL commands to create tables.
 Apply constraints e.g., Primary Key, foreign key, check and NULL on attributes.

Learning Outcomes:
After completing this assignment, students will be able to:
 Apply mapping rules to transform ERD into relational model.

 Execute SQL commands in any DBMS.

Question (20 Marks )

Scenario:

Suppose you are required to model and implement an e-Learning system for an organization.
This system will enable teachers to offer courses, with each course consisting of a list of topics.
A catalogue of available courses will be accessible to students, allowing them to enroll in these
courses. Within each topic, students will have access to reading materials and video tutorials.
Furthermore, each topic will include a quiz, and students can assess their understanding by
taking these online quizzes after studying a particular topic.

Entity Relationships Diagram (ERD) of the above scenario is given below:


Virtual University of Pakistan SEMESTER Fall 2023

Consider the above ERD. You are required to perform the following SQL operations on the
above ERD.

Write SQL queries for the following operations:


 Create tables by transforming above ERD into tables.
 For each table, you will have to define all attributes/columns given in ERD with
appropriate data types.
 You are required to define Primary key of each table.
 You are also required to define foreign key if any.
 Apply the following additional constraints.
i. Student age should not be less than 18 and greater than 25.
ii. Course name should not contain NULL values.

Topics Covered: The assignment covers the topics from 1 to 45.


Virtual University of Pakistan SEMESTER Fall 2023

Note: Plagiarism will be checked for each question. Please answer the
questions in your own words and marks will be awarded based on your
answer and plagiarism report.

For any query about the assignment, contact at email CS409@vu.edu.pk

You might also like