Do both where appropriate. We have a couple of very standard small tables, such as event types or time codes/ranges, and one large table to handle the stuff we know will stay simple w/ only code value fields. The CRUD tools are great but if I don't have to add a new object just to add a simple lookup, great. Joe and others are right to be cautious b/c the database table for a large lookup scheme could get scope crepe in order to support a few 'special' fields for only certain types. In that situation, I take that special item out of the big lookup table and make it a small one. So in the end, custom types with special values/fields get unique tables and generic lookups go in the big lookups tables.

-Jason

Phillip Senn wrote:
I consider this to be a classic question.

Q: Should I have:
1. A bunch a little bitty lookup tables (averaging 2-10 dropdown values), or

2. One big Control table that has a LookupType field?

The Argument for #2 is there are fewer tables in SQL Server, ergo a lot less
code needed form maintenance.

The Argument for #1 is that if you have one large Control table, then you
are in effect writing your own administrative facility, which is the whole
purpose of Enterprise Manager/Query Analyzer.

I pose this question to the group because to me, the structure of the tables
probably maps directly to the object model.  After all, the purpose of the
database is to simply provide persistence for the objects, no?

So which do you prefer:

1. SELECT * FROM TableA
   SELECT * FROM TableB
   SELECT * FROM TableC
2. SELECT * FROM Control WHERE LookupType="TableA"
   SELECT * FROM Control WHERE LookupType="TableB"
   SELECT * FROM Control WHERE LookupType="TableC"




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org


.


--
Jason Daiger
URL: www.jdaiger.com
EML: [EMAIL PROTECTED]




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org


Reply via email to