Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm working with a DB2 database and I can't help but notice - these table and column names are really confusing!

I realize that good names are important in every facet of software development, and it's quite possible that the non-intuitive names are unique to my experience, but someone told me that DB2 places severe restrictions on table and column names.

Is this true?

Or could it be that DB2 admins have traditionally followed a certain naming convention that seems foreign to SQL Server veterans like myself?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Back in the old days of DB2 on AS/400 there was a limit to the name of the table. It was pretty short too, when I worked with one of these systems as an application developer it was a real pain.

However, it has been many years (possibly as many as 10) since this has been a contraint, and as far as I know it's not a contraint for DB2 on AIX either.

If these are tables being setup for your application and they are designing the tables ask that they use your names and column names. If you are accessing legacy systems or systems outside your control, it will be more of a challenge. I think they should be able to setup aliases at a minimum and if my memory is correct of AS/400 those aliases can be applied to column names as well.

In my case I also sat on the standards committee for IT and at the time everything in IT centered around the AS/400 platform and the standards reflected that. We were changing even then (2003 timeframe) to get away from these cryptic names though.

Good luck to you.

share|improve this answer
1  
Now if you want to talk either arrogance or just laziness, Oracle still has a limit of 30 characters on table names. –  Bill Leeper Oct 17 '11 at 14:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.