11.CS3492 Dbms Quest Bank
11.CS3492 Dbms Quest Bank
PART-C
Explain ER model by taking Hospital management/Banking System/University Database as
1 BTL2 Understanding
case study. (15)
Design an E-R diagram for keeping track of the exploits of your favourite sports team. You BTL3 Applying
should store the matches played, the scores in each match, the players in each match and
2
individual player statistics for each match. Summary statistics should be modelled as derived
attributes. (15)
Give an example of a relation that is in 3NF but not in BCNF. How will you convert that
3 BTL2 Understanding
relation into BCNF? (15)
A car rental company maintains a database for all vehicles in its current fleet. For all BTL3 Applying
vehicles, it includes the vehicle identification number, license number, manufacturer, model,
date of purchase, and color. Special data are included for certain types of vehicles.
• Trucks: cargo capacity.
4
• Sports cars: horsepower, renter age requirement.
• Vans: number of passengers.
• Off-road vehicles: ground clearance, drivetrain (four- or two-wheel drive).
Assess and Construct an ER model for the car rental company database. (15)
UNIT III - TRANSACTIONS
Transaction Concepts – ACID Properties – Schedules – Serializability – Transaction support in SQL – Need for
Concurrency – Concurrency control –Two Phase Locking- Timestamp – Multiversion – Validation and Snapshot
isolation– Multiple Granularity locking – Deadlock Handling – Recovery Concepts – Recovery based on deferred
and immediate update – Shadow paging – ARIES Algorithm
PART-A
Q. Question Level Competence
No.
1 Define transaction. BTL1 Remembering
2 Give the reasons for allowing concurrency. BTL2 Understanding
3 Analyze on average response time. BTL3 Applying
4 Illustrate the situation to roll back a transaction. BTL3 Applying
5 Discuss the term aborted state. BTL2 Understanding
6 Summarizethe properties of transaction. BTL2 Understanding
7 What are the different modes of lock? BTL1 Remembering
8 Assess about Serializability. How it is tested? BTL5 Evaluating
9 Illustrate the time stamps associated with each data item. BTL3 Applying
10 Demonstrate recoverable schedule with suitable example. BTL3 Applying
11 Recommend the need of shadow paging. BTL3 Applying
12 Generalize the type of locking needed for insert and delete operations. BTL6 Creating
13 Define deadlock. BTL1 Remembering
14 Design your own example to illustrate cascaded rollback. BTL6 Creating
15 List the phases of two phase locking protocol BTL1 Remembering
16 Examine the use of lock compatibility matrix. BTL3 Applying
17 List the types of serializability. BTL1 Remembering
18 Give the states of transaction. BTL2 Understanding
19 Differentiate strict two phase locking protocol and rigorous two phase locking protocol. BTL4 Analyzing
20 Define upgrade and downgrade. BTL1 Remembering
PART-B
(i) Describe the ACID Properties of a transaction. (7) BTL1 Remembering
1 (ii) What benefit does rigorous two phase locking provide? Show how does it compare with
other forms of two phase locking? (6) BTL3 Applying
(i) What is concurrency control? Explain the two phase locking protocol with an example. (7)
2 BTL2 Understanding
(ii) Discuss about conflict serializability and view serializability. (6)
Write a short note on:
3 i) Transaction concept. (6) BTL1 Remembering
ii) Deadlock. (7)
(i) What is deadlock? How does it occur? (6)
4 (ii) How transactions are to be written to Avoid deadlock and guarantee correct execution. BTL3 Applying
Illustrate with suitable example. (7)
(i) What is concurrency control? How is it implemented in DBMS? (6) BTL3 Applying
5
(ii) Generalize with a suitable example. (7)
(i) What is two-phase locking? Explain it with suitable example. (6) BTL3 Applying
6
(ii) Assess on how it guarantees serializability. Explain with suitable example. (7)
What is Concurrency? Explain it in terms of locking mechanism and two phase Commit
7
Protocol.(13) BTL1 Remembering
8 Explain Two phase Commit and Three-Phase Commit Protocols. (13) BTL1 Remembering
i) Illustrate two phase locking protocol with an example. (6) BTL1 Remembering
9
ii) Outline deadlock handling mechanisms.(7) BTL3 Applying
(i) Differentiate strict two phase locking protocol and rigorous two phase locking protocol.(6)
10
(ii) How the time stamps are implemented? Explain. (7) BTL2 Understanding
(i) When is a transaction said to be deadlocked? (6)
11 BTL3 Applying
(ii) Explain the deadlock prevention methods with an example? (7)
(i) Describe about the deadlock prevention schemes. (7) BTL2 Understanding
12
(ii)With a neat Sketch explain the states of a transaction. (6)
(i) Describe about deadlock detection. (7)
13 BTL1 Remembering
(ii) Define the term Recoverable schedule and Cascadeless schedules. (6)
Discuss the violations caused by each of the following: dirty read, non-repeatable read and
14 BTL2 Understanding
phantoms with suitable example. (13)
PART-C
Consider the following extension to the tree-locking protocol, which allows both shared and
1 exclusive locks: BTL1 Remembering
• A transaction can be either a read-only transaction, in which case it can request only shared
locks, or an update transaction, in which case it can request only exclusive locks.
• Each transaction must follow the rules of the tree protocol. Read-only transactions may
lock any data item first, whereas update transactions must lock the root first. Assess on that
the protocol ensures serializability and deadlock freedom. (15)
Consider the following two transactions:
BTL3 Applying
T1: read(A);
read(B);
if A = 0then B := B + 1;
write(B).
2 T2: read(B);
read(A);
if B = 0then A := A + 1;
write(A).
Add lock and unlock instructions to transactions T1 and T2, so that they observe the two-
phase locking protocol. Can the execution of these transactions result in a deadlock?
Generalize your view. (15)
(i) Narrate the actions that are considered for deadlock detection and the recovery from
BTL3 Applying
deadlock. (7)
3
(ii) Assess and Discuss the properties of a transaction that ensure integrity of data in the
database system. (8)
Consider the following schedules. The actions are listed in the order they are scheduled and
BTL3 Applying
prefixed with the transaction name:
S1: T1:R(X),T2:R(X),T1:W(Y),T2:W(Y),T1:R(Y),T2:R(Y)
S2: T3:W(X),T1:R(X),T1:W(Y),T2:W(Z),T3:R(Z)
For each of the schedules answer the following questions:
4
(i) Develop the precedence graph for the schedule?(2)
(ii)Is the schedule conflict serializable? If so what are all the conflict equivalent serial
schedules? (7)
(iii) Is the schedule view serializable? If so, what are all the view equivalent serial schedule?
(6)