Back (Current repo: scraps)

random scraps and notes that are useful to me
To clone this repository:
git clone https://git.viktor1993.net/scraps.git
Log | Download | Files | Refs

what_is_foreign_key.txt (407B)


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.