> If this trend is real, it doesn't seem like a very good trend to me. For
> example, if you were keeping track of parts in a warehouse, why would anyone
> make a table that looked like this:
> ID (autogenerated PK) PART_NO PART_DESCRIPTION
> 1 A01 Widget
> 2 B03 Grapple Grommet
> 3 A02 Snow Shovel
> 4 D11 Whisk
> 5 C04 Duct Tape
> when this table is simpler:
> PART_NO (PK) PART_DESCRIPTION
> A01 Widget
> B03 Grapple Grommet
> A02 Snow Shovel
> D11 Whisk
> C04 Duct Tape
> Would anyone care to convince me that the first version of the table is
> "better" than the second version in some way?
I can go either way on this. I like the PART_NO as the pri key better, but I
will quite often use the autogenerated pk to make my life easier. How?
Take for instance when you get "the email":
I have a spec change for the warehouse application you are working on. Can you
plese modify the application so that "Widget" and "SuperWidget II plus" can have
the same part number. I know it sounds weird, but the guys upstairs want it. I
have tried to talk them out of it, but legal insists, and I can't do anything
about it at this point, sorry.
Oh, and we need this to QA by EOD Monday. Work as may hours as you need over
the weekend to make this happen.
Sr. Project Manager
It is much easier to make these sorts of changes if your pk is something that
you have control over rather than an soemthing that is defined by someone else
because they will change the definition on you mid-way though the project.