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.
Answer to relevant QuestionsSuppose there are two relations r and s, such that the foreign key B of r references the primary key A of s. Describe how the trigger mechanism can be used to implement the on delete cascade option, when a tuple is deleted ...Using the relations of our sample bank database, write an SQL expression to define the following views:a. A view containing the account numbers and customer names (but not the balances) for all accounts at the Deer Park ...Explain what is meant by repetition of information and inability to represent information. Explain why each of these properties may indicate a bad relationaldatabase design.Use Armstrong’s axioms to prove the soundness of the decomposition rule.Show that the decomposition in exercise is not a dependency-preserving decomposition.
Post your question