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

Bachelor of Science (Hons) in Computing Final Examination (Open Book) 14 APRIL 2010 It354 - Database Design and Management Duration: 2 Hours

IT354 - DATABASE DESIGN AND MANAGEMENT DURATION: 2 HOURS Students are permitted to bring the following books and course material into the examination. Each question is marked OUT OF 33 marks. One extra mark will be added to each script to make a percentage.

Uploaded by

Sharon David
Copyright
© Attribution Non-Commercial (BY-NC)
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)
84 views7 pages

Bachelor of Science (Hons) in Computing Final Examination (Open Book) 14 APRIL 2010 It354 - Database Design and Management Duration: 2 Hours

IT354 - DATABASE DESIGN AND MANAGEMENT DURATION: 2 HOURS Students are permitted to bring the following books and course material into the examination. Each question is marked OUT OF 33 marks. One extra mark will be added to each script to make a percentage.

Uploaded by

Sharon David
Copyright
© Attribution Non-Commercial (BY-NC)
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

BACHELOR OF SCIENCE (HONS) IN COMPUTING

FINAL EXAMINATION (OPEN BOOK)


14th APRIL 2010
IT354 – DATABASE DESIGN AND MANAGEMENT
DURATION: 2 HOURS
Students are permitted to bring the following books and course material into the
examination:
1. “Fundamentals of Database Systems”, Elmasri and Navathe, Addison Wesley
2. “Database Systems – A Practical Approach to Design, Implementation and
Management”, Thomas Connolly and Carolyn Begg, Addison Wesley
3. Course Contents

NOTE: No handwritten notes or printed materials other than the


above are permitted.

 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)

CHOOSE ANY THREE QUESTIONS

QUESTION 1
Consider the following relational schema of Students’ database.

Student (StudentId, StudentName, Major, Year)


Module (ModuleId ,ModuleName, CreditHours, Department)
Class (ClasssId, ModuleId, InstructorName)
GradeSheet (StudentId, ClassId, ModuleId, Grade)
Prerequisite (ModuleId, PrereqId)

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.

(a) Express the following queries in Relational Algebra expressions

(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

Select StudentID, ModuleId ,ModuleName, ClasssID, InstructorName, Grade


From Student, Module, Class, Grade Sheet
Where Student.StudentID = GradeSheet.StudentID
And GradeSheet.ModuleId =Module.ModuleId
And Module.ModuleId = Class.ModuleId
And Grade = A
And Major ='Graphics'
And (Department ='MultiMedia' Or Department ='Gaming');
[8 marks]

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

Name Member Regional Lib rary


has Address

Return -Date Location


Borrow-Date

Loan Due-Date

Call-No
Year-of-Publication Item

Title
Au tho r D

Boo k CD

edition- no versio n- no

Figure 1.EERD of Library System

[TOTAL FOR QUESTION 1: 33 MARKS]

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

InvestmentFirm ( CustomerId, CustomerName DepositNo, Amount, DepositAmount,


Interest-Rate, Period –of-Deposit, Maturity-Value, AgentId, AgentName, Years-of-
service, Salary, Category, Rate-of-commission, BranchNo, BranchAddress,
BranchPhone)

(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]

(b) An institute in Singapore offers a number of university degree programs in


different major and elective disciplines. The corresponding BCNF relation with
sample records is as given below.

University Major Elective


AAA Computing Information Systems
AAA Technology Mgt Software Engineering
BBB Computing Information Systems
BBB Computing Gaming
AAA Computing Software Engineering
AAA Technology Mgt Information Systems

(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]

[TOTAL FOR QUESTION 2: 33 MARKS]

Page 3 of 6
T110 UOP_IT354 Exam (April 2010)

QUESTION 3

A schedule of two transactions is as follow.

Time Transaction A Transaction B


1 Read X
2 X = X+10
3 Write X
4 Read X
5 X=X+20
6 Write X
7 Read y
8 Y=Y+40
9 Write Y
10 Read Y
11 Y= Y-20
12 Write Y
13 Commit
14 Commit

(a) Find the result of the schedule for the following conditions, The initial values are
X = 40 and Y = 50

(i) Transaction A executes before Transaction B


(ii) Transaction B executes before Transaction A
(iii) Transact A and B are executed with interleaved operations as
given in the above schedule
[6 marks]

(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)

Transaction sources and frequencies are:


T1 sources S1 and S2 30%
T2 sources S1 and S3 30%
T3 sources S2 and S3 40%

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]

[TOTAL FOR QUESTION 3: 33 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

Select StudentId, StudentName, Project-Topic, Role


From Student , Project
Where Student.StudentId = Project.StudentId
And Module = IT354

(i) Identify any two query strategies for the above query.
[16 marks]

(ii) Show that one of the query strategies is an optimum strategy.


[3 marks]

(c) Explain how the fragments Project-1 can be further fragmented based on the
Module attribute
[6 mark]

[TOTAL FOR QUESTION 4: 33 MARKS]

***** End of Paper *****

Page 6 of 6

You might also like