Author Topic: MyISAM acting as InnoDB  (Read 299 times)

0 Members and 1 Guest are viewing this topic.

Offline cwscribnerTopic starter

  • Enthusiast
  • Posts: 151
  • Gender: Male
    • View Profile
MyISAM acting as InnoDB
« on: June 15, 2010, 10:27:26 AM »
Hi all.

I found a previous thread on here with someone asking about MyISAM vs InnoDB(I have this same question).  After reading through the thread, the basic conclusion was that even though MyISAM doesn't have direct support for foreign keys, you can manually set up MyISAM to enforce/cascade the updates and deletes.  Am I on the right track here or am I still missing some vital info?  And am I okay sticking with MyISAM even though I'm using foreign keys, or should I switch to InnoDB?

Offline ignace

  • Guru
  • Freak!
  • *
  • Posts: 5,093
  • Gender: Male
    • View Profile
Re: MyISAM acting as InnoDB
« Reply #1 on: June 15, 2010, 02:22:36 PM »
MySQL is great for most applications and it's very fast. They provide InnoDB for each application that requires some minimal data constraints (beyond indexes) on a database-level. When however your data-constraints become more and more important in an application, you'll find that MySQL is no longer your best option and most would switch to PostGreSQL. I'm no database expert of course. I'm just telling you what I've learned over the years.
Developer from Belgium, Vlaams-Brabant

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: MyISAM acting as InnoDB
« Reply #2 on: June 15, 2010, 03:00:52 PM »
The difference is, when using MyISAM, you need to write your connstraint logic yourself, which has several drawbacks (you're likely to introduce bugs, it will be separated from database, etc..). With InnoDB, you're using well known and tested code (made in Oracle BTW ;) ) to do same thing.

FK Constraints is not the most important difference between MyISAM and InnoDB. InnoDB is fully ACID compliant, which has several benefits: you can use transactions to avoid race conditions, InnoDB tables are crash safe (no more REPAIR TABLE).

InnoDB also seems to be getting more and more efficient with each new version, although the results will vary greatly depending on usage (mostly on writes/reads ratio for a table).
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading