Sie sind auf Seite 1von 4

Faculty of Business & Information Science

SUPPLEMENTARY 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 3 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 Supplementary 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 3
CB203 Database Systems/
Jan. -Apr. 2015 Supplementary Examination CC116 Database Management System

Question 2
(a) Explain FIVE (5) limitations of the file-based system. (10 marks)

(b) The main aim of the Three-Level ANSI-SPARC Architecture is to separate


each user’s view of the database from the way the database is physically
represented. Explain ALL the level. (15 marks)
[TOTAL: 25 Marks]

Question 3
(a) Draw an Entity-Relationship diagram that captures the following information.

 A Person has attributes pid (key) and name.


 A Skier is a type of Person with attribute aptitude.
 A Snowboarder is a type of Skier.
 A PairOfSkis has attribute sid (key) and model.
 A Snowboard has attribute sid (key) and model.
 A Skier owns zero or more PairOfSkis. The ownership relation has a
purchase price. A PairOfSkis is owned by at most one Skier.
 A Snowboarder owns zero or more Snowboards. The ownership
relation has a purchase price. A Snowboard is owned by at most one
Snowboarder.
 A Person can rent a PairOfSkis or a Snowboard. A person cannot rent
more than one PairOfSkis or one Snowboard at the same time. A
person cannot rent a PairOfSkis and a Snowboard at the same time
either. A piece of equipment can be rented by at most one person at a
time. The rental comes with a start date and an end date.
(20 marks)

(b) Based on your Entity-Relationship diagram produced from (b), write a SQL
CREATE TABLE statement for the owns relation between Skier and
PairOfSkis. Make sure that your statement species the PRIMARY KEY and
any FOREIGN KEYS. Additionally, enforce the constraint that purchase price
be greater than ZERO (0). (5 marks)
[TOTAL: 25 Marks]

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

Question 4
(a) Explicate the THREE (3) phases of database design. (9 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)
(vi.) Entity Integrity (1 mark)
(vii.) Referential Integrity (1 mark)

(c) Explain THREE (3) types of database languages. (9 marks)


[Total: 25 Marks]

END OF QUESTION PAPER

Page 3 of 3

Das könnte Ihnen auch gefallen