Q: What is a Foreign Key in MariaDB?

A: A foreign key is a column in one table that links to the primary key in another table, establishing a relationship between the two and enforcing data integrity. The main purpose of this is to prevent the appearance of orphaned records. If one wishes to delete a record from the main table, then the corresponding data must first be purged from the satellite tables.
