Choosing good names for database objects
The easiest way to help other people understand a database is to ensure that all the objects have a meaningful name.
What makes a name meaningful?
Getting ready
Take some time to reflect on your database to make sure you have a clear view of its purpose and main use cases. This is because all the items in this recipe describe certain naming choices that you need to consider carefully given your specific circumstances.
How to do it…
Here are the points you should consider when naming your database objects:
- The name follows the existing standards and practices in place. Inventing new standards isn't helpful; enforcing existing standards is.
- The name clearly describes the role or table contents.
- For major tables, use short, powerful names.
- Name lookup tables after the table to which they are linked, such asÂ
account_status
. - For associative or linked tables, use...