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

DATABASE MANAGEMENT SYSTEM LAB

TIME: 3 HRS.

SET-E
1) Consider the following tables:

teacher (t_no, f_name, l_name, salary, supervisor, joining_date, birthdate, title)

class (class_no, t_no, room_no)

payscale (Min_limit, Max_limit, grade)

Attempt the following problems for the “teacher, class and payscale” relations given in this
section.

a) Create a view named ‘supervisor_details’ that stores the names and numbers of all the supervisors.
b) Modify the view created in (a) and add details like salary, job title, joining date, birth date etc. of all
supervisors.
c) Using the view created in (b) display details of all supervisors who have worked for more than 15
years.
d) Create a view that stores the details of all the teachers who are TGT and earning more than
Rs.12000/-.
e) Drop the view created in (d).

f) Create a non-unique index on the foreign key column of the ‘class’ table.
g) Create a non-unique index on the names of teachers in the ‘teachers’ table.
h) Drop the index created in (a).
i) Create a view named ‘teacher_info’ that only allows users to view the teacher id, name, salary and
grade of the teachers. It should not allow any user to change/update any information.
j) Create a view that displays details of all teachers who are in grade ‘B’ and are more than 40 years old.

You might also like