Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Break one table into many or leave alone?
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01433360
Message ID:
01433407
Views:
40
>>>Actually if your master lookup table has a good primary key, you use that for your RI and you are all set.
>>>
>>>I use a single table for all picklists on all of my systems.
>>>
>>
>>How would you set it up then to only connect main table with right entities?
>
>Picklists
>
>pk int (identity) (primary key)
>Picklist_Name varcar(50)
>Picklist_Display varchar(50)
>Picklist_Display_Order smallint
>
>
>
>Data Table
>field1
>field2
>field3
>Picklist_code int (fk is pk on Picklists table)

When you need to show available choices for something, do you select from Picklists based on Picklists_Name?

Also, you can insert into your data table a valid Picklist ID, but it would be for completely different purpose - there is no programmatic way to prevent it except for the trigger, IMHO.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform