Db2 (On Premise and Cloud)

What’s in a Name? The Basis for Db2 Standards

By Martin Hubel posted 17 days ago

  

When Db2 first arrived in our shops in the 80s, IBM customers attended the two big IBM user groups (SHARE and GUIDE). These were the days before Red Books, IDUG and Technical Conferences, and local Db2 user groups were in their infancy. The people came to GUIDE and SHARE to learn what they could, to share experiences, and to write technical papers. One friend at GUIDE joked that many of us got our “PhD in Db2” by making significant contributions to these community written papers. We developed papers on just about every aspect of Db2 we could identify. IBM responded to GUIDE by sending 16 project representatives to support our efforts. At the time, a GUIDE project normally had about 20 members; the Db2 System Administration project had 400; such was the interest in Db2.

 

Everybody realized the importance of a good naming standard to support the Db2 environment, but writing a full paper would be difficult due to the wide variance in requirements. Rather than organizing a working group, we opted for 3 short presentations on naming standards in a single session.

 

One speaker was a well-known consultant who explained the importance and rationale for good naming standards. Another person also did a good job on explaining their standards. One of my most memorable presentations was the third, and the rationale rather said it all: “We couldn’t decide or how to name our tables, so we just numbered them: T1 through T60.” Yup, when faced with a difficult problem, we should just give up and use numbers. It turns out they were not alone; over the years, I have seen about five organizations use this approach. Each company has only about 60 tables in their database, and this seems to be the practical numerical limit if meaningful names escape you.

 

Humor and bad choices aside, naming standards are a valuable foundation. They provide a basis for common understanding of Db2 objects and support the use of automation for administrative tasks. Automation is a future topic.

 

As for some naming considerations, meaningful names for tables, columns and indexes are the best option in my opinion. For system and infrastructure items, some important object name can only have a length of 8 bytes. These include such things as databases   user names, and subsystem or instance names. A variety of identifying attributes include:

 

Application name

Component ID

Database purpose (production, test, QA or development)

Customer name

Region or country

Instance number

 

With the number of possible combinations an organization can face, a great deal of discussion is possible. Small things, such as the number of characters to use to identify an individual application, can lead to lengthy discussions. While it is important to “get it right”, it is just as important to spend your time wisely and not use it all on points that can be somewhat arbitrary when viewed long term.

 

About Martin Hubel

 

I am an IBM Champion and Gold Consultant. My Db2 industry activities include being the host of the Db2Night Show, a member of the IDUG Volunteer Hall of Fame, an active IDUG speaker of over 50 presentations over the past 30 years, a panelist, an author, and a member on the executive of the Central Canada Db2-IMS Users Group.

 

0 comments
6 views

Permalink