One field in table?

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Does every table need to have more than one field? Every example I've
seen seems to show such, but I see no point in using an ID number or
something similar if I can get away with just using one field, as long
it's usable as a primary key. Any opinions?

Aaron
 
I believe the best answer to your question is "it depends."
Certainly there are situations where one field tables exist.
I have a one field, one record table called tblVersion which just lists the version number.
Not sense in making a ID number for that!

From memory I believe I read John Vinson once say that you don't have to have a ID field as the
Primary Key if the Primary Key is "short, stable, and will not change." I'm probably a little off,
but it was something close to that. I believe he was talking about a table of state names. He was
pointing out that just using the State Name as the Primary Key would be just fine since the names
are short, stable, and will undoubtedly not change.
(Unless of course people back east want to keep calling Oregon, "Orygon")
<vbg>
 
Does every table need to have more than one field? Every example I've
seen seems to show such, but I see no point in using an ID number or
something similar if I can get away with just using one field, as long
it's usable as a primary key. Any opinions?

Aaron

This can be a contentious issue, but if it's a simple lookup table
(NOT a "lookup field" preferably), and if the single field is unique
and not subject to frequent change, I'd just use the one field.
 
Jeff Conrad said:
just using the State Name as the Primary Key would be just fine since the names
are short, stable, and will undoubtedly not change.
(Unless of course people back east want to keep calling Oregon, "Orygon")
<vbg>

and the people who want to turn California into North California and South
California, and the people who want to take the North out of North Dakota
because it hurts tourism, and..... <g>
 
I've several tables that only have one field that is used as the primary
key; fields such as Categories or Job title. Any field that is
self-describing can be used alone. Many times these type of tables are used
as lookup tables.
 
Back
Top