Consider the following statements and about the relational data model:
- : A relation scheme can have at most one foreign key.
- : A foreign key in a relation scheme cannot be used to refer to tuples of
Which one of the following choices is correct?
View worked solution
Answer: D
To determine the correctness of the statements, let us analyze them individually:
- Statement : "A relation scheme can have at most one foreign key."
Analysis: This statement is false. A relation can have multiple foreign keys referencing different relations (or even the same relation).
Example: Consider anEnrollmentrelation:
Here, is a foreign key referencing the relation, and is another foreign key referencing the relation. - Statement : "A foreign key in a relation scheme cannot be used to refer to tuples of ."
Analysis: This statement is false. A relation can contain a self-referencing (recursive) foreign key that references its own primary key.
Example: Consider anEmployeerelation:
Here, is a foreign key that references within the same relation, representing the hierarchical relationship where a manager is also an employee.
Since both statements and are false, the correct choice is D.
Free practice · Your answers on this page are not saved.
