...
Database-Management-System
August 29, 2024
Stop-and-Wait-ARQ
August 29, 2024
Database-Management-System
August 29, 2024
Stop-and-Wait-ARQ
August 29, 2024

Database-Management-System

Question 301
Consider a relation R(A,B) and primary key is A and B is a foreign key referencing
to A. Which of the following row sequences can be inserted into R.
A
(a1,a2)(a2,a3) (a3,a4)a4,a5)
B
(a1,null) (a2,a1) (a3,a2) (a4,a5)
C
(a1,null) (a2,a1)(a4,a3) (a3,a2)
D
None of the above can be inserted
Question 301 Explanation: 
Let’s check option wise,

A) (a1, a2) can’t be inserted because B is foreign key referencing A and A do not contain a2, so (a1, a2) can’t be inserted.

B) (a1, Null) is inserted.

(a2, a1) is inserted, since a1 is present in A.

(a3, a2) is inserted, since a2 is present in A.

(a4, a5) can’t be inserted because a5 is not present in A.

C) (a1, Null) is inserted.

(a2, a1) is inserted, since a1 is present in A.

(a4, a3) can’t be inserted because a3 is not present in A.

Hence, none of the given sequences can be inserted.
Correct Answer: D
Question 301 Explanation: 
Let’s check option wise,

A) (a1, a2) can’t be inserted because B is foreign key referencing A and A do not contain a2, so (a1, a2) can’t be inserted.

B) (a1, Null) is inserted.

(a2, a1) is inserted, since a1 is present in A.

(a3, a2) is inserted, since a2 is present in A.

(a4, a5) can’t be inserted because a5 is not present in A.

C) (a1, Null) is inserted.

(a2, a1) is inserted, since a1 is present in A.

(a4, a3) can’t be inserted because a3 is not present in A.

Hence, none of the given sequences can be inserted.

Leave a Reply

Your email address will not be published. Required fields are marked *