Why does the MySQL table correspond to only one. frm file without the. MYD and. MYI files bitsCN.com?
Why does the MySQL table correspond to only one. frm file without the. MYD and. MYI files?
Today, when I was studying MySQL, I found that when I created a database table, the table only corresponds to one. frm file, but there were no. MYD and. MYI files.
After some searching, I found that the default database storage engine used for my local MySQL storage table is InnoDB, but the InnoDB storage engine is not generated. MYD and. MYI file.
To generate the. MYD and. MYI files, you only need to explicitly specify the database storage engine when creating the table. The following is an example of a table creation statement:
[SQL]
Create table testDb1 (columnName varchar (50) engine = MyISAM;
To view the storage type of an existing table, run the following command:
[SQL]
Show create table tableName/* where tableName corresponds to the table name */
The following describes the mysql database table types:
MyISAM:
ISAM is a well-defined and time-tested data table management method. it is designed to take into account that the number of database queries is much larger than the number of updates. Therefore, ISAM performs read operations quickly without occupying a large amount of memory and storage resources. The two major disadvantages of ISAM are that it does not support transaction processing or fault tolerance: if your hard disk crashes, data files cannot be recovered. If you are using ISAM in a key task application, you must always back up all your real-time data. with its copy feature, MySQL can support such backup applications.
MyISAM emphasizes fast read operations, which may be the main reason why MySQL is so favored by Web development: in Web development, a large number of data operations you perform are read operations. Therefore, most VM providers and Internet platform providers (Internet Presence Provider, IPP) only allow the use of MyISAM format.
InnoDB and Berkley DB
InnoDB and Berkley DB (BDB) database engines are both direct products that make MySQL flexible technology. this technology is MySQL ++ API. When using MySQL, almost every challenge you face comes from the fact that the ISAM and MyISAM database engines do not support transaction processing or foreign keys. Although it is much slower than ISAM and MyISAM engines, InnoDB and BDB include support for transaction processing and foreign keys, both of which are not available in the first two engines. As mentioned above, if your design requires one or both of these features, you will be forced to use one of the two engines.
In non-InnoDB tables, MySQL will ignore the foreign key... references modifier. Therefore, only in the InnoDB table can the foreign key (foreign key) be created successfully)
BitsCN.com