Database Naming Conventions
I'm the kind of guy that likes building the database and data modeling as early as possible in a project. Last night, I started building a database for my DevCampus project, and as I started naming the fields I realized that I've never really developed my own naming conventions for tables, columns, views, stored procs, indexes, or relationships. Not that this is bad, per se, I mean it's never really been an issue for the projects I've done. That said, I'd like to establish some kind of consistent nomenclature for my database objects.
I've seen and used many different naming conventions over the years. I've gone overboard before, giving a primary key column a name like “COL_PK_INT_DOCUMENT_ID“, until I found out the Oracle doesn't like it when you give things a name with more than 32 characters. Knowing that scared me into naming that same field “ID“ the next time around. I guess the best way to go is to find some middle ground on the names. I want names that are descriptive enough so that I won't be wondering what type of data it is or what kind of object it is, but at the same time I don't want names that turn my typical SQL queries into long paragraphs.
What naming conventions would you reccomend for database objects?