Pages

Discuss the difference between the InnoDb and MyISAM. Why would you use one over the other when creating a table?



InnoDB and MyISAM are both storage engines for MySQL with their Pros and Cons.
InnoDB:
  1. gives ACID property with transaction support.
  2. Lock are integerated at row level such that a query working on one row will not lock the entire table from letting other query work on other row.
  3. Supports Foriegn Key constraints
  4. Resistive to table corruption
  5. buffer pools and indexes are very large

MyISAM:
  1. Supports full text search
  2. Easy to learn for beginners
  3. Faster than InnoDB due to table level locks
  4. Completey read intensive.

MyISAM is used when your application doesn't have too many CRUD operations, which in later stages of application development may become troublesome to manage. Although obsolete, MyISAM is still preffered for development of many applications due to its speed.
On the other hand, InnoDB is more secure and reliable in terms of data protection. Due to row level locks, all the ACID and CRUD operations can be performed smoothly without worrying about locks on table. Although  previous versions of InnoDB did not support full-text search feature, MySQL 5.6 and above have incorporated this feature. This allows full text search features to be built effectively and creatively in the application.


Original from CoachCrocodile

No comments:

Post a Comment