Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Roll No.: May 25, 2019, Time Duration: 03hrs, M.M.

40

Name:

Thapar Institute of Engineering & Technology, Patiala


School of mathematics
Mid Semester Examination
MSc (2nd): Sem-II PMC-205 (DBMS) Faculty: Dr. Khushneet Jindal

Attempt all parts of the questions in sequence.

Ql. Explain Components of an E-R diagram in detail with examples. 06

Write PL/SQL procedure to implement given schema:


Emp(Name, ENO ,DOB, Address, City, Gender, Salary, Supereno, Dnumber)
Dep( Dname, Dnumber , mgreno, mgrstartdate)
Dep_locations(Dnumber, Dlocation)
Project(P_name, P_number , P_location, Dnumber)
Works_on(ENo, P_number, hours)
Q2. Dependent(ENo, Dependent_Name, Gender, DoB, Relationship) 08
Write following queries:
a) Retrieve the name & salary of all employees who work for `SoM' department
b) List project no's that involve an employee whose name is 'Khushi' or 'Pihu'
c) For each department, retrieve the department name & its average salary
d) Retrieve info of all employees who live in 'Patiala' & department `SoM'
f) Retrieve employee names, department name, Project name of those
employees who worked on a project having number of hours = 120

Q3. What are lock based protocols? Explain its types with suitable examples. 05

Q4. Explain functional dependency? Explain its types with examples. 05

Q5. Why normalization is required? Explain 2NF and BCNF with examples. 08

Using cursors write PLJSQL procedure to retrieve & display data from employee
Q6. table (employee_id, name, salary) of employees who live in Goa. Also display the 08
count of records retrieved.

You might also like