MySQLではデータベースの一貫性を保つため、 外部キー (Foreign Key) 制約がサポートされています。外部キーとは、 2つのテーブル (親テーブルと子テーブル) 間における参照整合性を保つために設定される制約です。InnoDBとNDBストレージエンジンのみで ...
The FOREIGN KEY constraint is used to enforce a link between the data in two tables. A foreign key in one table points to a primary key in another table, maintaining referential integrity.