Foreign keys are a controversial topic. MySQL and MariaDB implementation has several bugs and limitations, that are discussed here.
MySQL transactions can be read only. Here’s how to use them, and why they are useful.
In MySQL and MariaDB, all tables should have a primary key – especially InnoDB tables – this is almost common wisdom. But why? Let’s discuss the reasons.
When creating indexes, some common mistakes should be avoided.
How primary key are implemented in InnoDB, and how to build fast primary keys.