SQL allows a foreign-key dependency to refer to the same relation, as in the following example:
create table manager (
employee_ID char(20),
Manager_ID char(20),
primary key employee_ID,
foreign key (manager_ID) references manager(employee_ID) on update cascade )
Here, employee_ID 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 updated.
Specify all steps that will occur in the above scenario.
Get Answers For Free
Most questions answered within 1 hours.