Skip to content
Previous Year Question Paper

CS-502 - Database Management Systems

November 2023•CSE•SEMESTER-5
November 2023
Max Marks: 70
Duration: 3 Hours
Instructions:

• Attempt any five questions.

• All questions carry equal marks.

Q.1
a)Unit 1

Discuss the role of following in representing information about the real world in a database? [7 Marks]

i) DDL and DML

ii) The buffer manager

iii) The data model

b)Unit 1

Describe the structure of a DBMS. If your operating system is upgraded to support some new functions on OS files (e.g., the ability to force some sequence of bytes to disk), which layer(s) of the DBMS would you have to rewrite to take advantage of these new functions? [7 Marks]

Q.2
a)Unit 2

Consider the following ER diagram with the relations E1(a, b) and E2(c, d). R1 and R2 denote relationships between E1 and E2. Illustrate the table schema of the entities E1, E2 while converting ER Diagram to Relational tables. [7 Marks] alt=''

b)Unit 2

Draw an ER diagram that captures the following information. [7 Marks] "A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departments (identified by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identified uniquely by name when the parent (who is an employee) is assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company."

Q.3
a)Unit 3

Consider the following Employee relation with E_ID as the primary key. [7 Marks] Discuss the anomalies that may arise during Insert, Delete and Updating a record in the above relation.

E_IDEnameDname
e1AHR
e4BHR
e8CFinance
e9DNull
e2ECivil
b)Unit 2

Consider the following Employee Relation. [7 Marks]

E_IDE_NameGenderSalaryManager_IDDept_ID
1AM8000NULL101
2BM50001101
3CF20001101
4DF20002102
5EM40002102
6FM20001103
7GF45001103
8HF30001104
Write SQL Queries for the following:

i) Fetch the Dept_ID whose average salary is higher than 4000.

ii) Fetch the Dept_ID whose average salary of male employees is higher than 2000.

iii) Fetch the Name of all employees whose Manager_ID is '1'.

iv) Fetch the Name of all employees of Dept_ID as '103' and their Manager_ID is '1'.

v) Fetch the name, salary, and Dept_ID of employee getting second highest salary.

vi) Fetch the E_ID and Name of employees who are getting salary higher than the salary of employee 'F'.

vii) Fetch the D_ID of employees who are getting salary higher than the salary of employee 'E'.

Q.4
a)Unit 3

Discuss the major steps in query optimization? What do you understand by sigma cascade operation? [7 Marks]

b)Unit 3

Discuss various cost components for query execution. [7 Marks]

Q.5
a)Unit 3

Identify the candidate keys and highest normal form of the relation R (ABCDEF). The functional dependencies of the relation R. [7 Marks] A→BCA \to BC C→EC \to E E→FE \to F F→ABF \to AB

b)Unit 3

Consider a relation R(WXYZ) with the following set of functional dependencies. [7 Marks] X→WX \to W WZ→XYWZ \to XY Y→WXZY \to WXZ Compute the minimal (canonical) cover of the above relation R.

Q.6
a)Unit 4

Consider the following actions taken by transaction T1 on database objects X and Y [7 Marks] R(X), W(X), R(Y), W(Y) Give an example of another transaction T2 that, if run concurrently to transaction T without some form of concurrency control, could interfere with T1.

b)Unit 4

Consider a schedule S using two phase locking mechanism for concurrency control. Convert the given schedule to strict and rigorous two-phase locking protocol. [7 Marks] Lock Shared(A) Read(A) Lock Exclusive(B) Read(B) B=B+A Write (A) Write (B) Unlock (A) Unlock (B) Commit

Q.7
a)Unit 4

Consider the following transactions with two data items A and B. Show the precedence graph for the given concurrent schedule and find equivalent serial schedule. [7 Marks]

T1T2
Read(A)
A=A+10
Read(A)
Temp=0.2*A
Write(A)
Read(B)
Write(A)
Read(B)
B=B+10
Write(B)
B=B+Temp
Write (B)
b)Unit 4

Explain the concept of recoverability in database management system. Show any recoverable schedule consisting of two transactions. [7 Marks]

Q.8
a)Unit 5

Oracle exception handling mechanism

b)Unit 1

Functions of DBA

c)Unit 2

SQL Aggregate Functions

d)Unit 5

Distributed databases