Storing Text or integer

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

hello group.

I use alot of combo boxes to input data on forms. All my combo boxes record
source are linked to dedicated dropdown table's.
The tables are all set up with an Autonum Primary Key field and a
description field (text)

CostID ¦ Cost
1 Internal
2 External
3 Other

Should i store the PK or the value in my tables?
 
A relational data base system is conceived with the idea of linking fields
between tables. So, assuming that you will want to have many records with
the same "cost" information, I (with no knowledge of your tables, forms,
etc.) would expect that you'd store the CostID value in the other tables, as
you can always use a query to get the value of "Cost" (the text) for display
in reports, etc. This way, if you decide to change "Internal" to "Inside"
for example, you change it in just the original table and all other tables
would be able to use that new text value in their queries without changing
their data.
 
Back
Top