Question: 1 5 a ) What is an assertion? How they differ from triggers? 4 b ) Consider the following relation schema and write SQL queries
a What is an assertion? How they differ from triggers?
b Consider the following relation schema and write SQL queries to find:
EMPLOYEEFname Minit, Lname, SSN Bdate, Address, Sex, Salary SuperSSN, Dno
DEPARTMENTDname Dnumber, MgrSSN MgrStartDate
DEPTLOCATIONSDnumber Dlocaions
PROJECTPname Pnumber, Plocation,Dnum
WORKSONESSN 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
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 or
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
