Question: 1 5 a ) What is an assertion? How they differ from triggers? 4 b ) Consider the following relation schema and write SQL queries

15 a) What is an assertion? How they differ from triggers?
4
b) Consider the following relation schema and write SQL queries to find:
10
EMPLOYEE(Fname, Minit, Lname, SSN, Bdate, Address, Sex, Salary SuperSSN, Dno)
DEPARTMENT(Dname, Dnumber, MgrSSN, MgrStartDate)
DEPT_LOCATIONS(Dnumber, Dlocaions)
PROJECT(Pname, Pnumber, Plocation,Dnum)
WORKS_ON(ESSN, Pno,Hours)
i. Retrieve the name and address of all employees who work for the 'Research' department.
ii. For each employee, retrieve the employee's name, and the name of his or her immediate supervisor.
iii. Retrieve the name of each employee who works on all the projects controlled by department number 5.
iv. Make a list of all project numbers for projects that involve an employee whose last name is 'Smith' as a worker or as a manager of the department that controls the project.
v. Retrieve the SSN of all employees who work on project number 1,2, or 3.
 15 a) What is an assertion? How they differ from triggers?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!