my dog learned polymorphism*
The moose likes JDBC and the fly likes Naming Standard Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Naming Standard" Watch "Naming Standard" New topic
Author

Naming Standard

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Is there a naming standard for database, table, and field names? Different projects all seem to do things a little bit differently and I was wondering if there was some sort of industry standard or not.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I found this which is pretty good reading, but it is just someone's weblog (opinion) on the subject. I'd like to know if there is anything more concrete.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

Gregg,
We have company naming standards, but that's not much better than project ones. There are some things that are common across most or all standards (like underscores in the names.) However, I don't think there is one standard. Look at all the different coding standards for Java!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
what i have come across is,

- underscores as a seperator in table and field name
- all caps in table and field names
- no standard naming for database name

i know it does matter, but does it really matter? i mean field names and table names are not case sensitive, though.
[ October 21, 2004: Message edited by: adeel ansari ]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That link is pretty good Gregg. There's a few things in there I'd disagree with (plural entity names drive me up the wall for example, but I'm well aware that is just a personal peculuarity), but that's true with every "standard" I've ever read.

We too have company defined standards. But we use them for a slightly different purpose - namely to remind developers that we support 5 different DB platforms. Standards are essential if you are doing that - there's lots of gotchas, like DB2 only supporting an object name length of <= 18 characters. I think they are less necessary otherwise. I'd be happy to see models defined anyway the DBA liked so long as the naming convention is internally consistant.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Thanks for the information. Luckily I only have to concern myself with one db vendor, so I've got it fairly easy. I guess I'll just create my own standard based on what I like from everyone else's standard and just be consistant with that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Naming Standard