Database Fundamentals — Question 12

You have two tables named Salesperson and Sales.
You need to ensure that each record in the Sales table has a valid associated salesperson record in the Salesperson table.
Which database object should you add to the Sales table?

Answer options

Correct answer: C

Explanation

The correct answer is C, Foreign key, because it establishes a relationship between the Sales table and the Salesperson table, ensuring each Sales record references a valid Salesperson. A primary key (B) uniquely identifies records in a table but does not enforce the relationship with the Salesperson table. Nonclustered (A) and clustered indexes (D) improve query performance but do not enforce referential integrity.