Mysql engine problems, the primary key and foreign key creation issue, as well as create a foreign key is not successful, it created an index

mysql engine problems:

  We need to know three engines: InnoDB-- is a transaction processing engine that does not support full-text search, support transactional operations, namely DML operations;

            Memory-- is stored in a data memory, fast, MyIsam functionally equivalent, suitable for the temporary table;

            MyIsam-- is a high performance engine that supports full-text search, but does not support transaction processing, no declaration of default is when most of the engine! Generally, when not supported by this transaction is good!

When you create a table, the engine this one to be worthy of note, is doing the primary key and foreign key table when we must do the same primary key table engine and the foreign key table of engine cases, it should be inoDB engine, or outside key creation is unsuccessful, because of the way of business , the type of character length of the primary key field, and set the foreign key and must be consistent, otherwise it will lead to error can not create a foreign key table!

Guess you like

Origin www.cnblogs.com/qiaohechen/p/11332974.html