Storing Text or integer

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?
 
K

Ken Snell [MVP]

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.
 

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