|
Posted by Christian H on 08/09/06 14:18
Hello,
We have a problem we're not quite how to solve best. We're working on a
Web-application where some values that are used, are pre-defined (default
values), and other values should be user-defined (users can add additional
values)
Currently, the 2 different things have been separated into 2 different
tables. The problem we're having now, is when the values from the 2 tables,
should be referenced in another table, i.e when the items are saved as a
part of a form-submission. Should we use 2 different columns to represent
the ID for the 2 different tables?
Here is an exmple of that design:
DropDownValues_SystemDefined
---------------------------------------
ID
Name
Value
DropDownValues_CustomerDefined
----------------------------------------
ID
CustomerID
Name
Value
DropDownValues_SavedItems
----------------------------------
ID
DropDownID_System
DropDownID_Customer
The other solution , as far as we can see, is to put all values into 1
table, and use CustomerID=-1 or null when the item is a System-defined
value, and not a customer-defined value.
DropDownValues_CustomerAndSystemDefined
----------------------------------------
ID
CustomerID
Name
Value
Regards Christian H.
Navigation:
[Reply to this message]
|