FC0-U61 · Question #652
A user wants to create a link between two tables in a database. Which of the following is the user MOST likely to use?
The correct answer is C. Foreign key. To establish a link between two tables in a database, a user will primarily employ a foreign key.
Question
A user wants to create a link between two tables in a database. Which of the following is the user MOST likely to use?
Options
- APrimary key
- BIndex
- CForeign key
- DConstraint
How the community answered
(29 responses)- A7% (2)
- B3% (1)
- C86% (25)
- D3% (1)
Why each option
To establish a link between two tables in a database, a user will primarily employ a foreign key.
A primary key uniquely identifies each record within a single table and is referenced by foreign keys, but it does not itself create the link between two different tables.
An index is used to improve the speed of data retrieval operations but does not define relationships or links between tables.
A foreign key is a field in one table that uniquely identifies a row in another table, establishing a relationship between the two. It references the primary key of the parent table, ensuring referential integrity and consistency across related data.
A constraint is a general rule applied to data, and while a foreign key is a type of constraint, 'Foreign key' is the specific mechanism for linking tables.
Concept tested: Relational database table relationships
Source: https://learn.microsoft.com/en-us/sql/relational-databases/tables/primary-and-foreign-key-constraints?view=sql-server-ver16
Topics
Community Discussion
No community discussion yet for this question.