USN 1 S I 5CCI01
Siddaganga Institute of Technology, Tumakuru – 572 103
(An Autonomous Institution affiliated to VTU, Belagavi, Approved by AICTE, New Delhi)
Fifth Semester Bachelor of Engineering Examinations Dec. 2019
Database Management System
[COMMON TO CS / IS]
Time: 3 Hours Max. Marks: 100
Note : Answer any five questions choosing one full question from each unit.
Unit - I
01 a) Define DBMS. List the advantages of using the DBMS approach. Explain any four. 10
b) Draw an ER diagram for the following problem. Indicate attributes, relationships, weak entity,
weak relationship type etc., that are relevant to your design. Your job in this problem, is to
organize the information about all the airplane that are stationed and maintained in the airport.
(i) Every airplane has a registration number, specific model etc.
(ii) The airport accommodates a number of airplane models, and each model is identified
by a model and has capacity and weight.
(iii) A number of technicians work at the airport (id, address, sex, salary, skills, dob, etc)
on one or more plane models.
(iv) The airport has a number of tests that are performed on the planes. Each test has a
specific id, name, score etc. This is to make sure that planes are airworthy. 10
OR
02 a) Describe the three schema architecture. Why do we need mappings between schema levels?
How do different schema definition language support this architecture? 8
b) What is the difference between procedural and non-procedural DML’s ? 4
c) What is participation role? When is it necessary to use role names in the description of
relationships types? Discuss with an example. 8
Unit - II
03 a) Consider the following relations for a database that keeps track of business trips of sales persons
in a sales office
SALESPERSON(SSN, Name, Start_year, Dept_No)
TRIP(SSN, From_City, To_City,Depar_Date, Return_Date, Trip_ID)
EXPENSE (Trip_ID , Account #, Amount)
Specify the primary key and foreign keys for this schema, stating any assumptions you make. 4
b) Explain the different types of JOIN operations in relational algebra with an example. 8
c) Consider the following two tables T1 and T2. Show the results of the following operations
(Assume T1 and T2 are union compatible)
Table T1 Table T2
P Q R A B C
10 a 5 10 b 6
15 b 8 25 c 3
25 a 6 10 b 5
𝑇1 ⋈ 𝑇 𝑇2 𝑇1 ⋈ 𝑇 𝑇2 𝑇1 ⋈ 𝑇 𝑇
(i) 1.𝑃 = 𝑇2 .𝐴 (ii) 1.𝑃 = 𝑇2 .𝐴 (iii) 1.𝑃 = 𝑇2 .𝐴 𝐴𝑁𝐷 𝑇1 .𝑅 = 𝑇2.𝐶 2
𝑇1 ⋈ 𝑇1.𝑄 = 𝑇2.𝐵𝑇2
(iv) 𝑇1 ∪ 𝑇2 (v) 8
-1- Please Turn Over
-2- 5CCI01
OR
04 a) Discuss the various reasons that lead to the occurrence of null values in relations. 4
b) Consider the following schema and write the Relational algebra.
SAILORS (SID, Sname, Rating, Age)
BOATS (BID, Bname, Bcolor)
RESERVE (SID, BID, Day).
Write the queries in relational algebra to (i) find names of the sailors who have reserved the boat
number ‘103’. (ii) Find name of the sailors who have reserved a red and blue boat. (iii) Find
name of the sailors who have reserved at least one boat. 6
c) List and explain the steps involved in ER to relational mapping procedure. 10
Unit - III
05 a) Using data definition language, explain the different constraints that can be implemented. 6
b) Consider the following relations for a DB that keeps track of student enrollment in courses and
the books adopted in each course
STUDENT(USN, NAME, BRANCH, BDATE)
COURSE (COURSE#, COURSENAME)
ENROLL(USN, COURSE#, GRADE)
BOOK_ADOPTION(COURSE#, INSTRUCTOR_ID, BOOK_ISBN)
TEXT (BOOK_ISBN, BOOK_TITLE, PUBLISHER AUTHOR)
INSTRUCTOR(INSTRUCTOR_ID, INST_NAME)
Specify queries using SQL on the database.
(i) List the total number of courses offered by each instructor.
(ii) Retrieve the courses registered by student ‘Shyam’
(iii) List the students enrolled for the course ‘ISE’
(iv) Retrieve the course that has the maximum number of students enrolled. 8
c) What are nested queries? Give an example in SQL. 6
OR
06 a) Consider the following relations for a DB that keeps track of employees, the department they
work in and projects they work on.
EMPLOYEE (Ename, SSN, Address, Gender, Salary, DNo., MgrSSN)
DEPARTMENT(Dname, Dno,MgrSSN, MgrStartdate)
PROJECT(Pname, Pno, Plocations, Dno)
Dept_Loc(Dno, Dlocation)
Work_on(ESSN, Pno,Hours)
Specify queries using SQL on the database
(i) List female employees who have salary in the range of 10K and 20K.
(ii) List the manager details of each dept.
(iii) List the employees who are working only on projects controlled by the department
they are working in.
(iv) List the department whose average salary is more than 60K. 8
b) Explain how a GROUP BY clause works. State the difference between a WHERE and HAVING
clause. 6
Contd…
-3- 5CCI01
c) Explain the need and syntax of SET operation in SQL. 6
Unit – IV
07 a) i) What is a functional dependency? And also specify the hold of functional dependencies
among the attributes of a relational schema.
ii) Consider R={A, B,C, D, E,F} FD’s are { ABC, CE, CD EF}.
ADF can be inferred or not from the above given FD’s 7
b) Find the key and normalize the relation.
Book_Title Auth_name Book_Type List_Price Affiliation Pub
FD’s are { Book_Title [Link], Pub
Auth_name Affiliation
Book_Type List_Price} 7
c) Write an algorithm for testing non_additive join property. 6
OR
08 a) List the inference rules for functional dependencies. Write the algorithm to determine the closure
of X (set of attributes) under Y (Set of FD’s) 7
b) Define 1NF,2NF, 3NF with a suitable example for each. 7
c) Given relation R with 4 attributes. R={A,B,C,D} and following FD’s . Identify the keys for R
and highest normal form (i) C D, CA, BC (ii) BC, DA. 6
Unit – V
09 a) Explain the desirable properties of transaction. 6
b) Discuss the recovery techniques based on deferred update. Why is it called NO-UNDO/REDO
method. 8
c) How is the concept of serializability useful for concurrency control? 6
OR
10 a) Discuss shadow paging. How is it different from log based recovery techniques? Mention some
of its disadvantages. 10
b) What are the two main operations that a transaction uses to access data from the database? 5
c) List the different types of failures. What is meant by catastrophic failure? 5
________