Let’s take a table that stores invoices. A lot of people would name that table “Invoices”.
Simple enough, but what about related tables?
A table that contains invoice line items may be called “InvoiceItems”. Let’s add a third called “InvoiceItemDetails”.
What you end up with now, is the following order:
Now your tables are in alphabetical order, but completely out of logical order. Invoices is the parent table, so it should come first, followed by InvoiceItems, and InvoiceItemDetails.
This is why I like using the singular:
Simply removing the “s” puts everything in logical order, the way they should be.
It’s a simple thing, but it makes it easier to find what you’re looking for.
I am a computer programmer specializing in building database software with ASP.NET MVC, C#, and SQL Server.
Naming Primary Keys