The application I am creating uses mostly selects but some are inserts, updates, etc. I was wondering which is the best for performance under these circumstances.
Secondly, when I have two tables related in innodb, how do I delete a row if it related to a row in another table without it spitting out errors?
And lastly, if I insert into one table, will it automatically fill in the foreign key of the related table or do I have do program this in?
This application is written in PHP.
Thanks
Purely performance-wise MyISAM historically (had?) the edge over InnoDB.
But considering that MyISAM does not fully support referential integrity constraints and transactions and used / uses table level locking I would definitely go for InnoDB. What you are risking is data integrity here, and you’d need a special scenario to warrant a need for MyISAM in my honest opinion.
Regarding your questions considering related tables: just give the wanted
cascadeoptions to your foreign key constraints.