CBSE Class 12 Informatics Practices Question 20 of 79

MySQL SQL Revision Tour — Question 13

Back to all questions
13
Question

Question 10

How is FOREIGN KEY commands related to the PRIMARY KEY ?

Answer

FOREIGN KEY commands establish relationships between tables by linking columns in one table to the PRIMARY KEY or a unique key in another table. This linkage ensures referential integrity, meaning that values in the FOREIGN KEY column(s) of the referencing table must match values in the PRIMARY KEY or unique key column(s) of the referenced table. Therefore, FOREIGN KEY commands are directly related to PRIMARY KEY commands as they rely on the unique identification provided by PRIMARY KEY constraints in other tables.