0% found this document useful (0 votes)
153 views7 pages

DBT1120C Database Design Concepts

(1) The document provides information about an examination for a Database Design Concepts module, including four questions about relational database concepts and SQL queries. (2) Question 1 covers the relational model, database terminology and the roles of a database administrator. Question 2 involves developing an entity-relationship diagram and relational schema for a hotel taxi reservation system. (3) Question 3 addresses database normalization, defining first, second and third normal forms. Question 4 consists of writing SQL queries to manipulate tables, including creating, inserting, updating, joining and aggregating data. Sample tables in an appendix provide data to use for the queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views7 pages

DBT1120C Database Design Concepts

(1) The document provides information about an examination for a Database Design Concepts module, including four questions about relational database concepts and SQL queries. (2) Question 1 covers the relational model, database terminology and the roles of a database administrator. Question 2 involves developing an entity-relationship diagram and relational schema for a hotel taxi reservation system. (3) Question 3 addresses database normalization, defining first, second and third normal forms. Question 4 consists of writing SQL queries to manipulate tables, including creating, inserting, updating, joining and aggregating data. Sample tables in an appendix provide data to use for the queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

BSc (Hons) Software Engineering

BSc (Hons) Web Technologies


Cohorts: BSE/21B/FT1, BSE/21B/FT 2,

BSE/21B/FT 3 & BWT/21B/FT

Examinations for 2021-2022 / Semester 2

MODULE: DATABASE DESIGN CONCEPTS

MODULE CODE: DBT 1120C

Duration: 3 Hours

Instructions to Candidates:

1. Answer ALL questions.


2. Questions may be answered in any order but your answers must show the
question number clearly.
3. Always start a new question on a fresh page.
4. Questions DO NOT carry equal marks.
5. Total marks 100.

This Examination Paper contains 4 questions and 7 pages.

Page 1 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2
ANSWER All QUESTIONS

QUESTION 1: (25 MARKS)

(a) Describe briefly the three parts of the Relational Model.


[9 marks]
(b) Define the following terms
i. Tuple (A row or a record in a relation or table)
ii. Degree
iii. Cardinality
iv. Primary Key

Support your answer with examples.


[4 marks]
(c) Differentiate between Database System and Database Management
System. Support your answer with an appropriate example of each.
[4 marks]
(d) Describe briefly any four essential roles played by a DBA (Database
Administrator)?

[8 Marks]

QUESTION 2: (25 MARKS)

The UTM Coco Beach Hotel wishes to develop an MIS to keep track of its
customer Taxi Service.
You have been asked to develop a high level data model based on the following
short description of the system.
When a tourist arrives at the UTM Coco Beach Hotel, he/she can reserves one
or more taxis within the hotel itself to visit attractive places and shopping mall
around the island. The reservation is done by one of the hotel clerk. Each taxi
is assigned a hotel driver on a roster basis. The attractions are located in
different districts of the island.
Your data model should cater for all these requirements.

Page 2 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2
(a) Produce a Conceptual ERD (Entity Relationship Diagram) and a Logical
ERD for the above scenario. For each entity, list the relevant attributes
and the respective primary keys (PKs) and foreign keys (FKs) where
appropriate.
Include any new attribute(s) if required for any associative entity.
[6 + 7 marks]
(b) Translate your ERD into a relational database schema.
[12 marks]

QUESTION 3: (20 MARKS)

(a) Explain the need for Normalization in Database Design and define the
following terms with appropriate example:
(i) First Normal Form
(ii) Second Normal Form
(iii) Third Normal Form.

[8 marks]

(b) You have been given the following un-normalised table where some
customers bought vehicle(s). Based on the data provided below carry
out the tasks mentioned below (i.e. parts (i) to (iv)) normalize the table
up to the third Normal Form):

Page 3 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2
Customer_Town_Vehicle table (UNF)

Where Cust_Id is Customer Id


CustSurname is Customer Surname
CustForename is Customer Forename
RegNo is the vehicle registration Number

(i) Explain why the table is un-normalised.


[2 marks]

(ii) Convert the un-normalised table to the 1st Normal Form identifying an
appropriate Primary key for the
1NF table. .
[3 marks]
(iii) Decompose the 1st Normal Form into 2nd Normal Form
[4 marks]
(iv) Decompose the 2nd Normal Form into 3rd Normal Form
[3 marks]

Page 4 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2
QUESTION 4: (30 MARKS)

Using the tables provided in the Appendix A, express the following queries in
SQL USING ORACLE 10g/11g/12c SYNTAX.

(a) Write the SQL code that will create the table structure for the
Emp table (without specifying any primary or foreign keys).
[3 marks]

(b) Add a PRIMARY KEY constraint to make the EmpId the primary key of the
Employee table
[2 marks]
(c) Assume that you had already created the table Emp with the following
attributes:
Empid EmpName ContactNo EmailId EmpHeadId Salary IsPermanent

Add a new column in the Emp table with the following data definition (Column
Name DeptId , Varchar data type, field size of 5 and contains a constraint that
data cannot be NULL )
Now add the FOREIGN KEY DeptId in the Employee table
[2 + 2 marks]
(d) Having created the table Emp in question (a) above, write the SQL code that
will enter the data rows for first and third records into the Emp table.
[4 marks]
(e) The address of the client ‘PQR’ in the Client table has been recently changed to
‘Vacoas’. Write SQL code to update the address of that client. [3 marks]

(f) Write SQL code to display the Employee’s name, the salary and the
Department name whose employee(s) obtains the highest salary.

[5 marks]
(g) Count and display the number of employees whose salary is between 2100 and
5000. [3 marks]
(h) List the name of all employees who do not work in the Department ‘E-102’.
[3 marks]
(i) List the names of all employees who have an EmailId. [3 marks]

Page 5 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2
APPENDIX A
The tables provided here are to be used for Question 4
The tables below show sample data about some employees in a department working
on different project for different clients.

Page 6 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2
Example data are provided in these tables for your convenience but note that they are
only sample data. Your queries must work for all potential data residing in the database,
not just those illustrated here.

***END OF EXAM PAPER***

Page 7 of 7
DATABASE DESIGN CONCEPTS (DBT1120C) SITE/August 2021/2022 Semester 2

You might also like