sql - Table Design For SystemSettings, Best Model -
Someone has suggested to fill a table of settings, where each column has a setting name (or type) and the rows The customer is & amp; Their respective settings for each setting.
ID | ISDmin | ImagePath
------------------------------ 12 | 1 & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; | \ Path \ to \ images
34 0 & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; | \ Path \ to \ images
Every time we want a new setting name (or type), we change the table (via SQL) and add new (column) settings name Are / type Then update rows (so that each customer now has a value for that setting).
The new table design proposal proposal has to set the column to set the name and other columns. ID | | Setting name | Settings Valley ---------------------------- 12 | Islam & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; | 1
12 | ImagePath & nbsp; & Nbsp; & Nbsp; | \ Path \ to \ images
34 Islam & nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; | 0
34 | ImagePath & nbsp; & Nbsp; & Nbsp; | \ Path \ to \ images
The issue they made was that adding a new setting was as easy as adding an insert statement to the row, not the added column.
But some of the other designs do not seem right, it looks bad, but I can not come up with any argument against it. this is wrong?
This schema (and)
There are some professionals and more opposition in this, and It guarantees to end in tears.
Comments
Post a Comment