0% found this document useful (0 votes)
22 views4 pages

DBMS PUT QP Final

Uploaded by

avinmalik11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

DBMS PUT QP Final

Uploaded by

avinmalik11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Raj Kumar Goel Institute of Technology, Ghaziabad

Pre University Test (Odd Semester) 2023-24


B.Tech. [Branch/Section: COMMON TO ALL] SEM:5th
Subject Name: DBMS Subject Code : KCS-501 Total Marks : 100
Roll No./Name: __________________________ __________________ Time : 3 Hours

Note: Attempt all Sections. If you require any missing data, then choose suitably.

CO1 Apply knowledge of database for real life applications.


CO2 Apply query processing techniques to automate the real time problems of databases.
CO3 Identify and solve the redundancy problem in database tables using normalization.
CO4 Understand the concepts of transactions, their processing so they will familiar with broad range of database management issues
including data integrity, security and recovery.
CO5 Design, develop and implement a small database project using database tools
Section – A
Q.1 Attempt all the parts (2 x 10 =20)
(a) Explain DBMS with example. K2 CO1 2
(b) Explain Cursors. K2 CO1 2
(c) Explain relational data model. K2 CO2 2
(d) Determine different types of Integrity constraints. K3 CO2 2
(e) Describe 2NF with proper example. K2 CO3 2
(f) Classify Decomposition and why it’s needed. K2 CO3 2
(g) Describe transaction system. K2 CO4 2
(h) Define deadlock avoidance methods. K1 CO4 2
(i) Explain Lock in Transaction Management. K2 CO5 2
(j) Explain Concurrent Transactions?. K2 CO5 2
Section – B
Q.2 Attempt any three parts of the following (10 x 3 = 30)
(a) Design overall structure of DBMS and explain its component in brief. K5 CO1 10
(b) Explain Joins? Discuss all types of Joins with the help of suitable examples K2 CO2 10
(c) Define partial functional dependencies. Consider the following two sets of K1,K CO3 10
functional dependencies F={A->C, AC->D, E->AD, A->H} and G={A->CD, E- 3
>AH}. Check whether or not they are equivalent.
(d) Explain Schedule? What are its types? Explain view serializable and cascadeless K2 CO4 10
schedule with suitable example of each.
(e) Discuss the immediate update recovery technique in both single-user and K2 CO5 10
multiuser environments. What are the advantages and disadvantages of
immediate update
Section – C
Q.3 Attempt any one part of the following (10x 1 = 10)
(a) What is ER Diagram? Explain different Components of an ER Diagram with K2,K CO1 10
their Notation. Construct an ER Diagram for Library Management System. 6
(b) Discuss different types of Data Models in DBMS? Explain them. K2 CO1 10
Q.4 Attempt any one part of the following (10x 1 = 10)
(a) Consider the following relational database schema consisting of the four relation K3 CO2 10
schemas:
passenger ( pid, pname, pgender, pcity)
agency ( aid, aname, acity)
flight (fid, fdate, time, src, dest)
booking (pid, aid, fid, fdate)
Answer the following questions using relational algebra queries;
a) Get the complete details of all flights to New Delhi.
b) Get the details about all flights from Chennai to New Delhi.
c) Find the passenger names for passengers who have bookings on at
least one flight
d) Get the passenger names travelling by ‘abc’ agency between 3-12-23
and 12-12-23?
e) Find the agency names for agencies that located in the same city as
passenger with passenger id 123.
(b) Explain different types of Triggers in SQL/PL SQL. K2 CO2 10
(a) Given the following set of FDs on schema R (V,W,X,Y,Z) K3 CO3 10
{Z→V, W→Y, XY→Z, V→WX}State whether the following decomposition
are loss-less-join decompositions or not.
(i) R1=(V,W,X) , R2=(V,Y,Z)
(ii) R1=(V,W,X), R2=(X,Y,Z)
(b) (i) Consider the relation R(a,b,c,d) with Set F={a→c,b→d}. K3 CO3 10
Decompose this relation in 2 NF.
(ii) Explain the Loss Less Decomposition with example.
Q.6 Attempt any one part of the following (10x 1 = 10)
(a) Consider schedules S1, S2, and S3 below. Determine whether each schedule is K3 CO4 10
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;
(b) Discuss 2 phase commit (2PC) protocol and time stamp based protocol with K2 CO4 10
suitable example. How the validation based protocols differ from 2PC?
Q.7 Attempt any one part of the following (10x 1 = 10)
(a) Explain Time Stamp Based Concurrency Control technique. K2 CO5 10
(b) How do optimistic concurrency control techniques differ from other concurrency K2 CO5 10
control techniques? Why they are also called validation or certification
techniques? Discuss the typical phases of an optimistic concurrency control
method.

__________________________________________________________________

a) Get the complete details of all flights to New Delhi.


σ destination = “New Delhi” (flight)
------------------------------------------------------------------------------------------------
-----

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]

d) Find the passenger names for passengers who have bookings on at


least one flight.
Π pname (passenger ⨝ booking)

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;

Recoverable Schedule: The transaction which does uncommitted read operation


should not commit before the commit/rollback of the transaction which updated that data
item.
Non-recoverable Schedule: Opposite of recoverable schedule
Cascadeless Schedule: No uncommitted read is allowed.
Strict Recoverable Schedule: Read/Write(WR,WW) operations are not allowed by any
other transactions until the transaction commit/rollback which updated a data item.

S3: recoverable, cascadeless, strict recoverable


S4: there is a dirty read between W3(Y) and R2(Y) hence not cascadeless, Not
recoverable because T2 is committing before T3
S5: No dirty read hence recoverable and cascadeless shecdule but not strict recoverable
because WW exists between W3(Y) and W2(Y)

You might also like