Relationships

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

Guest

I understand the proper way to set up a relationalship database is to use a
primary key with a auto number in the main table and then relate the other
tables back to this number.
However, I am importing an existing data base that has a field named CODE
in each table (Main and others) with alphanumeric code such as kre222 in the
CODE field.
If I use this CODE field for my relationship points, will I have any
problems??
Thanks
George
 
There's nothing intrinsically wrong with an alphanumeric primary key. What
is important is that it must be unique, it must be non-Null, it should be
simple, and it should rarely change.
 
I can understand the reason for the autonumber and if I build a database from
scratch I will certainly use it, but this existing atabase is quite large and
I did not want to make major changes for no good reason. Thanks for your
help.
George
 
As long as those codes are unique, are always known, and rarely (preferably
never) change, you should be OK.

On thing to keep in mind - there are only so many possible combinations of
three characters and three digits - I make it 16,224,000 possible
combinations using letters 'a' to 'z' and numbers 000 to 999. (I'm no
mathematician, so if I got that wrong I hope someone will correct me.) If
you ever have more records than that, you'll need to add additional
characters or digits to the codes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top