InnoDB is default and correct for almost all app tables. MyISAM lacks transactions/FK—legacy only.
Compare
| InnoDB | MyISAM |
|---|---|
| Transactions, FK | No transactions |
| Row-level locking | Table locks |
| Crash recovery | Repair tables risk |
Show engine
SHOW TABLE STATUS LIKE 'orders';
SHOW ENGINES;Practice: Run on practice.
Migrate engine
ALTER TABLE legacy_log ENGINE=InnoDB;
Important interview questions and answers
- Q: New tables MyISAM?
A: Avoid—InnoDB is default since MySQL 5.5+. - Q: Full-text?
A: InnoDB supports FULLTEXT indexes in modern versions.
Self-check
- Default engine for new apps?
- One MyISAM drawback?
Tip: ALTER … ENGINE=InnoDB before adding foreign keys to legacy tables.
Interview prep
- MyISAM transactions?
No—use InnoDB for app data.
- Show engine?
SHOW TABLE STATUS or SHOW CREATE TABLE.