Which is better MyISAM or InnoDB

InnoDB - The Best MySQL Storage Engine?

Any InnoDB table arranges the data on the data carrier. This makes access a little slower, but much more secure, since each table is optimized with a primary key. The data selection is relatively faster, but inserting and updating is slower. Therefore, InnoDB is particularly suitable as a MySQL storage engine for large databases and especially when a lot of data is linked.

As already mentioned, the data of a transaction are related at InnoDB. When data is deleted, InnoDB automatically deletes all referenced data as well. That makes it much easier for the user to do the referential integrity of the database to be observed. However, this referential integrity must be specified in advance, otherwise it will not be maintained automatically. In the same way, for example, write access to data records can also be blocked.

The table structure of InnoDB is in frm files, User data and indexes are stored in a table space that is connected to the database and can extend over one or more files. Referential integrity also applies here: The configuration of the tablespace can be distributed in different directories, but this must be set at the beginning of the work and cannot be adjusted afterwards. You have to imagine working with an InnoDB table like working with a hard disk partition, where subsequent adjustments can lead to data loss.