What is the primary role of referential integrity constraints in a relational…
2025
What is the primary role of referential integrity constraints in a relational database system?
- A.
To verify that values in a foreign key correspond to valid entries in the referenced primary key
- B.
To stop repeated values from being inserted into a column
- C.
To permit null entries in all columns of a table
- D.
To limit the total number of fields in a table
Attempted by 255 students.
Show answer & explanation
Correct answer: A
It is maintained using a Foreign Key, which points to a Primary Key (or a unique key) in another table (the referenced table). The constraint dictates that any value in the foreign key column must either exactly match an existing value in the referenced primary key column, or be completely NULL. This prevents "orphan records"—such as an order being placed for a customer ID that doesn't actually exist.