Why does the MySQL table correspond to only one. frm file without the. MYD and. MYI files?

Source: Internet
Author: User

Why does MySQL table correspond to only one. frm file, no. MYD and. the MYI file learned MySQL today and found that when creating a new database table, the table only corresponds to one. frm file, but no. MYD and. MYI file. 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. So generate. MYD and. MYI file, you only need to explicitly specify the database storage engine when creating a 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 Type: 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 (BDB) database engines are both direct products that create MySQL flexibility 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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.