What is the purpose of a foreign key in a relational database?

Practice Questions

1 question
Q1
What is the purpose of a foreign key in a relational database?
  1. To uniquely identify a record
  2. To create a relationship between two tables
  3. To enforce data integrity
  4. All of the above

Questions & Step-by-step Solutions

1 item
Q
Q: What is the purpose of a foreign key in a relational database?
Solution: A foreign key serves to create a relationship between two tables and enforce data integrity by ensuring that the value in one table corresponds to a valid record in another.
Steps: 5

Related Questions

Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely