Yet another article comparing two database features. This time the different between the two storage engines MyISAM and InnoDB from MySQL will be compared, so you can choose which one you should choose for your project.
Some fast facts:
- InnoDB supports foreign keys
- InnoDB implements row-level lock for inserting and updating while MyISAM implements table-level lock!
- InnoDB supports transactions
- MyISAM has full-text search index which InnoDB doesn’t have
InnoDB should always be used if data integrity is a priority because of the support for relationship constraints and transactions and for projects which are very write intensive because the row-level locking doesn’t freeze concurrent inserts and updates.
MyISAM is more easy to design for beginners as you don’t have to worry about foreign relationships. As result of the more simpler structure of MyISAM it is in the end, specially for reads faster then InnoDB does.
If the integrity of your data is not importent and you need only very fast reads on a read-only database it can still be usefull to use the old MyISAM storage engine. For all other cases you should always use InnoDB.