Create a trigger on WORKS_ON, if a new tuple with Hours=NULL is inserted, set the Hours to 0. 6. Create a table with attributes SSN, dependent_name and ChangeTimeStamp, whenever a new tuple is inserted into DEPENDENT table, record the operation using a trigger. 7. Create a trigger on CLIENT, whenever a tuple is deleted, delete all the tuples in PROJECT table and WORKS_ON table with the same Pno as the deleted tuple from CLIENT. 8. Create a trigger on EMPLOYEE, whenever a new employee is inserted, if the employee has salary higher than his/her supervisor, set the employee's salary to NULL.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter7: Developing An Excel Application
Section: Chapter Questions
Problem 3RA
icon
Related questions
icon
Concept explainers
Question

5. Create a trigger on WORKS_ON, if a new tuple with Hours=NULL is inserted, set the Hours to 0.

6. Create a table with attributes SSN, dependent_name and ChangeTimeStamp, whenever a new tuple is inserted into DEPENDENT table, record the operation using a trigger.

7. Create a trigger on CLIENT, whenever a tuple is deleted, delete all the tuples in PROJECT table and WORKS_ON table with the same Pno as the deleted tuple from CLIENT.

8. Create a trigger on EMPLOYEE, whenever a new employee is inserted, if the employee has salary higher than his/her supervisor, set the employee's salary to NULL.

CLIENT
CName
Pno
Snap
QTC
LinkedIn
3
JPL
10
Google
20
JPL
30
Transcribed Image Text:CLIENT CName Pno Snap QTC LinkedIn 3 JPL 10 Google 20 JPL 30
EMPLOYEE
Fname
Minit
Lname
Ssn
Bdate
Address
Sex Salary
Super_ssn
Dno
John
Smith
123456789| 1965-01-09 |731 Fondren, Houston, TX M
30000 333445555
Franklin
Wong
333445555 1955-12-08 638 Voss, Houston, TX
M
40000
888665555
Alicia
999887777 | 1968-01-19 |3321 Castle, Spring, TX
25000 987654321
Zelaya
Wallace 987654321 | 1941-06-20 |291 Berry, Bellaire, TX
F
4
Jennifer
S
F
43000 888665555
4
Ramesh
K
Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M
38000 333445555
Joyce
A
English
453453453| 1972-07-31
5631 Rice, Houston, TX
F
25000 333445555
Ahmad
V
Jabbar
987987987
1969-03-29 980 Dallas, Houston, TX
25000 987654321
4
James
E
Borg
888665555 1937-11-10 |450 Stone, Houston, TX
M
55000 NULL
1
DEPARTMENT
DEPT_LOCATIONS
Dname
Dnumber
Mgr_ssn
Mgr_start_date
Dnumber
Dlocation
Research
333445555
1988-05-22
1
Houston
Administration
4
987654321
1995-01-01
4
Stafford
Headquarters
888665555
1981-06-19
Bellaire
Sugarland
Houston
WORKS_ON
PROJECT
Essn
Pno
Hours
Pname
Pnumber
Plocation
Dnum
123456789
1
32.5
ProductX
1
Bellaire
123456789
7.5
ProductY
2
Sugarland
5
666884444
3
40.0
ProductZ
3
Houston
453453453
20.0
Computerization
10
Stafford
4
453453453
2
20.0
Reorganization
20
Houston
333445555
2
10.0
Newbenefits
30
Stafford
4
333445555
3
20.0
333445555
10
10.0
DEPENDENT
333445555
20
10.0
Essn
Dependent_name
Sex
Bdate
Relationship
999887777
30
30.0
333445555
Alice
F
1986-04-05
Daughter
999887777
10
10.0
333445555
Theodore
M
1983-10-25
Son
987987987
10
35.0
333445555
Joy
F
1958-05-03
Spouse
987987987
30
5.0
987654321
Abner
M
1942-02-28
Spouse
987654321
30
20.0
123456789
Michael
M
1988-01-04
Son
987654321
20
15.0
123456789
Alice
1988-12-30
Daughter
888665555
20
NULL
123456789
Elizabeth
F
1967-05-05
Spouse
Transcribed Image Text:EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super_ssn Dno John Smith 123456789| 1965-01-09 |731 Fondren, Houston, TX M 30000 333445555 Franklin Wong 333445555 1955-12-08 638 Voss, Houston, TX M 40000 888665555 Alicia 999887777 | 1968-01-19 |3321 Castle, Spring, TX 25000 987654321 Zelaya Wallace 987654321 | 1941-06-20 |291 Berry, Bellaire, TX F 4 Jennifer S F 43000 888665555 4 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 333445555 Joyce A English 453453453| 1972-07-31 5631 Rice, Houston, TX F 25000 333445555 Ahmad V Jabbar 987987987 1969-03-29 980 Dallas, Houston, TX 25000 987654321 4 James E Borg 888665555 1937-11-10 |450 Stone, Houston, TX M 55000 NULL 1 DEPARTMENT DEPT_LOCATIONS Dname Dnumber Mgr_ssn Mgr_start_date Dnumber Dlocation Research 333445555 1988-05-22 1 Houston Administration 4 987654321 1995-01-01 4 Stafford Headquarters 888665555 1981-06-19 Bellaire Sugarland Houston WORKS_ON PROJECT Essn Pno Hours Pname Pnumber Plocation Dnum 123456789 1 32.5 ProductX 1 Bellaire 123456789 7.5 ProductY 2 Sugarland 5 666884444 3 40.0 ProductZ 3 Houston 453453453 20.0 Computerization 10 Stafford 4 453453453 2 20.0 Reorganization 20 Houston 333445555 2 10.0 Newbenefits 30 Stafford 4 333445555 3 20.0 333445555 10 10.0 DEPENDENT 333445555 20 10.0 Essn Dependent_name Sex Bdate Relationship 999887777 30 30.0 333445555 Alice F 1986-04-05 Daughter 999887777 10 10.0 333445555 Theodore M 1983-10-25 Son 987987987 10 35.0 333445555 Joy F 1958-05-03 Spouse 987987987 30 5.0 987654321 Abner M 1942-02-28 Spouse 987654321 30 20.0 123456789 Michael M 1988-01-04 Son 987654321 20 15.0 123456789 Alice 1988-12-30 Daughter 888665555 20 NULL 123456789 Elizabeth F 1967-05-05 Spouse
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage