CC6001NA - Advanced Database System Development 2019-20 (1sit) - EXAM QP
CC6001NA - Advanced Database System Development 2019-20 (1sit) - EXAM QP
Date: Week 31
Day / Evening: Day
Start Time:
Duration: 2 Hours
1
Attempt Any Four Questions.
Question 1
The following relational schema specifies a part of a relational database for organization's
information system:
[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]
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]
(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:
(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.
(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]