First I have been working with, creating modifying and generally entrenched in database design for about the past 7 years. I have been able to experience the sometimes problematic symptom of feeling experiences that causes a person to “fall in love with” the ways that things are currently done. I have gotten into a groove as it pertains to how I do things. I am biased and somewhat cemented in my ideas. This is now a problem.

Table naming conventions is one area that I think I need to bend. 6 Months ago if asked (and I am asked a lot) I would have presented tables as Customers, Orders, Cust_Orders. The fields in Customers being Customerid, firstname, lastname and so on until I had distinct names for each field in that particular entity. In the Orders table I would then have:

Orderid
Customerid
orderdate

CustomerID in the Orders table would have been a foreign key to the customerid in the customers table.

Well there is a problem here. If I were to write the following query I would have a problem:

Select customerid, orderdate from customers left outer join orders on orders.customerid = customers.customerid

See the problem? The fact that there is a problem isn’t actually what I am getting at. The fact that the problem is hard to notice is the main issue. The problem with the query above would be apparent when the query was run against the target database, but that is arguable later than it could be.

I could fix the query by entering:

Select customers.customerid, orderdate from customers left outer join orders on orders.customerid = customers.customerid

See the difference? So my argument 6 months ago would have been to not worry about it because the solution is apparent. The following link would seem to back me up on the plural table names (to which I still agree).