troubleshooting Question

Database design decision, Name/Value

Avatar of ulf-jzl
ulf-jzlFlag for Sweden asked on
Databases
2 Comments1 Solution83 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
Vitor Montalvão
IT Engineer
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros