in Databases
1,987 views
2 votes
2 votes
Consider an empty relation R (AB) where A is  primary key and B is a foreign key referring the same relation R. Which of the following row sequence can be inserted into R ?

(A) (1,2) (2,3) (3,4) (4, 5)
(B) (1, NULL) (2,1) (4,3) (3,2)
(C) (1, NULL) (2,1) (3,2) (3,2)
(D) None
in Databases
2.0k views

2 Answers

2 votes
2 votes
( D ) SHOULD BE THE ANSWER
AS IT DOESNT VIOLATE REFERENTIAL INTEGRITY

C IS NOT THE ANS  AS PRIMARY KEY ARE UNIQUE VALUE .
edited by

1 comment

(3,2 ) , (3,2).  ???  A is a primary key right ??
1
1
0 votes
0 votes

D option should be answer 

3 Comments

but in B option (4,3) then after (3,2) is present.............i am saying that  earlier 3 is not present in PK  but after that is present .....
0
0
Wt u said is  correct thats why it is violation of referential integrity constraint why?

1 null ( allowed )

2 1(allowed)

4 3 ( problem is here because 3 is fk which is not allowed as it should be present as a primary key in relation R)
0
0
kkkk ...  i am not follow row sequence............thks
1
1