0% found this document useful (0 votes)
26 views2 pages

UCS310

The document outlines the structure and content of an End Semester Test for BE Second Year students in the Computer Science and Engineering Department at Thapar Institute of Engineering and Technology, focusing on Database Management Systems. It includes various questions related to database normalization, transaction schedules, PL/SQL programming, and E-R diagram conversions. The test is coordinated by multiple instructors and consists of several parts that require detailed answers and justifications.

Uploaded by

amishra60be23
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)
26 views2 pages

UCS310

The document outlines the structure and content of an End Semester Test for BE Second Year students in the Computer Science and Engineering Department at Thapar Institute of Engineering and Technology, focusing on Database Management Systems. It includes various questions related to database normalization, transaction schedules, PL/SQL programming, and E-R diagram conversions. The test is coordinated by multiple instructors and consists of several parts that require detailed answers and justifications.

Uploaded by

amishra60be23
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/ 2

Roll Number:

Thapar Institute of Engineering and Technology Patiala


Computer Science and Engineering Department
End Sem Test
BE Second Year (4' Semester) 13th May, 2023 UCS310: Database Management System
Time: 3 Hours, Max Marks:40 Coordinators: Dr Geeta Kasana, Dr. Ranjeet Kumar
Ranjan
Instructors: Geeta Kasana, Ranjeet Kumar Ranjan, Deepak Kumar Dewangan, Sumit Sharma, Manisha
Kaushal, Rakesh Kumar Yadav, Sanjeev Rao
Note: Attempt all parts of a question and answer them in order. Anew question must start from
new page. Assume any missing data.

Q1 a) Consider a relation R (A, B, C, D, E) with FDs: 6+2


AB —+ C,
AC B,
BC ---. A, and
D —i E.
i. Determine all the candidate keys of relation R.
ii. Is relation R (A, B, C, D, E) in 2NF? If not, justify your answer and convert into 2NF.
iii. Is relation R (A, B, C, D, E) in 3NF? If not, justify your answer and convert into 3NF.
iv. Is relation R (A, B, C, D, E) in BCNF or not? Justify your answer

b) Differentiate between lossy and lossless decomposition used in Normalization with a suitable
example.

a) Consider the following four schedules using read and write operation on a data item X, denoted 2+2+4
by r(x) and w(x) respectively. Find the following schedules are conflict serializable or not, with
explanation.
S I : ri(X); r2(X); wi(X); r3(X); w2(X)
S2: r2(X); ri(X); w2(X); r3(X); wi(X);
S3: r3(X); r2(X); ri (X); w2(X); wi (X);
S4: r2(X); w2(X); r3(X); ri(X); wi(X);

Consider the following schedule S of transactions TI, T2, T3, T4:


T1 T2 T3 T4
Read(X)

Read(Z)
Write(X)
Commit

Re od(Z)
Write(X)
Commit

WLite(Y)
Read(Z)
Commit

Read(X)
Read(Y)
Commit

Using precedence graph, describe whether the above Schedule is conflict serializable, view
serializable or both.

c) Explain Cascadeless Recoverable schedule. Find out whether the given schedule S is Cascadeless
schedule or not. Justify your answer.

S: Ri(A) R2 (C) R3(A) RAC) R2(B) 113(B) W,(A) CI W2(C) W3(B) W2(B) C.3 C2.

Where, Ri(X) and W,(X) represent read and write operations on data item X by transaction T,
respectively and C, is commit of transaction Ti.

Page 1 of 2
a) Explain Strict Two-Phase Locking (Strict 2PL) protocol and its advantages with respect to basic 5+3
Q3
2PL. For the given schedule below, explain whether Basic 2PL and Strict 2PL can be applicable
or not.
T1 T2

Read(A)
WrIte(A)
Read(B)

Read(A)
Read(C)
Write(B)

b) Consider a database with objects X and Y and assume that there are two transactions T1
and 77.
Transaction TI reads objects X and Y and then writes object X. Transaction T2 reads objects X
and Y and then writes objects X and Y. Using the given operations of transactions T1 and T2,
construct the schedules which show the following conflicts. Also justify how conflicts occur.
(I) write-read conflict
(ii) read-write conflict
(iii) write-write conflict

6+2
Q4 a) Consider the table Emp (empno, ename, deptno, salary) to write a PL/SQL program to increase the
salary of an employee according to the following rule:
• Salary of the department number 10 employees increased by 1000.
• Salary of the department number 20 employees increased by 500.
• Salary of the department number 30 employees increased by 500.
• Store the employee number, old salary and new salary in another table named temp having
three columns empno, old_ salary, new_ salary.

b) Write the PL/SQL program to define and raise a user defined exception named invalid id. for
above table Emp, if [ empno <----- 0].
5+3
Q5 a) Convert the following E-R diagram to Tables. Explicitly mention primary and foreign keys for
each of the table.

°Co Re TREE.
)
T. 4320, cs)
4csi. COURSE ID
S T UD ENT _NAME ADDRESS
. _I 0
COURSE
1 COL/RSE_NAME

STUDENT ID
hi N
STUDENT Attends COURSE
AGE .
.. .'
1
1

EIC
C7557)
04
Teaches
009
LF.CTURER11)
4`
M Al

Teaches SUBJECTS 8CT


,..„...;(:)
su....
LECTURER1
I

41=011*
EMU* r.R ID ISCTIAT.R_NAME COUR SEJO

b) List any six responsibilities performed by Database Administrator (DBA).

Page 2 of 2

You might also like