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_Syst em
DropDownID_Cust omer
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_ CustomerAndSyst emDefined
----------------------------------------
ID
CustomerID
Name
Value
Regards Christian H.
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_Syst em
DropDownID_Cust omer
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_ CustomerAndSyst emDefined
----------------------------------------
ID
CustomerID
Name
Value
Regards Christian H.
Comment