question re: primary key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

I have a list of customer ID #s that are unique to each company, however,
some companies have different locations with unique location numbers. For
example:

Company A, ID 10001, Seattle, Location Code 1
Company A, ID 10001, London, Location Code 99
Company B, ID 10002, Tokyo, Location Code 1
Company C, ID 10003, Cairo, Location Code 1
Company C, ID 10003, Lima, Location Code 99

So, the data combination of company ID and ship code is always unique (10001
and 1, 10001 and 99, 10002 and 1).

I'd like to rely on the experience of folks on this board. Am I best off to
just go ahead and set an unique autonumbered primary key, or should I go with
the company ID and have a company detail table that supplies the location
info?

Thanks,

Zambi
 
Zambi said:
Hi everyone,

I have a list of customer ID #s that are unique to each company, however,
some companies have different locations with unique location numbers. For
example:

Company A, ID 10001, Seattle, Location Code 1
Company A, ID 10001, London, Location Code 99
Company B, ID 10002, Tokyo, Location Code 1
Company C, ID 10003, Cairo, Location Code 1
Company C, ID 10003, Lima, Location Code 99

So, the data combination of company ID and ship code is always unique (10001
and 1, 10001 and 99, 10002 and 1).

I'd like to rely on the experience of folks on this board. Am I best off to
just go ahead and set an unique autonumbered primary key, or should I go with
the company ID and have a company detail table that supplies the location
info?

Thanks,

Zambi

The fact that you suggest "company detail table" infers that you might
want to store more information specific to each location.

If this is the case set up a two tables with a 1:many relationship
between the Company and Location tables.
 
Back
Top