6. Create a complex view EMP_DEP_VIEW using an outer join between EMPLOYEE and DEPENDENT table with employee names, dependent’s birthdate and relation. The outer join will also return employees without any dependents. Now, create an INSTEAD OF trigger based on EMP_DEP_VIEW to enable you to delete employee 433 through view.

What will be an ideal response?


```
SQL> CREATE VIEW emp_dep_view
2 AS
3 SELECT e.EmployeeId, Lname, Fname, depDOB, Relation
4 FROM employee e, dependent d
5 WHERE e.EmployeeId = d.EmployeeId (+);

View created.

SQL> CREATE OR REPLACE TRIGGER emp_delete_iod
2 INSTEAD OF DELETE ON emp_dep_view
3 FOR EACH ROW
4 BEGIN
5 DELETE FROM employee
6 WHERE EmployeeId = :OLD.EmployeeId;
7 END;
8 /

Trigger created.

SQL> DELETE FROM emp_dep_view
2 WHERE EmployeeId = 433;

1 row deleted.
```

Computer Science & Information Technology

You might also like to view...

Which is NOT a reason to use comments?

A) To provide an Excel version of footnotes. B) To provide reminders. C) To display clarifying information about data within the cells. D) To document your work.

Computer Science & Information Technology

To see all open windows, you can display them side-by-side or ________ them

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ________ image property can be read by a screen reader

A) translator B) speech recognition C) vocalizer D) alt text

Computer Science & Information Technology

Microsoft Access is a(n) ____.

A. text file format B. database program C. suite of application programs D. HTML file format

Computer Science & Information Technology