It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Names and Performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Names and Performance" Watch "Names and Performance" New topic

Names and Performance

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I'll apologize ahead of time if any of you are corporate data modelers, but ours have evolved a set of naming standards that make me want to chew my leg off to get away. Most of them seem to be about shortening names as much as possible. There are several pages of accepted abbreviations, like stts for status.

Does the database perform any differently at all with shorter names? I started with DB2 when Date's Guide to DB2 first edition was current, and there might have been some real limits on name lengths then. Are there still such limits? Any good reasons we don't name db columns just like Java fields - to try to communicate something? Don't the Rails (and other automated OR) users do that?

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

There are limits. Your database's documentation will mention them. For Oracle it is (or was?) 30 chars.

But I haven't ever seen measurable impact of using full-blown fieldnames.
We do abbreviate item_id, cust_no, and the like, but always strive for meaningfull, readable names.

Regards, Jan

OCUP UML fundamental and ITIL foundation
I agree. Here's the link:
subject: Names and Performance
It's not a secret anymore!