Primary Key

S

SMERTZ

Have a small table that has employee information in it, will be linked to a
service record table. HR has decided that we don't need Social security
numbers, and I must come up with another field to use as a primary key. I
wanted to use "Employee Number" as the field, but some of the employees are
Temps and as such have an employee number like T1234 and some are 5
characters and some are 4.

So can I use a text field as a PKeven if it is a small table (200) or less
employees is this advisable, or will it cause problems later?

Any thoughts on this are appreciated.

Thanks
 
D

Dirk Goldgar

SMERTZ said:
Have a small table that has employee information in it, will be
linked to a service record table. HR has decided that we don't need
Social security numbers, and I must come up with another field to use
as a primary key. I wanted to use "Employee Number" as the field,
but some of the employees are Temps and as such have an employee
number like T1234 and some are 5 characters and some are 4.

So can I use a text field as a PKeven if it is a small table (200) or
less employees is this advisable, or will it cause problems later?

Any thoughts on this are appreciated.

I don't see any problem with using a text field such as you describe, so
long as it is (a) unique, both now and in the future, and (b) available
at the moment you need to enter the new employee into the table.
 
M

Mike Painter

SMERTZ said:
Have a small table that has employee information in it, will be
linked to a service record table. HR has decided that we don't need
Social security numbers, and I must come up with another field to use
as a primary key. I wanted to use "Employee Number" as the field,
but some of the employees are Temps and as such have an employee
number like T1234 and some are 5 characters and some are 4.

So can I use a text field as a PKeven if it is a small table (200) or
less employees is this advisable, or will it cause problems later?

Any thoughts on this are appreciated.

As long as no temp ever gets hired or no full time becomes a temp it's
probably all right. I'd use just a number and have a field to note their
status Temp, fulltime, part-time, leave of absence, etc, etc
 
A

Albert D.Kallal

Why not use a autonumber field. You, and your users will never see this
field. The relationship will simply work like magic, and no one need care,
or ever worry about some pk.
 

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

Top