By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,186 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

LookupTable / ComboBox Primary key question?

P: n/a
When it comes to LookupTables for dropdown ComboBoxes does it make
sense to create an autonumber as the primary key along with main value
say IllnessType and then have the combobox store the autonumber in the
main table with a reference to the lookuptable?

Or, does it make more sense to just create a lookup table with
IlnessType as the primary key. And then of course, have the combobox
store this value directly into the main table, and no cross reference
will be required??

In either case enforcing referential integrity, with cascading
updates.

Thanks
Greg
Jul 25 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I prefer the idea of a code field and a description field. However, I
recommend using a code that makes sense. For example, if you're using
the DSM IV you might want to use those codes (I'm fond of Caffine
Addiction and Frotage myself) along with the descriptions. Out of
habit most of my application use a 5 character code field and a 25 to
50 character description field.

One nice benefit of this approach is that's it's really fast to create
cross tabs using the codes, without fear that your column head will be
too large.

However, single column lookups can work.

Good luck,

tim mills-groninger

On Jul 25, 11:20*am, "Greg (code...@gmail.com)" <code...@gmail.com>
wrote:
When it comes to LookupTables for dropdown ComboBoxes does it make
sense to create an autonumber as the primary key along with main value
say IllnessType and then have the combobox store the autonumber in the
main table with a reference to the lookuptable?

Or, does it make more sense to just create a lookup table with
IlnessType as the primary key. And then of course, have the combobox
store this value directly into the main table, and no cross reference
will be required??

In either case enforcing referential integrity, with cascading
updates.

Thanks
Greg
Jul 25 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.