Ruby on Rails
InnoDB (Version #15)

InnoDB is one type of table engine available with MySQL.

Unlike those of the default MyISAM? engine, Inno DB tables support foreign key constraints, transactions, and row level locking.

Important feature: A rails specific major feature allowed (related to transactions) by InnoDB is the rollback support: Used in Testing Rails and In The Rails Console (./script/console).

To use Inno DB table, specify ENGINE=InnoDB when creating a table, for example:

CREATE TABLE customers (id INT, name VARCHAR (40), INDEX (id)) ENGINE=InnoDB;

If you set default-table-type = InnoDB in the [mysqld] section of my.cnf, all new tables will be InnoDB, instead of MyISAM.

More information is available in the MySQL Reference Manual :

InnoDB is one type of table engine available with MySQL.

Unlike those of the default MyISAM? engine, Inno DB tables support foreign key constraints, transactions, and row level locking.

Important feature: A rails specific major feature allowed (related to transactions) by InnoDB is the rollback support: Used in Testing Rails and In The Rails Console (./script/console).

To use Inno DB table, specify ENGINE=InnoDB when creating a table, for example:

CREATE TABLE customers (id INT, name VARCHAR (40), INDEX (id)) ENGINE=InnoDB;

If you set default-table-type = InnoDB in the [mysqld] section of my.cnf, all new tables will be InnoDB, instead of MyISAM.

More information is available in the MySQL Reference Manual :