Professional Documents
Culture Documents
May 2018
INSTRUCTIONS TO CANDIDATES
Page 1 of 4
Database Systems I – CSE 1005 (1)
Question 1 Continued
1. Map the ER diagram into a relational database schema. Be certain to specify
all primary keys (solid underline) and foreign keys (dotted underline).
2. Using your database schema in part (1) as example, explain what Referential
integrity means.
[8 + 2 marks]
Question 2 [Total 25 marks]
Consider the following table CineMovieSales which shows sample data from the sale
of movie tickets across several cinemas in the UK. Each cinema has a manager who
records the sales fgure for each flm projected at his/her cinema. A manager may
manage more than one cinema. Note: the table gives a complete representation of the
scenario.
Table CineMovieSales
Page 2 of 4
Database Systems I – CSE 1005 (1)
Question 2 Continued
(e) Identify four full functional dependencies represented by the table CineMovie-
Sales.
[4 marks]
(f) Normalize the table CineMovieSales to 3NF. Describe all the steps. Identify the
primary and foreign keys in all your relations.
[6 marks]
1. List the details of all products with a stock less than 50, and supplied by
supplierID ”S12”.
[3 marks]
2. For each supplier, give the number of products supplied.
[2 marks]
3. List the product ID and name of all products supplied by “Galaxy”.
[3 marks]
4. List the details of all products except “electric kettle”.
[3 marks]
(b) Write the following queries in SQL:
Page 3 of 4
Database Systems I – CSE 1005 (1)
[2 marks]
(d) Briefy describe four reasons why transactions fail.
[4 x 2 marks]
(e) Explain the purpose of a system log in transaction recovery.
[3 marks]
Page 4 of 4