MySQL's storage engine

Source: Internet
Author: User

For MySQL, what form of data is ultimately saved? And where does the data remain on the hard drive?

1. mysql Storage engine

MySQL is a data management system that includes a database, is responsible for storing data, and a database access management interface system that manages the database.

To meet different business needs, MySQL's database uses a variety of storage engines for data storage.

2. What is the storage engine?

The storage engine specifies the storage type of the table, that is, how the data is stored and indexed, whether transactions are supported, and so on. At the same time, the storage engine determines how the table is stored on the computer.

My MySQL Server version is 5.7, the supported storage engine is the following table, default is InnoDB

  

3, InnoDB and MyISAM the respective basic characteristics and use occasions:

MyISAM: does not require transaction processing to access the main application suitable for the use of the engine;

InnoDB: Supports transaction control and consumes more disk space than MyISAM. Suitable for frequent update, delete operation, but also the integrity of the transaction requirements are relatively high, need to implement concurrency control applications.

Function InnoDB MyISAM
Support Transactions Support Not supported
Support Full-Text indexing Not supported Support
FOREIGN KEY constraints Support Not supported
Table Space Size Larger Smaller
Data row Locking Support Not supported

  

4, in order to achieve special functions, you can specify a table's storage engine, so the table's storage engine can also be called the table type

CREATE TABLE ' MyISAM ' (ID INT (4)) Engine=myisam;

5. What is the MySQL data file? How is it stored?

Data files differ under different storage engines.

A, the location of the data file

The default storage location for different operating system data files is different, native:datadir=c:/programdata/mysql/mysql Server 5.7/data

  B, MyISAM type of table file, the data file has three kinds:

      • The. FRM table structure definition file, which is independent of the storage engine.
      • . MYI index file that holds the index information for the MyISAM type table.
      • . MYD data file, storing the data in the table

  

C, InnoDB type of table file

      • . frm
      • Ibdata1 data file, save data for all InnoDB type tables

  

  

MySQL's storage engine

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.