engineering computer science MCQ #718

What is the purpose of the FOREIGN KEY constraint in a database table?

engineering computer science MCQ #718

  1. Question 1

    Q1. What is the purpose of the FOREIGN KEY constraint in a database table?

    • A) To establish a relationship between tables
    • B) To enforce data consistency
    • C) To improve query performance
    • D) To store data

    Answer: To establish a relationship between tables

    Explanation: The FOREIGN KEY constraint establishes a relationship between tables, ensuring that data in one table is consistent with data in another table.