Database design decision, Name/Value

ulf-jzl
ulf-jzl used Ask the Experts™
on
Hi guys!

I really need some help and your skills with a design decision regarding a specific part of a database.
The database mostly consists of tables that follow the normalization rules (3NF). But there is also a part of the database where this would be hard to do, this because the parameters that needs to be saved changes a lot (new parameters and/or different parameters), and this occurs several times a year, depending on the products. To migrate the database so often to handle all these changes will be painful.

The parameters are settings from products. So, a “decision” was made to go with a Name/Value setup for these specific parameters. Both values and names are 99% strings when retrieving them from the product.  They are also “dynamically” read, so there is no code to target a specific parameter, you loop through all parameters that exists, why? Because this module was designed to be flexible, so it could be added to any type of product, and also so no updates where needed if any new parameters where added to a product, or changed. But still, not sure the design is the correct one.

What I need help with is to look over the decision of this design and see if this is the best way to go forward with, depending the current situation, or If we should do something else.

Example:
Value could be anything from, “10”, “xxxxxOn”, “xxxxxxOff”, “true”, “0, “1” and so on, basically anything, that is why a string (NVARCHAR) is used.

The name of the parameters can also be very odd, not normal column names (not in my opinion anyway) so naming columns after the parameter names will probably look very strange.

Product 1
Parameter       Name:             Value:
      “Parameter1”            “Value1”
      “Parameter2”            “Value2”
      “Parameter3”            “Value3”
      …..
Product 2
Parameter       Name:             Value:
      “Parameter1”            “Value1”
      “Parameter4”            “Value4”
      “Parameter5”            “Value5”
      ……
Product 3
Parameter       Name:             Value:
      “Parameter1”            “Value1”
      “Parameter4”            “Value4”
      “Parameter6”            “Value6”
      ….

Database.png
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Engineer
Distinguished Expert 2017
Commented:
IMO, the solution with a parameter table is the best path for you to follow.

Author

Commented:
Ok, thank you. In that case we will proceed with current solution.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial