A foreign key is a column or a set of columns in one table that references the primary key of another table. It is used to create a link and relationship between tables in a relational database. A foreign key ensures that the values in the referencing table match the values in the referenced table, thus maintaining the referential integrity of the database12. A foreign key can also be used to implement constraints such as cascading updates or deletes3. References: 1: CITM Study Guide, Chapter 3: Database Management Systems, Page 41. 2: Types of Keys in Relational Model (Candidate, Super, Primary, Alternate and Foreign) 3: Database Keys: The Complete Guide (Surrogate, Natural, Composite & More)
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