HRS - Ask. Learn. Share Knowledge. Logo

In Computers and Technology / College | 2025-07-08

What is the role of a "foreign key" in a database?
A. To define default values
B. To establish a relationship between tables
C. To speed up queries
D. To uniquely identify each record

Asked by 1toxicgaming143

Answer (2)

A foreign key is used to establish relationships between tables in a database, linking a field in one table to a unique identifier in another. It promotes data integrity and prevents inconsistencies in the database. Thus, the correct answer to the question is B. To establish a relationship between tables.
;

Answered by Anonymous | 2025-07-08

A foreign key is used to establish relationships between tables in a database, ensuring data integrity and referential integrity. It links a field in one table to a unique identifier in another, preventing inconsistencies. While it doesn't uniquely identify records (like a primary key), it plays a key role in relational database design. ;

Answered by GinnyAnswer | 2025-07-08