Cascading, Restriction, and Nullification can be used to enforce the referential
ID: 3590661 • Letter: C
Question
Cascading, Restriction, and Nullification can be used to enforce the referential integrity constraint. “Country_Name” column in R1 is a primary key. “Country” column in R2 is a foreign key with reference to “Country_Name” column in R1.
R2: Employee R1: Country
Foreign Key(wrt Country) PK
SS#
Name
Country
Country_name
Population
123
John
US
France
1 mil
231
Steve
USSR
USSR
3 mil
111
Mary
US
US
4 mil
In cascading, if I want to change “US” in R1 to “USA”, what will happen to the values in “Country” column in R1? You can mark it to the relation below:
SS#
Name
Country
123
John
US
231
Steve
USSR
111
Mary
US
In restriction, if I want to change “US” in R1 to “USA”, what will happen to the values in “Country” column in R1? You can mark it to the relation below:
SS#
Name
Country
123
John
US
231
Steve
USSR
111
Mary
US
In restriction, if I want to change “France” in R1 to “FR”, can I go ahead and make the change in R1?
YES [ ] NO [ ]
In nullification, if I want to change “USSR” in R1 to “Russia”, what will happen to the values in “Country” column in R1? You can mark it to the relation below:
SS#
Name
Country
123
John
US
231
Steve
USSR
111
Mary
US
SS#
Name
Country
Country_name
Population
123
John
US
France
1 mil
231
Steve
USSR
USSR
3 mil
111
Mary
US
US
4 mil
Explanation / Answer
1)In cascading if i want to change the Primary key i.e country it will change the foreign key values at the Employee table as well due to the Cacading effect
So the table will become:
2)In restriction if i want to change the Primary key i.e country it will not allow change it rejects the update operation for the Country table as there is a related foreign key value in the referenced Employee table.
So the table will remain:
In restriction, if I want to change “France” in R1 to “FR”, can I go ahead and make the change in R1?
YES [ y ] as France is not used as a foreign key in Employee table.
3)In nullification if i want to change the Primary key i.e country it will set the corresponding foreign key value to NULL in the referenced Employee table.
So the table will become:
SS# Name Country 123 Jhon USA 231 Steave USSR 111 Mary USARelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.