1.

If a1, a2, a3 are attributes in a relation and S is another relation, which of the following is an incorrect specification of an integrity constraint?(a) primary key(a1, a2, a3)(b) primary key(a1)(c) foreign key(a1, a2) references S(d) foreign key(a1, a2)This question was addressed to me during an interview.I want to ask this question from SQL Data definition in chapter Introduction to Relational Model and Sql of RDBMS

Answer»

Right answer is (d) foreign key(a1, a2)

Explanation: WHENEVER the integrity constraint foreign key is MENTIONED, the attributes that are the foreign KEYS should always be referenced from the RELATION in which they are PRIMARY keys.



Discussion

No Comment Found

Related InterviewSolutions