Consider the following relational databse Branchbranchnamebr
Consider the following relational databse
Branch(branch_name,branch_city)
Customer(customer_number,customer_name,customer_city)
Loan(loan_number,branch_name,amount)
Borrower(customer_number,loan_number)
In the customer relation provide an example of a superkey which is not a candidate key(I think the answer should be (customer_number+customer_name),as the subset of this is a superkey .
For loan schema :Branch_name referencing branch and for borrower schema:attribute customer_name referencing customer and loan_number referencing loan are the foreign keys.
For each foreign key,explain a situation where deletion of a record will lead to violation of foreign key constraint
Solution
So a superkey is a combination of columns of a table that can uniquely identify a row in that table. Hence, in the customer table the superkey would be a combination of customer_number and customer_name.
Below cases would lead to a violation of foreign key constraint
