a) If a referential integrity constraint (foreign key) is defined with the ON DELETE CASCADE option on a column in a table, what rules will be enforced on the data in that column and on the corresponding referenced table? Explain with a clear example.
b) Given the following schema, answer the queries using relational algebra and SQL
Employee (person-name, street, city)
Works (person-name, company-name, salary)
Company (company-name, city)
Manages (person-name, manager-name)
(i). Find the names and cities of residence of all employees who work for First Bank Corporation.
(ii). Assume the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located.
Solution
b)
(i). Find the names and cities of residence of all employees who work for First Bank Corporation.
---
(ii). Assume the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located.
--
Answered part b completely
i am 100% sure about part b
i am really sorry for not able to complete part a
all the best
Get Answers For Free
Most questions answered within 1 hours.