DBS Final Exam - S2020

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10
At a glance
Powered by AI
The document discusses a final exam for a database systems course. It covers topics such as data models, ER modeling, relational modeling, SQL, joins, and normalization.

The main objects are: Course, Student, Teaching Assistant, PhD Student, and Lecturer. The relationships described are: A course is taught by a lecturer and TA, students follow courses, a PhD student is associated with their supervisor lecturer.

The document discusses the network, relational and ER data models.

Final-Term Exam S2020

Database Systems-IT2421

Resource Person: Aqsa Kiran

Lecturer, Informatics and Systems

School of Systems and Technology

02 July, 2020

Maximum Time: 4 Hours (ST: 09:00 , ET: 01:00 )


Maximum Marks: 25
Total Questions: 05 (All questions are mandatory)
Instructions To Be Noticed!
1. This exam is conducted online.
2. Count the total 9 pages of question paper including this cover page.
3. Only write answers within the given space provided. In case of any
diagram/tabular form solution, you should write it on paper and add
screenshot/picture of that within the given answer space. OR You may send
that hand written solution separately with word file with accurate question
number marked on it.
4. Make a zip folder with your name, add your final exam soft solution file and
other images within this zipped folder and upload it in the given Google drive
folder.
5. No extra time will be given; folder sharing/access will be removed immediately
after the maximum time.
6. Write short and descriptive answer with proper syntax where required.
7. In case of matching solution of two students/plagiarised content, paper will be
straight cancelled.
Name:
Student ID:

GOOD LUCK 

Task 1 – Introduction 5M

(a) Why we use Data Model in database systems? Give one example application
where/when we use Network and Relational data models? 2.5M

1
(b) Why we use constraints in database? What types of constraints used in RDBMS?
Provide any basic example with your own understanding. 2.5M

Task 2 – E/R model and the relational model 3M

2
You are asked to create a database for the university administration. They
describe that they want the following objects in their system:
Course having title, number, and quarter
Student having name and year of study
Teaching Assistant having name and contract
PhD Student having name and thesis topic
Lecturer having name and position

They also describe the relationships between these objects: Each course is
taught by a lecturer and a teaching assistant. Students follow a number of
courses. Each PhD student is associated with a lecturer who is his supervisor.
Keep in mind that both PhD students and teaching assistants are students.

(a) Create an E/R diagram capturing the objects and relationships described above.
Describe all constraints. Please use the notation for E/R diagrams introduced in
the course book.

(b) Transfer the E/R diagram from (a) to the relational model. Describe the process
you have made.

3
Task 3 – Relational model, SQL for Data-Definition, DML, Queries 4M

The following E/R diagram describes the database of a car dealer:

(a) Translate above ERD into relational model.

4
(b) The price of a car has to be a positive integer. Give a CREATE
TABLE statement for creating the table Car that respects this.

(c) Write a SQL statement that lists the names of all sales-men together
with the number of their sales.

(d) Write one SQL statement that increases the price of all Fords by
15%.

(e) What is a wild-card query in SQL? Where we use it? Give one example
with your own understanding. 3M

5
Task-4 JOINS using SQL, Relational Algebra 3M

Write the possible Relational Algebra queries as well as SQL queries for the following
statements!
(a) Who teaches cs1200 and ma3000?

(b) What are the names of students who are taking a subject not taught by
Roger?

6
What is the resultant table of following snippet? 2M

Task 5 – Normalization 5M

A engineering consultancy firm supplies temporary specialized staff


to bigger companies in the country to work on their project for certain

7
amount of time. The table below lists the time spent by each of the
company’s employees at other companies to carry out projects. The
National Insurance Number (NIN) is unique for every member of staff.

(a) Explain in which normal form this table is


(b) Find the Fully Functional Dependencies on the PK and the Partial Dependencies
on the PK.
(c) Normalise the table to 2NF
(d) Find the transitive dependencies on the 2NF tables
(e) Normalise the tables to 3NF –

8
9
10

You might also like