I am from an optics company. Imagine that we have a flat rectangular glass plate (Length x width x thickness) which is a parent product that can be processed into smaller 2D shape child product such as circular glass plate, rectangular glass plate or triangle glass plate.
I would like to find a way to store size of that particular shape in a correct manner. For eg, a rectangular part is defined by lengthxwidthxthickness only but not by diameter. A circle is define by diameter and thickness but not by length and width. What is the correct way in keep track this kind of info?
For example, I can have a table which contain the following field:
- ChildProductID
- 2DShapeCategory = {circle, rectangle, triangle}
- DiameterOfCircle
- LengthOfRect
- WidthOfRect
- L1OfTriangle
- L2OfTriangle
- L3OfTriangle
And then for a circular part, the value of that row will be for eg:
productID=1 ,shape=circular , diamterofCircle=5 , lengthofRect=0, widthofRect=0, L1ofTriangle=0, L2OfTriangle=0, L3OfTriangle=0
then for a rect part, the value of that row can be for eg:
productID2, shape=rectangle, diameterofcircle=0, lenghtofRect=10, widthofRect=5, L1ofTriangle=0, L2OfTriangle=0, L3OfTriangle=0
But is this a correct way or best practice? I feel not and thus need some help and advice