DBMS PUT QP Final
DBMS PUT QP Final
Note: Attempt all Sections. If you require any missing data, then choose suitably.
__________________________________________________________________
b) Get the details about all flights from Chennai to New Delhi.
σ src = “Chennai” ^ dest = “New Delhi” (flight)
------------------------------------------------------------------------------------------------
-----
Find only the flight numbers for passenger with pid 123 for flights to
Chennai before 06/11/2020.
Π fid (σ pid = 123 (booking) ⨝ σ dest = “Chennai” ^ fdate <
06/11/2020 (flight))
[Hint: Given conditions are pid, dest, and fdate. To get the flight id for a
passenger given a pid, we have two tables flight and booking to be
joined with necessary conditions. From the result, the flight id can be
projected]
f) Find the agency names for agencies that located in the same city as
passenger with passenger id 123.
Π aname (agency ⨝ acity = pcity (σ pid = 123 (passenger)))
[Hint: we performed a theta join on equality conditions (equi
join) here. This is done between details of passenger 123 and the agency
table to get the valid records where the city values are same. From the
results, aname is projected.]
Consider schedules S1, S2, and S3 below. Determine whether each schedule is strict, cascade less,
recoverable, or non recoverable. (Determine the strictest recoverability condition that each schedule
satisfies.)
S1: r1 (X); r2 (Z); r1 (Z); r3 (X); r3 (Y); w1 (X); c1; w3 (Y); c3; r2 (Y); w2 (Z); w2
(Y); c2;
S2: r1 (X); r2 (Z); r1 (Z); r3 (X); r3 (Y); w1 (X); w3 (Y); r2 (Y); w2 (Z); w2 (Y);
c1;c2; c3;
S3: r1 (X); r2 (Z); r3 (X); r1 (Z); r2 (Y); r3 (Y); w1 (X); c1; w2 (Z); w3 (Y); w2
(Y);c3; c2;