0% found this document useful (0 votes)
77 views6 pages

CC6001NA - Advanced Database Systems Development 2022-23 (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)
77 views6 pages

CC6001NA - Advanced Database Systems Development 2022-23 (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/ 6

1st SIT EXAMINATION QUESTION PAPER: Year Long 2022/23

Module Code: CC6001NI

Module Title: Advanced Database System Development

Module Leader: Mr. Lekhnath Katuwal (Islington College)

Date:
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


Attempt Any Four Questions.

Question 1
1. a) Write Short Note on following topics
[2x5 = 10 Marks]
i) Cardinality
ii) Checkpoint
iii) Natural Join
iv) Group By Clause

1. b) Write the difference between Domain Integrity, Entity Integrity, and


Referential Integrity.
[6 Marks]

1. c) The following relational schema specifies a part of a relational database for


an employee information system:

Employee (empid, name, contact, salary, supervisor_id*, department_id*)


Department (department_id, name, location)

Write both SQL and Relational Algebra for the following

i) Find the name and salary of employees working on ‘Finance’ Department and
employee name start with ‘N’.
[2+2 = 4 Makrs]

ii) Find the name of employees with the name of their supervisor.
[2.5 + 2.5 = 5 Marks]

1
Question 2

2. a) In the course of transaction processing, the system takes checkpoints at specified


intervals. Assume that sometime after a particular checkpoint was taken a system
failure occurred. Consider the following transactions in the scenario:

T1 started before the checkpoint and completed before the system failed.
T2 started after the checkpoint and completed before the system failed.
T3 started after the checkpoint but did not complete when the system failed.
T4 started and completed before the checkpoint was taken.
T5 started before 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.
[5 Marks]

2. b) Define Database Recovery. What are the techniques for Recovery? Explain each
technique.
[2 Marks + 3 Marks + 4 Marks]

2. c) Explain the three level ANSI SPARC Database Architecture with diagram.
[6 Marks]

2
Question 3
3. a) Explain about Shared Lock and Exclusive Lock. Complete the following
transaction with suitable application of Locks
[6 Marks + 4 Marks]

3. 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

3
(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 t24, and justify
your choice of victim transaction(s).
[5 Marks]

Question 4
4.a) There are several options available for distributing data in a distributed
database system. Describe two options for data fragmentation (horizontal
fragmentation and vertical fragmentation). For each option, give an example to
illustrate your answer.
[9 Marks]

4.b) Define Normalization and Why Normalization is necessary?


[4 Marks]

4.c) Normalize the given table up to 3NF indicating all the dependency and Keys
(primary and foreign) clearly.
Note: State any assumption that you have made during normalization.
[2 Marks + 3 Marks + 4 Marks + 3 Marks]

4
Question 5
5.a) An educational institution has several departments. There are various database
objects in the system. You currently hold DBA privilege to the database.
i) Create two users as ‘DataQL’ and ‘DataDML’
[4 Marks]

ii) Grant all necessary privileges for a user ‘DataQL’ to only SELECT the MARKS table.
[3 Marks]

iii) Grant all necessary privileges for user ‘DataDML’ to ISNERT on STUDENT table.
[3 Marks]

iv) Grant all necessary privileges for user ‘DataDML’ to UPDATE, DELETE and SELECT on
MODULE table.
[4 Makrs]
v) Write the command to take the privilege back from all users.
[4 marks]

5.b) Create an Access Matrix in tabular form from the above scenario before taking back
all the privilege from the users.
[6 Marks]

You might also like