Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started