View the table type in Mysql InnoDB

Source: Internet
Author: User

Problem description:

MySQL Data Tables support six types: BDB, HEAP, ISAM, MERGE, MYISAM, and InnoBDB.

These six types are divided into two categories: transaction-safe, including BDB and InnoDB, And the other are in the second category, it is called non-transaction Security (non-transaction-safe ).

BDB is short for "Brekeley DB", which is the earliest type of Mysql table with transaction capabilities, developed by Sleepycat Software (http://www.sleepycat.com. It provides the transaction control capability, which ensures that all commands are successfully executed, or the results of all commands are rolled back when an error occurs in any command, it can be imagined that the transaction control capability in e-banking is very important. Supports COMMIT, ROLLBACK, and other transaction features. The latest version of Mysql has planned to remove support for BDB and develop InnoDB.

Solution:

The storage engine explains how to store data, create indexes for the stored data, and update and query data. Because data in relational databases is stored as tables, the storage engine can also be called the table type (that is, the type of storing and operating the table ).

InnoDB is a new transaction-safe storage engine used for transaction processing applications. It supports almost all the features of BDB and has many new features, including ACID transaction support.

Features:

Transaction Processing Mechanism
Support for external links
Immediate recovery after crash
Supports the foreign key function and cascading Deletion
Support concurrency
Storage Method on Hard Disk: InnoBDB frm

The latest version of Mysql has planned to remove support for BDB and develop InnoDB. InnoDB provides better support for Mysql features and is active in the development community.

MyISAM's default MySQL plug-in storage engine, which is based on the ISAM type, but it adds many useful extensions, it is one of the most commonly used storage engines in Web, data warehousing, and other application environments. Note: by changing the STORAGE_ENGINE configuration variables, you can easily change the default storage engine of the MySQL server.
Advantages:

1. Smaller than the ISAM table, with less resources
2. You can specify the type of binary porting table between different platforms when creating the table.

(1) view storage engines supported by the database

Command: show engines;

Note: shows the storage engine currently supported by mysql.

We can see that mysql 5.5 is used here, and InnoDB database engine is used by default, which is the security transaction engine.

(2) view the table structure

Command: desc table_name;

(3) display the table creation statement

Note:

The above shows the default table creation statement. As shown above, mysql5.5 uses the InnoDB Engine by default and uses UTF-8 encoding.

(4) display the current status value of the table

(5) engine for modifying database tables

Note: by default, the data table created by mysql5.5 is InnoDB. The structure information of the table is as follows:

Modify the database engine of a table

After modification, re-view the mysql database 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.