Here are a few things to consider when we make and name our new databases and tables.
All names (databases, tables, columns, etc) should be in lowercase.
Table names should be plural; for example,
Names with multiple words are separated by an underscore. For example:
If a join table doesn't have any meaning besides just joining two tables, use
table_name1_table_name2, with the names in alphabetical order. Example:
cuisines_restaurants would be a join table for the table
If the table has meaning besides just joining the table, use a name that describes the relationship. Example:
visits would be a good name for a join table that joins together a table called
people and a table called
If you add in a foreign key to your table (i.e. the column
list_id into the
tasks table), the foreign key is a singularized version of the table it represents. For example,