Considerations
- Create DB auditing columns that take care of setting themselves.
- Add comments to columns and tables. These can be seen with the
SHOW FULL COLUMNS fooscommand as well as in the table schema view of many SQL GUIs. Note that they do not appear in aDESC foos, which a provides subset of the information in the former command. - For modern, full UTF-8 support, use character set
utf8mb4and collationutf8mb4_unicode_ci. The default settings character settings are established by variables at the database and/or connection level, so if these are dumb you need to set up utf8mb4 for every table you create. Also note that different CLI and and GUI tools may use different character settings. - Especially for small tables, create covering indexes for the common lookups so that queries can read the needed data straight out of index, saving the trip to fetch the data from the table.