I think this is a more reasonable solution
Explanation:
S1: A foreign key declaration can always
be replaced by an equivalent check
assertion in SQL.
False:
Check assertions are not sufficient to replace foreign key. Foreign key declaration may have cascade delete which is not possible by just check insertion.
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)
False:
Foreign key in one table should uniquely identifies a row of other table. In above table definition, table S has a foreign key that refers to field ‘a’ of R. The field ‘a’ in table S doesn’t uniquely identify a row in table R.
Take an example
R
S
Now, here in S, attribute A alone cannot be used to uniquely identify a particular row in R. Hence S2 is false.
Hence (D) is the answer.