Question: Question 2 . Consider the following relations: Relation R 1 Relation R 4 Relation R 2 Relation R 5 Relation R 3 Primary Keys :
Question
Consider the following relations:
Relation R
Relation R
Relation R
Relation R
Relation R
Primary Keys :
Relation R: AB
Relation R: D
Relation R:
Relation R:
Relation R:
The following foreign key constraints are given for relations and :
references
references
references
references
references
Assume
"CASCADE" policy for delete operations, and
"SET NULL" policy for update operations.
a For the operations given below, indicate whether execution of the operation would violate some "primary key" or "integrity constraints". If your answer is yes, specify the constraints from the above list that would be violated.
i Insert tuple into R
ii Insert tuple into R
b For the operations given below, indicate whether execution of the operation would violate any foreign key constraints If your answer is yes, specify the constraints from the above list that would be violated. Apply CASCADE policy for delete operations, and apply SET NULL policy for update operations. Update the tables after applying those policies.
You may either redraw the tables or mention which tuplesattributes are deletedupdated at each table. For updates rewrite the updated tuples. Make the changes on the original tables for each operation below.
i Delete tuple d from R
ii Update tuple s in R with values
iii Update tuple s in R with values
c If all tuples in R are deleted, what tuples will R and R contain
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
