0% found this document useful (0 votes)
20 views

CC6001NA - Advanced Database System Development 2019-20 (1sit) - EXAM QP

Uploaded by

sashwatkoirala10
Copyright
© © All Rights Reserved
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)
20 views

CC6001NA - Advanced Database System Development 2019-20 (1sit) - EXAM QP

Uploaded by

sashwatkoirala10
Copyright
© © All Rights Reserved
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/ 4

1st SIT EXAMINATION QUESTION PAPER: Year Long 2019

Module Code: CC6001NA


Module Title: Advance Database System Development
Module Leader: Rohit Panday (Islington College)

Date: Week 31
Day / Evening: Day
Start Time:
Duration: 2 Hours

Exam Type: Unseen , Closed


Materials supplied: None
Materials permitted: Writing equipment only
<

Warning: Candidates are warned that possession of unauthorised


materials in an examination is a serious assessment
offence.

Instructions to Please Note: Inclusive of this cover page, this


candidates: examination paper consists of 5 pages. The student
must complete four (4) out of five (5) questions.
This examination accounts for 40% of your total module
grades.
You are to return this examination paper, BEFORE you
leave the examination room.

DO NOT TURN PAGE OVER UNTIL INSTRUCTED

© London Metropolitan University

1
Attempt Any Four Questions.

Question 1
The following relational schema specifies a part of a relational database for organization's
information system:

Employee(E#, E_Name, Gender, DOB, Address, Tel, D#)


Department (D#, D_Name, L#)
Location (L#, Street, Zone, Country)
Job(E#, D#, Job_title, Salary)

The following assumptions are made:


● Employee job for any department is specified by the employee number (S#),
department number (M#), job_title (e.g. ‘manager, or ‘Assistant’), and salary.

Answer the following questions:


(a) Identify the primary key, and foreign key(s) if applicable, for each of the relations above.
Indicate clearly which relation contains which foreign key(s).

[5 Marks]

(b) Specify the correct sequence in which the above four relations should be created, and the
order in which the relations should be dropped (removed).

[4 Marks]
(c) Express each of the following queries firstly in SQL and secondly in Relational Algebra:

(i) Find the names of all the department where people from Kathmandu is working.

[5 Marks]

(ii) Find the name of those employee who have assigned for the job ‘Project Manager’
in the ‘Development’ department.

[5 Marks]

(iii) Find the list of country names where ‘Mr. David’ is working as ‘Manager’.

[6 Marks]

Question 2
(a) Discuss data replication, replicated database, and fully replicated database.
[2 Marks + 2 Marks + 2 Marks]

(b) Identify the three types of failure in database system.


[3 Marks]

2
(d) Transaction processing is a key component of a relational database system. Explain the
concept of transaction, and provide a diagram to clearly depict the state transaction for
transaction execution.
[3 Marks + 5 Marks]

Question 3
(a) Discuss the purpose of database concurrency and database recovery.
[4 Marks + 4 Marks]

(b) In the context of transaction processing discuss the concepts of


● Locking
● Commit
● Log File
● Transaction record
[8 Marks]

(c) During transaction processing, the system takes checkpoints at specified intervals. Assume
that sometimes after a particular checkpoint was taken a system failure occurred. Consider the
following transactions in the scenario:

T1 started and was completed before the checkpoint was taken.


T2 started before the checkpoint and was completed before the system failed.
T3 started before the checkpoint but did not complete when the system failed.
T4 started after the checkpoint and was completed before the system failed.
T5 started after the checkpoint but did not complete when the system failed.

(i) Draw a diagram to illustrate the above set of transactions.


[5 Marks]

(ii) For each of the above transactions, indicate which must be redone, which must be
undone and which is unaffected by the failure.
[4 Marks]

Question 4

(a) Discuss the three levels of the ANSI-SPARC model, namely, external level, conceptual
level and internal level. Illustrate your answer with a diagram.
[7 Marks + 5 Marks]

(b) Outline the main functions for the two levels of mapping associated with the ANSI/SPARC
model.
[4 Marks + 4 Marks]

(c) Discuss the main difference between DDL and DML, and give one example SQL statement
for each.
[5 Marks]

3
Question 5
(a) List and briefly outline the three concurrency problems which could occur in a
multi-transaction database environment.
[1 Marks + 3 Marks + 3 Marks + 3 Marks]

(b) The following list represents the sequence of events in an interleaved execution of a set of
transactions T1, T2, ... T24 in a concurrency system based on locking, where A, B, ...H are
data items. Assume that FETCH A acquires an S lock on A, UPDATE A promotes that lock to
an X lock, and all locks are held to the next synch point.

Time transaction operation


t0
t1 T1 FETCH A
t2 T4 FETCH D
t3 T5 FETCH A
t4 T2 FETCH E
t5 T2 UPDATE E
t6 T3 FETCH F
t7 T2 FETCH F
t8 T1 COMMIT
t9 T6 FETCH A
t10 T5 ROLLBACK
t11 T6 FETCH C
t12 T6 UPDATE C
t13 T7 FETCH G
t14 T8 FETCH H
t15 T9 FETCH G
t16 T9 UPDATE G
t17 T8 FETCH E
t18 T7 COMMIT
t19 T9 FETCH H
t20 T3 FETCH G
t21 T10 FETCH E
t22 T9 UPDATE H
t23 T2 UPDATE F
t24

(i) Provide a Wait-for-Graph to illustrate whether there is any deadlock at time t24. You are
advised to provide full and appropriate workings.
[10 Marks]

(ii) Discuss how the system could recover if it were deadlocked at time t25, and justify your
choice of victim transaction(s).
[5 Marks]

You might also like