KnowledgeBoat Logo

Informatics Practices

Assertion. The PRIMARY KEY and FOREIGN KEY constraints are similar.

Reason. The FOREIGN KEY constraint links a column of a table with the PRIMARY KEY constraint of another table.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

SQL Queries

3 Likes

Answer

Both A and R are true but R is not the correct explanation of A.

Explanation
The PRIMARY KEY and FOREIGN KEY constraints are similar in that they both deal with unique identifiers. However, they serve different purposes, PRIMARY KEY uniquely identifies each record in a table while FOREIGN KEY establishes a relationship between two tables by linking a column (or set of columns) to the PRIMARY KEY of another table.

Answered By

1 Like


Related Questions