In this article, We’ll see what is the difference between MyISAM vs InnoDB in MySQL ?
InnoDB and MYISAM, are storage engines for MySQL.
InnoDB is a storage engine for the database management system MySQL. MySQL 5.5, Dec 2010, and later use it by default replacing MyISAM. It provides the standard ACID-compliant transaction features, along with foreign key support (Declarative Referential Integrity).
MyISAM was the default storage engine for the MySQL relational database management system versions prior to 5.5 released in Dec 2009. It is based on the older ISAM code, but it has many useful extensions and each MyISAM table is stored on disk in three files (if it is not partitioned). MyISAM uses a .frm file to store the definition of the table, but this file is not a part of the MyISAM engine; instead it is a part of the server. The data file has a .MYD (MYData) extension. The index file has a .MYI (MYIndex) extension.
MYISAM:
- MYISAM supports Table-level Locking
- MyISAM designed for need of speed
- MyISAM does not support foreign keys hence we call MySQL with MYISAM is DBMS
- MyISAM stores its tables, data and indexes in diskspace using separate three different files. (tablename.FRM, tablename.MYD, tablename.MYI)
- MYISAM not supports transaction. You cannot commit and rollback with MYISAM. Once you issue a command it’s done.
- MYISAM supports fulltext search
You can use MyISAM, if the table is more static with lots of select and less update and delete.
INNODB:
- InnoDB supports Row-level Locking
- InnoDB designed for maximum performance when processing high volume of data
- InnoDB support foreign keys hence we call MySQL with InnoDB is RDBMS
- InnoDB stores its tables and indexes in a tablespace
- InnoDB supports transaction. You can commit and rollback with InnoDB
That’s it!. Please share your thoughts or suggestions in the comments below.