Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
08-02-2011, 12:26 PM #1
- Join Date
- Aug 2010
- Thanked 0 Times in 0 Posts
Storing properties of a clothing item
I am storing details for clothing items.
Currently each item has a gender, category, type and variation.
E.g item001, male, 4, 6, 3
4, 6 , 3 is a reference to the cats, types and variations table(s).
So 4 is Trousers, 6 is jeans, 3 is slim fit.
However now I want to store much more detail about each item.
So should i use the existing structure and add columns like variation 1, 2, 3 etc or just have one table with all the possible properties and have a itemHasProperties table with item id and property id
08-02-2011, 07:56 PM #2
I don't think anybody but you can know the right answer.
But as a general rule, if *most* variations can be attached to multiple *OTHER* variations, then you'd want them in a separate table.
In other words, colors and sizes are clearly independent: each should be a table.
But maybe colors and patterns are closely related; you have red stripes and red checks but never have blue checks. So maybe that means you have a COLORS_AND_PATTERNS table as a single table.
Kind of too general a question for us to answer without seeing the range of variations you are talking about.