You are on page 1of 2

USN

MANGALORE INSTITUTE OF TECHNOLOGY AND ENGINEERING


(An ISO 9001:2015 Certified Institution)
II INTERNAL ASSESSMENT TEST

Course Title: Database Management System Course Code: 18CS53


Duration: 90 Min. Semester: 05 Section: ISE Date: 27/11/2020
Name of the Course Instructor/s: Mr. Narendra U P Max. Marks: 50
 Answer any THREE full questions.

1A Considering the schema


Sailors (sid , sname , rating , age) Boats (bid , bname , color) Reserves (sid , bid , day)
Write relational algebraic queries for the following :
i) Find names of sailors who have reserved boat # 103. [CO2]
ii) Find names of sailors who have reserved a red boat. [10]
iii) Find names of sailors who have reserved a red or green boat. P
iv) Find names of sailors who have reserved all boats.

1B What is meant by Integrity constraints. Explain the importance of Referential Integrity [CO2]
constraints [07]
OR
2A Considering the following Movie Database : Movie (Title, director, Myear, Rating)
Actor (Actor, Aage) Acts (Actor, Title) Director (Director, Dage)
Write relational algebraic queries for the following :
i) Find movies made by 'Satyajit' after 1960. [CO2]
ii) Find all actors and Directors. [10]
iii) Find "Maniratnam's" movies with 'Rajni'.
iv) Find (Director, Actor) pairs where the Director is younger than the ator.

2B What is meant by Integrity constraints. Explain the importance of Entity Integrity [CO2]
constraints [07]
3A Consider the following :
Resort (resortNo, resortName, resortType, resortAddress, resortCity, numSuite)
Suite(suiteNo, resortNo, suitePrice)
Reservation (reservationNo, resortNo, visitorNo, checkIn, checkOut, totalVisitor, suiteNo) [CO3]
Visitor(visitorNo, firstName, lastName, visitorAddress) [10]
Write the SQL queries for creating all the above Tables, and specify the keys and referential
integrity constraints

3B For the Schema given in 3A, write SQL queries for


i) List full details of all the resorts in Mangalore [CO3]
ii) List full details of all Resorts having number of suites more than 30 [07]
iii)List visitors in ascending order by first name
OR
4A Write appropriate SQL DDL statements for declaring the Library relational database schema [CO3]
[10]
4B For the Schema given in 3B Write SQL query to I) find Book defaulters ii) Books from a [CO3]
specific publisher iii) Students who have taken more than three books [07]

5A Consider the Company Database and Write SQL Queries for: [CO3]
I) List employees working in Project controlled by Dept 5 [08]
Page 1 of 2
II) List Managers who do not have Dependents
III) List Employees without Supervisors
IV) List Projects which are are controlled by Department having office in Mangalore

5B Consider the Company Database and Write SQL Queries for:


i) Find the sum of salaries, maximum, minimum and average salaries of all employees of
‘Research’ Dept
ii) For each Project, list the Project number, Project name, and the number of employees
[CO3]
who work on that project
[08]
iii) List the Project name, Pnumber, and nno of employees for nly those project which has
more than 5 employees working on it
iv) For each Department, List the Dept number, no of employees, and average salary

OR
6A Consider the Company Database and Write SQL Queries for:
V) List employees working in Project controlled by Dept 5
VI) List Managers who do not have Dependents [CO3]
VII) List Employees without Supervisors [08]
List Projects which are are controlled by Department having office in Mangalore

6B Consider the Company Database and Write SQL Queries for:


v) Find the sum of salaries, maximum, minimum and average salaries of all employees of
‘Research’ Dept
vi) For each Project, list the Project number, Project name, and the number of employees [CO3]
who work on that project [08]
vii) List the Project name, Pnumber, and nno of employees for nly those project which has
more than 5 employees working on it
For each Department, List the Dept number, no of employees, and average salary

Page 2 of 2

You might also like