Q17
What is the role of a foreign key in a relational database?
A.
To prevent unauthorized access
B.
To ensure data integrity and relationships
AnswerC.
To index the database table
D.
To encrypt data
Answer: Option B
Solution
Answer: Option B
Solution:
A foreign key is used to establish relationships between tables, ensuring data integrity and referential integrity.