Re: Stupid Database Tricks

From: Roy Hann <specially_at_processed.almost.meat>
Date: Wed, 23 May 2007 08:24:36 +0100
Message-ID: <IdqdnUNHM5mocc7bnZ2dnUVZ8qugnZ2d_at_pipex.net>


"Marshall" <marshall.spight_at_gmail.com> wrote in message news:1179892760.282700.315160_at_q66g2000hsg.googlegroups.com...
> On May 22, 1:48 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>>
>> Every table will have a numeric id column, and this column will be the
>> primary key.
>
> I don't know why, exactly, since it's not like it's the worst one
> mentioned, but that one DRIVES ME CRAZY!
>
> I hear people say this, and I want to say oh, I see: you're
> just the stupidest freaking idiot ever, is that it? Of course
> instead I say something about that being contraindicated.

I did a database design briefing for a regional outpost of one of the big three consultancies just the week before last, and I actually spent quite a lot of time preparing them to be receptive to my arguments debunking the need for a numeric ID column in every table.

Well damn me; some B***TARD had got there before me and implanted the idea that "sequentially" numbering the rows in a table is not just OK but is in fact "best practice" (that was his exact phrase)! And once he'd put that completely bogus label on it (with no justification that they could remember or explain to me), then as far as they were concerned it would be reckless, negligent, and nothing short of unprofessional to deviate.

No amount of explaining or probing or proposing problems with it would shake them from the idea that a numeric ID column is the hallmark of a good design. They were eager to seem educated and well-informed, and taking a positive step (conspicuously adding a column) was, to them, a more obvious way of demonstrating their expertise than the passive (and invisible) step of not adding one. Psychology. Humph.

I was gutted. I'd gone in there prepared to do battle against people advocating object-relational mapping frameworks that insist on row numbers, and it still wasn't enough.

Roy Received on Wed May 23 2007 - 09:24:36 CEST

Original text of this message