137 views
1 votes
1 votes

Let $A (a, b, c)$ and $B(d, e, f)$ be two relations in which $d$ is the foreign key of $B$ that refers to the primary key of $A$.

Which of the following four operations on $A$ and $B$ will not cause a violation of the referential integrity constraint? (Mark all the appropriate choices)

  1. Insert into $A$
  2. Delete from $A$
  3. Insert into $B$
  4. Delete from $B$

1 Answer

Best answer
1 votes
1 votes
Foreign key in B is referring to the primary key in A. So, a referential integrity can be violated when

1. Insert happens on B - when the referred key value may not be in A

2. Delete happens on A - when the deleted key value is being referred by some B tuple

Delete from B and Insert into A cannot cause referential integrity violation.

Correct option: A; D
selected by
Answer:

Related questions

1 votes
1 votes
1 answer
1
gatecse asked Oct 8, 2020
188 views
The maximum number of super keys for the relation schema $R(A_{1},A_{2},A_{3},A_{4},A_5)$ with two candidate keys $A_{1}$ and $A_{2}$ is ________
1 votes
1 votes
1 answer
2
1 votes
1 votes
1 answer
3
gatecse asked Oct 8, 2020
76 views
The following table has two attributes $A$ and $B$ where $A$ is the primary key and $B$ is the foreign key referencing $A$ with on-delete cascade.$$\begin{array}{|c|c|} \...