[AccessD] Names or numbers?

Arthur Fuller artful at rogers.com
Wed Aug 4 11:53:49 CDT 2004


Well said, Charlotte.

I would add that the definition of any column whose subcolumn positions
"mean" something is by definition a violation of the standard normal
forms. Each column/value should contain precisely one unit of
information. Subsetting a column into sub-columns is IMO always wrong.
For example:

Value: XLW0001

Where XL means Extra Large and W means white.

Wrong, wrong, wrong, IMO! This is what columns are for! Even supposing
that you might want to search for "XLW", that simply means that you
search two columns not one -- i.e. it's in interface issue not a
database design issue.

Re: your comments regarding autonumbers, I agree 1000%. Gaps are an
attempt to insert meaning where none ought to reside. Imagine a chicken
farmer trying to create meaningful PKs for the eggs laid by her 10,000
chickens. All I want is a bloddy omelet! Hee hee hee.

Arthur

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Wednesday, August 04, 2004 11:58 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Names or numbers?


You seem to be stuck in the perennial argument about meaningful vs
meaningless keys.  I agree that keys that are never exposed to the user
should be autonumbers or their equivalent.  I'm not sure I understand
what you mean by "naming details"?  You don't name records, you create
keys for them.  Personally, I prefer meaningless keys, because those are
used internally by the DBMS, not by humans.  They are used to create and
enforce relationships, while some human-friendly value (like an
agreed-upon code) is used to provide something the user can recognize
for other purposes.  If you are working in the tables themselves, you're
the one who is wrong because that is a good way to destroy the integrity
of the data.  Even as a developer, I do NOT create meaningful keys so I
can look at a single table and know exactly what each record refers to.
I guess that means I'm mostly on the contractor's side in this, although
I would go further and use a straight autonumber without any alpha
characters or attempt to make the thing partly meaningful.  As far as
leaving gaps to insert other records, that is a trap because you are
depending on ordering by the meaningful PK.  In fact, with an additional
non-PK user-friendly key, you can order on that and create all the gaps
you want.  

Charlotte Foust




More information about the AccessD mailing list