Subject RE: [ib-support] Primary key question
Author Rado Benc
Hi Nico,

> I have a little problem. My customer wants a table with
> his articles (approximatly 100.000 records). The problem is :
> for some articles , there is no article number. I was planning
> to design a table with Article_ID as the primary key. So it
> won't work anymore. Now, I guess I have to use a surrogate key,
> with numbers generated by a generator. Isn't that a little bit
> wasted space ? That field doesn't have really a meaning, but I
> think it's the only way do do it ?

Whatever you customer wants, I would use surrogate key in this
situation. If I understand databases correctly - records should be
uniquely identified. If there is nothing that would identify records
(articles), you should create it.

> Isn't that a little bit wasted space ?

In 2001 - no. I heard that some companies sell disks with tens of
gigabytes of space. :-)

> That field doesn't have really a meaning, but I think it's the only
> way do do it ?

That field will uniquely identify articles. It will eliminate troubles
with identifying articles uniquely.

Regards,

Rado