Consider the following statements S1 and S2 about the relational data model:…
2021
Consider the following statements S1 and S2 about the relational data model:
S1: A relation scheme can have at most one foreign key.
S2: A foreign key in a relation scheme R cannot be used to refer to tuples of R.
Which one of the following choices is correct?
- A.
Both S1 and S2 are true
- B.
S1 is true and S2 is false
- C.
S1 is false and S2 is true
- D.
Both S1 and S2 are false
Attempted by 1010 students.
Show answer & explanation
Correct answer: D
Answer: Both statements are false.
Key points:
S1 is false: A relation scheme can have zero, one, or many foreign keys. There is no restriction that limits a relation to at most one foreign key.
S2 is false: A foreign key may reference tuples of the same relation (self-referential foreign key). For example, Employee(emp_id, name, manager_id) can have manager_id as a foreign key referencing emp_id in the same Employee relation.
Because both statements are false, the correct choice is the one that states both statements are false.
A video solution is available for this question — log in and enroll to watch it.