Question

Which of the following statements is true regarding a foreign key in a relational database?
Group of answer choices

They are required.

They are automatically indexed.

There can be only one per table.

Null values are allowed.

Answers

There are no human answers yet.
Answered by GPT-4o mini
The true statement regarding a foreign key in a relational database is:

**Null values are allowed.**

Foreign keys can accept null values unless explicitly defined otherwise. This means that a record can exist in a table without a corresponding record in the referenced table. Here is a brief clarification of the other options:

- **They are required.** - This is false because foreign keys can be nullable.
- **They are automatically indexed.** - This is also false; foreign keys are not automatically indexed, though indexing them can improve performance.
- **There can be only one per table.** - This statement is false; a table can have multiple foreign keys referencing different tables or even the same table in different relationships.

Related Questions