0

I'm trying to design a database that could store variation of products. So if,
user choose :
User Choice
There will be 3 product variant(Small White, XL Black, XL White).

I've read the accepted answer from Modeling Product Variants and got a question.
What the drawback of using this simple design?
Simple Design
so the table would look like :
Inserted Value

nfl-x
  • 487
  • 1
  • 6
  • 13
  • There is a potential normalization problem here, because you would be storing the size repeatedly for different skews (e.g. `XL White`, `XL Black`, the XL is repeated). – Tim Biegeleisen Mar 08 '18 at 01:44
  • Thank you. I'll reread what normalization is then. – nfl-x Mar 08 '18 at 03:29
  • It has to do with storing/not storing the same data over and over again when you don't need to. For such a simple size scheme as you showed us, it may not matter. But later on this could become an issue. – Tim Biegeleisen Mar 08 '18 at 03:37
  • Would there still potential issue If i add product_id as prefix to sku_value? – nfl-x Mar 08 '18 at 03:57
  • No...the issue here is that you're storing size and color in a single denormalized column. – Tim Biegeleisen Mar 08 '18 at 03:58
  • Isn't the [accepted answer](https://drive.google.com/open?id=1d3z3vN9hm8LE8GNEOMoXrymbt7BaNdor) will also store size and color in single column? – nfl-x Mar 08 '18 at 04:14
  • Oh i got it(maybe). The sku_value in the [accepted answer](https://drive.google.com/open?id=1d3z3vN9hm8LE8GNEOMoXrymbt7BaNdor) act as reference, not holding the value itself. – nfl-x Mar 08 '18 at 04:32

0 Answers0