Question: What does a foreign key do in a relational database?
Options:
Links two tables together
Defines a primary key
Indexes a table
Stores unique values
Correct Answer: Links two tables together
Solution:
A foreign key in a relational database links two tables together by referencing the primary key of another table.
What does a foreign key do in a relational database?
Practice Questions
Q1
What does a foreign key do in a relational database?
Links two tables together
Defines a primary key
Indexes a table
Stores unique values
Questions & Step-by-Step Solutions
What does a foreign key do in a relational database?
Foreign Key β A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table, establishing a relationship between the two tables.
Primary Key β A primary key is a unique identifier for a record in a table, ensuring that no two rows have the same key value.
Relational Database β A relational database is a type of database that stores data in structured formats using rows and columns, allowing for relationships between different data entities.
Soulshift FeedbackΓ
On a scale of 0β10, how likely are you to recommend
The Soulshift Academy?