DeptID in Employees is a foreign key, referencing DeptID in Departments.
Ensuresreferential integrity→ DeptID in Employeesmust existin Departments.
Why Other Options Are Incorrect:
Option A (Super key) (Incorrect):Asuper keyis any set of columns that uniquely identifies a row, but itdoes not reference another table.
Option B (Simple key) (Incorrect):Asimple keyis asingle-column primary key, not a reference to another table.
Option C (Composite key) (Incorrect):Acomposite keyconsists ofmultiple columnsbut does not necessarily reference another table.
Thus, the correct answer isForeign key, as it establishes aconnection between two tables.
[Reference:SQL Foreign Keys and Referential Integrity., ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit