I read this article on good SQL naming conventions. It's easy to overlook a SQL naming convention. It's important, here's ours.
I like naming foreign keys like that because your schema becomes more predictable. You can know the columns in the table and instantly know the intent of the foreign keys. Just like an API, predictability is a big asset.

In my situation I wrote a service layer generator that reads the schema. So any naming or structure in the database instantly effects the API. This is the case at least at the beginning of the project. For that reason, bad decisions when naming database tables effect the entire architecture.

Any time you need a translation layer you are adding drag to the project. By translation layer I don't mean going from protocol X to protocol Y. I mean when you refer to something in the database and then give it a different name in the web-site this slows down your project. Every time a developer crosses that boundary they have to spin cycles translating concepts. Every time a developer that primarily works on the web-site has to talk to the service layer developers there is automatically a disconnect that must be surpassed before more valuable discussions can begin.

As in naming variables, creativity isn't needed. Save the creativity for when you really need it.
blog comments powered by Disqus