[thelist] Database Naming Conventions

Canfield, Joel JCanfield at PacAdvantage.org
Wed Mar 15 13:41:31 CST 2006


> Anyone have any thoughts about this?

I disagree strongly with the prefixes (see quote below) somewhat with
the id names.

>From Joe Celko's "Ten Things I Hate About You"

"What you are doing is trying to expose the physical storage choices in
your logical data model all over again. And you are making your code
hard to read. Try to read "Paris in the Spring," "nounParis prepIn
artThe nounSpring" and see if the prefixes make it easier to understand;
now imagine that was a 20 word sentence with subclauses."

I daily work with both, and I detest, a lot, typing 'tbl_' in front of
the name in every single query. No one here can present a reasonable
argument for it; it was just their company's standard, and no one
questioned it.

I used to name my ids "EmployeeID" "PhoneID", etc. Now, they're named
"id" in their respective tables, and named with the table name in the
foreign tables. I'm not totally sold on this method, but it's working
for now.

spinhead



More information about the thelist mailing list