Integrity Constraints questions

Q65

GATE CS 2026 CS-1Relational DesignNAT2 marks
Consider a relational database schema with a relation R(A,B,C,D)R(A, B, C, D). If {A,B}\{A, B\} and {A,C}\{A, C\} are the only two candidate keys of the relation RR, then the number of superkeys of relation RR is ______. (answer in integer)
Show answer without attempting

Answer: 6

Q19

GATE CS 2017 CS-2Relational DesignNAT1 mark
Consider the following tables T1 and T2.

T1:
PQ
22
38
73
58
69
85
98
T2:
RS
22
83
32
97
57
72
In table T1, P\mathbf{P} is the primary key and Q\mathbf{Q} is the foreign key referencing R\mathbf{R} in table T2 with on-delete cascade and on-update cascade. In table T2, R\mathbf{R} is the primary key and S\mathbf{S} is the foreign key referencing P\mathbf{P} in table T1 with on-delete set NULL and on-update cascade. In order to delete record (3,8)(3,8) from table T1, the number of additional records that need to be deleted from table T1 is ____________.
Show answer without attempting

Answer: 0.0

Q22

GATE CS 2014 CS-2Relational DesignNAT1 mark
Given an instance of the STUDENTS relation as shown below:
StudentIDStudentNameStudentEmailStudentAgeCPI
2345Shankarshankar@mathX9.4
1287Swatiswati@ee199.5
7853Shankarshankar@cse199.4
9876Swatiswati@mech189.3
8765Ganeshganesh@civil198.7
For (StudentName, StudentAge) to be a key for this instance, the value X should NOT be equal to _______________.
Show answer without attempting

Answer: 19

Q22

GATE CS 2014 CS-1Relational DesignMCQ1 mark−1/3 if wrong
Given the following statements:

S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL.

S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition.
CREATE TABLE S (
  a INTEGER,
  d INTEGER,
  e INTEGER,
  PRIMARY KEY (d),
  FOREIGN KEY (a) references R
)
Which one of the following statements is CORRECT?
Show answer without attempting

Answer: D

Q43

GATE CS 2012 CSRelational DesignMCQ2 marks−2/3 if wrong
Suppose R1(A‾,B)R_1(\underline{A}, B) and R2(C‾,D)R_2(\underline{C}, D) are two relation schemas. Let r1r_1 and r2r_2 be the corresponding relation instances. B is a foreign key that refers to C in R2R_2. If data in r1r_1 and r2r_2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?
Show answer without attempting

Answer: A

0/50 correct0 marks

Related topics in Relational Design