Before foreign key constraints, table engine setting guidelines involving foreign key columns: Select an engine that supports foreign keys (InnoDB or TokuDB). Right-click the table on which you want to set the engine. Select "Table Options" and switch to the "Storage Engine" tab. Select an engine that supports foreign keys from the drop-down list. Apply changes.
Navicat engine settings before establishing foreign keys
Before establishing foreign key constraints in Navicat, you need to The storage engine of the table where the foreign key column is located is set to an engine that supports foreign keys.
Engine that supports foreign keys
Setting up the engine
Note:
Example
To set the column customer_id
in table customer
as the primary key, and then use To create a foreign key for column customer_id
in table order
, you need to first set the storage engine of the two tables to InnoDB:
customer
Table Setup Engine: Right-click customer
Table> Table Options> Storage Engine> InnoDBorder
table: Right-clickorder
Table> Table Options> Storage Engine> InnoDBThe above is the detailed content of What should navicat set the engine to before establishing foreign keys?. For more information, please follow other related articles on the PHP Chinese website!