Question: SQL allows a foreign-key dependency to refer to the same relation, as in the following example: create table manager (employee-name char (20), manager-name char(20), primary

SQL allows a foreign-key dependency to refer to the same relation, as in the following example: create table manager (employee-name char (20), manager-name char(20), primary key employee-name, foreign key (manager-name) references manager on delete cascade ) Here, employee-name is a key to the table manager, meaning that each employee has at most one manager. The foreign-key clause requires that every manager also be an employee. Explain exactly what happens when a tuple in the relation manager is deleted.

Step by Step Solution

3.49 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The tuples of all employees of the manager at all levels get deleted as ... View full answer

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

Document Format (1 attachment)

Word file Icon

16-CS-DB (163).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!