Integrity Constraints


Question 1
Consider the following tables T1 and T2.

In table T1, P is the primary key and Q is the foreign key referencing R in table T2 with ondelete cascade and on-update cascade. In table T2, R is the primary key and S is the foreign key referencing P in table T1 on-delete set NULL and on-update cascade. In order to delete record (3,8) from table T1, the number of additional records that need to be deleted from table T1 is _____.
A
0
B
1
C
2
D
3
GATE CSE 2017 SET-2   Database Management System
Question 2
Let R(a,b,c) and S(d,e,f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider the following four operations R and S

I. Insert into R
II. Insert into S
III. Delete from R
IV. Delete from S

Which of the following can cause violation of the referential integrity constraint above?
A
Both I and IV
B
Both II and III
C
All of these
D
None of these
ISRO CSE 2016   Database Management System


Question 3
A locked database file can be
A
Accessed by only one user
B
Modified by users with the correct password
C
Used to hide sensitive information
D
Updated by more than one user
ISRO CSE 2009   Database Management System
Question 4
The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on-delete cascade.

The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (2,4) is deleted is:
A
(3,4) and (6,4)
B
(5,2) and (7,2)
C
(5,2), (7,2) and (9,5)
D
(3,4), (4,3) and (6,4)
GATE CSE 2005   Database Management System
Question 5
Let R(a, b, c) and S(d, e, f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider the following four operations R and S

I. Insert into R
II. Insert into S
III. Delete from R
IV. Delete from S

Which of the following can cause violation of the referential integrity constraint above?
A
Both I and IV
B
Both II and III
C
All of these
D
None of these
GATE CSE 1997   Database Management System


There are 5 questions to complete.

Leave a Comment