You are on page 1of 2

School of Computer Science and Engineering

FALL SEMESTER 2021


Final Assessment Test
Course Code : CSE2004 Course Name : Database Management System
Programme : B.Tech Slot : L39+L40
Time : 04.00 – 05.30PM Date: 07.12.2021 Total Marks = 50 marks

Instructions for the test:


- Complete on time (5.30 PM)
- Submit the answer sheet as a single PDF
- It should contain the query and the output screenshot (system time should be visible).
- Output should be presented in the order of question number – questions are related.
- Present the output for each question

Q1. Consider an instructor (ID, name, deptname and salary) and department (deptname, building
and budget) relation as below.

a) Create the above table and impose the following constraints on the table (10 marks)

Attribute name Data type Constraints


ID Number (7) Primary key
Name Varchar (15) Not Null
Departmentname Char(3) Not Null
Foreign key for instructor relation
Primary key for department
relation
Budget Number (7) NOT NULL
b) Insert the following tuples to the department relation “MGBlock, MECH, 10L” &

“SJTAnnex, CHE, 16L” – Present the output for each insertion. (10 marks)

c) Form a new relation from with the following attributes – building, department, average

salary in each department. Name the new relation as Dept_AVGsalary - (5 marks)

d) Delete the tuple of Dept_AVGsalary where the building = “SJT” (5 marks)

e) Implement question –(b) as a trigger (15 marks)

f) 5 marks for the overall presentation

****************************** ALL THE BEST ********************************

You might also like