Bachelor of Science (Hons) in Computing Final Examination (Open Book) 14 APRIL 2010 It354 - Database Design and Management Duration: 2 Hours
Bachelor of Science (Hons) in Computing Final Examination (Open Book) 14 APRIL 2010 It354 - Database Design and Management Duration: 2 Hours
INSTRUCTIONS
1. Choose any 3 OUT OF 4 questions.
2. Do not answer more than 3 questions in total.
3. Each question is marked out of 33 marks.
4. One extra mark will be added to each script to make a percentage.
5. Start every question on a new page.
6. Answers will not be marked if they are difficult to read.
7. Enter the question numbers (in the order you have attempted them) in the boxes
provided in the answer script.
8. Write your INDEX NUMBER and MODULE NUMBER on the cover page of
each answer booklet(s) that you use.
T110 UOP_IT354 Exam (April 2010)
QUESTION 1
Consider the following relational schema of Students’ database.
Primary key attributes are given as bold and underlined. The domains of the attributes are
as follows:
Year – 1 to 4
Grade – A, B, C, and D with A as the highest grade.
(i) List the student who are in the year 4 and in Major Computer Science or
Information System.
[5 marks]
(ii) For each module retrieve the module name and the number of prerequisites.
[5 marks]
(iii) List the Modules and Classes in which no student achieved a grade lower than
‘B’.
[6 marks]
(iv) Write an optimum relational algebra expression for the following SQL query
Page 1 of 6
T110 UOP_IT354 Exam (April 2010)
(b) The EERD of a regional libraries is shown in figure 1. Each regional library is
identified by its name, location and address. The library has books and CDs which
are taken by members of the library on loan. Member's record include a unique
member number, name and address. Book and CD are given a unique call
number, title, author(s) name and year of publication. Book has its specific
attribute edition number and CD has its version number. For each loan the borrow
date, due date and return date are recorded.
Translate the EERD into a set of relations.
[9 marks]
Address
Member-No Library-Name
N 1
Loan Due-Date
Call-No
Year-of-Publication Item
Title
Au tho r D
Boo k CD
edition- no versio n- no
QUESTION 2
A financial company collects deposits from customers. The Company's database includes
data about the company's various branches, agents employed by the company, deposits
and customers.
The company has a number of branches. A branch is identified by its number and has an
address and phone number. For each agent, the database must record his/her name, years
with the company and the branch where he/she works.
Each agent is paid a salary and commission. The salary and the rate of commission
depend on the agent's type (Fresh, Experienced, Senior).
Page 2 of 6
T110 UOP_IT354 Exam (April 2010)
Each customer is allotted to an agent who helps the customer. A customer may have
many deposits. The value of the deposit, interest rate, period of deposit and its maturity
value must also be recorded. The customer data include customer number, and name.
The un-normalized relation is as given below
(i) Identify any two candidate keys and choose one as the Primary key of the
un-normalized relation
[ 4 marks]
(ii) Identify all the functional dependencies for the above scenario
[12 marks]
(iii) Hence give the BCNF relations (do not go through 1NF, 2Nf and 3NF)
[ 6 marks]
(i) Identify the multi valued functional dependencies available in the relation and
hence provide the 4NF relations.
[8 marks]
(ii) Also check whether the 4NF relations are in 5NF. If they are not in 5NF, provide the 5NF
relations.
[3 marks]
Page 3 of 6
T110 UOP_IT354 Exam (April 2010)
QUESTION 3
(a) Find the result of the schedule for the following conditions, The initial values are
X = 40 and Y = 50
(b) Identify the conflict operations and draw the precedence graph and hence identify
whether the above schedule is serializable or not.
[7 marks]
(c) Provide a strict 2Phase Lock management for the above schedule.
[8 marks]
(d) A small database with three relations R1, R2 and R3 is distributed over three sites
S1 , S2 and S3. Each of the three relations R1, R2 and R3 has to be allocated to
one of the three sites S1 , S2 and S3 using the non-redundant best fit method.
There are three transactions T1, T2 and T3 run on this database. The originating
sources for each transaction and the percentage frequency with which the
transactions run are shown below.
Page 4 of 6
T110 UOP_IT354 Exam (April 2010)
Note that transactions are equally likely to originate from any of their sources.
Usage made of each relation by each transaction is given by
T1 2 reads to R1 and 3 Writes to R1
2 reads to R2
T2 3 reads to R1
2 reads to R3 and 1 write to R3
T3 2 reads to R2 and one write to R2
2 reads to R3
Allocate three relations R1, R2 and R3 to three sites S1, S2 and S3 using the non
redundant best fit method.
[12 marks]
QUESTION 4
The horizontal fragments of the relation Student and Project are as given below.
Student-Basic
StudentId Sname Module
S300 Lim IT354
S400 Wong IT354
S700 Abdulla IS352
Student-Elective
StudentId Sname Module
S100 Raja IT359
S200 John IT353
S500 Francis IT353
S600 Pal IT359
S800 Tan IT353
Page 5 of 6
T110 UOP_IT354 Exam (April 2010)
Project-1
StudentId Project-Topic Role
S300 Graphics Leader
S800 Image Processing Leader
S400 ASP.NET Programmer
S700 Java Programmer
Project-2
ENO Project-Topic Role
S100 PHP Member
S200 PHP Report Writing
S300 ASP.NET Report Writing
S400 ASP.NET Member
S500 Image Processing Member
S600 Graphics Member
(a) Identify the fragmentation criteria based on which the relations Student and
Project has been fragmented
[8 marks]
(b) The fragments Student-Basic and Project-1 are allocated to site 1 and the
fragments Student-Elective and Project-2 are allocated to site 2
The following SQL query is placed in site 3 and the result is needed in site 3
(i) Identify any two query strategies for the above query.
[16 marks]
(c) Explain how the fragments Project-1 can be further fragmented based on the
Module attribute
[6 mark]
Page 6 of 6