You are on page 1of 6

Faculty of Business & Information Science

FINAL EXAMINATION

Student ID (in Figures) :

Student ID (in Words) :

Course Code & Name : CC116 Database Management System


CB203 Database Systems
Semester : January - April 2015
Instructor/Examiner/Lecturer : Ms. Liew Pei Ling
Duration : 3 hours

INSTRUCTIONS TO CANDIDATES:
Answer ALL Questions (Total 100 marks)

This question paper consists of 5 pages, excluding the cover page. Candidates
are required to answer all questions in the answer booklet provided. Candidates
are not allowed to bring into the Examination Hall textbooks, lecture notes, files
or any unauthorized materials except writing equipment. Electronic dictionaries
are strictly prohibited.

This question paper must be submitted along with all used and/or unused rough
papers and/or graph papers (if any). Candidates are NOT allowed to take any
examination materials out of the examination hall.

Warning:
The University Examination Board of UCSI University regards cheating as a most
serious offence and will not hesitate to mete out the appropriate punitive actions
according to the severity of the offence committed, and in accordance with the clauses
stipulated in the Students’ Handbook, up to and including expulsion from UCSI
University.
CB203 Database Systems/
Jan. -Apr. 2015 Final Examination CC116 Database Management System

Answer ALL questions

Question 1
(a) Define the FIVE (5) basic relational algebra operations with diagrams.
(5 marks)

(b) Refer the following schema:

Suppliers(sid: integer, sname: string, address: string)


Parts(pid: integer, pname: string, color: string)
Catalog(sid: integer, pid: integer, cost: real)

The key fields are underlined, and the domain of each field is listed after the field
name. Therefore sid is the key for Suppliers, pid is the key for Parts, and sid and
pid together form the key for Catalog. The Catalog relation lists the prices
charged for parts by Suppliers. Write the following queries in Relational
Algebra:

(i.) List all the supplier’s name (2 marks)


(ii.) List all the parts which is red colour (2 marks)
(iii.) Find the names of suppliers who supply red part (4 marks)
(iv.) Find the sids of suppliers who supply some red or green part (4 marks)
(v.) State the outcome of this query: (4 marks)

sname( sid(( colour=’red’Parts) ( cost<100Catalog)) Suppliers)

(vi.) State the outcome of this query: (4 marks)


( sname(( colour=’red’Parts) ( cost<100Catalog) Suppliers))
sname(( colour=’green’Parts) ( cost<100Catalog) Suppliers))

[TOTAL: 25 Marks]

Page 1 of 5
CB203 Database Systems/
Jan. -Apr. 2015 Final Examination CC116 Database Management System

Question 2
(a) Discuss the difference between logical data independence and physical data
independence. (2 marks)

(b) Briefly explain the integrity constraints listed below:


(i.) Not Null (1 mark)
(ii.) Unique (1 mark)
(iii.) Primary Key (1 mark)
(iv.) Check (1 mark)
(v.) Foreign Key (1 mark)

(c) Explain the following:


(i.) Transaction Processing Monitors (TPM) (2 marks)
(ii.) FIVE (5) advantages of Transaction Processing Monitors (10 marks)

(d) Explicate the following:


(i.) View (3 marks)
(ii.) THREE (3) purposes of using views. (3 marks)
[TOTAL: 25 Marks]

Page 2 of 5
CB203 Database Systems/
Jan. -Apr. 2015 Final Examination CC116 Database Management System

Question 3
(a) Briefly explain the following:
(i.) Relation (2 marks)
(ii.) Attribute (2 marks)
(iii.) Domain (2 marks)
(iv.) Tuple (2 marks)
(v.) Cardinality (2 marks)

(b) Draw an Entity-Relationship diagram that captures the following information.

UPS prides itself on having up-to-date information on the processing and current
location of each shipped item. To do this, UPS relies on a company-wide
information system.

Shipped items are the heart of the UPS product tracking information system.
Shipped items can be characterized by item number (unique), weight, dimensions,
insurance amount, destination, and final delivery date.

Shipped items are received into the UPS system at a single retail center. Retail
centers are characterized by their type, uniqueID, and address.

Shipped items make their way to their destination via one or more standard UPS
transportation events (i.e., flights, truck deliveries). These transportation events
are characterized by a unique scheduleNumber, a type (e.g, flight, truck), and a
deliveryRoute.

Your ER diagram should indicate key identifiers and relationships. (15 marks)

[TOTAL: 25 Marks]

Page 3 of 5
CB203 Database Systems/
Jan. -Apr. 2015 Final Examination CC116 Database Management System

Question 4
(a) SQL is an example of a transform-oriented language.
(i.) List the TWO (2) main components of SQL. (1 mark)
(ii.) Explain the TWO (2) components listed in your answer (i). (4 marks)

(b) Refer to the following information; create TWO (2) tables that meet the given
conditions. (6 marks)

Table Name: department

Attribute Data Type Primary Foreign Constraint


DName VARCHAR(15) NOT NULL
DepNo INT  NOT NULL
MgrSSN INT NOT NULL
MgrName VARCHAR(25)

Table Name: dept_locations

Attribute Data Type Primary Foreign Constraint


DepNo INT DepNo NOT NULL
DLocation VARCHAR(15)  NOT NULL

(c) Write the SQL command to populate the TWO (2) tables created from (a) with
the following data. (4 marks)

Table Name: department


DName DepNo MgrSSN MgrName
Manufacture 1 888665555 Dick
Administration 2 543216789 Alice
Headquarter 3 554433221 Alan
Human 4 778790101 Grace
Resource

Table Name: dept_locations


DepNo DLocation
1 Houston
1 Chicago
2 New York
3 San Francisco
4 San Francisco

(d) Write a SQL command to show the department name and department number
which is managed by Alan. (2 marks)

(e) Write a SQL command to show the department name and department number
which is located at San Francisco. (2 marks)

Page 4 of 5
CB203 Database Systems/
Jan. -Apr. 2015 Final Examination CC116 Database Management System

(f) Write a SQL command to join the department table with department location table
where the department number is the same. (2 marks)

(g) Write a SQL command to show the department name and department number sort
by department name in ascending order. (2 marks)

(h) Write a SQL command to delete the Manufacture department from the
Department table. (2 marks)
[Total: 25 Marks]

END OF QUESTION PAPER

Page 5 of 5

You might also like