192k views
1 vote
Which of the following options provides the correct definition of a foreign key?

1) An attribute that uniquely identifies a record in a table
2) An attribute that is part of a composite primary key
3) An attribute that is specified as a search field so is used to build an index to speed up searching
4) An attribute that is used to link to another table through a matching value in a primary key field

1 Answer

2 votes

Final answer:

A foreign key is an attribute used to link two tables in a relational database, where it matches a primary key in a different table.

Step-by-step explanation:

The correct definition of a foreign key is option 4: An attribute that is used to link to another table through a matching value in a primary key field. A foreign key is a column or set of columns in a relational database table that provides a link between data in two tables. It does this by holding a value that matches a primary key in another table, ensuring referential integrity by enforcing a relationship between the data in the two tables.

User Sergey Tsypanov
by
7.8k points