Note that there are some explanatory texts on larger screens.

plurals
  1. POProducts database design for product lines, categories, manufacturers, related software, product attributes, etc
    primarykey
    data
    text
    <p>I am redeveloping the front end and database for a medium size products database so that it can support categories/subcategories, product lines, manufacturers, supported software and product attributes. Right now there is only a products table. There will be pages for products by line, by category/subcategory, by manufacturer, by supported software (optional). Each page will have additional filtering based on the other classifications.</p> <p>Categories/Subcategories (multi level) Products and product lines can be assigned to multiple category trees. Up to 5 levels deep should be supported.</p> <p>Product lines (single level) Groups of products. Product can only be in single product line.</p> <p>Manufacturers (single level) Products and product lines can be assigned to single manufacturer.</p> <p>Supported software (single level) Certain products only work with one or more softwares, so a product/line can be assigned to none, one or more softwares.</p> <p>Attribues (type / options - could be treated so each type is a category and items are children) Products and product lines can be assigned attributes (eg - color > red / blue / green). Attributes should be able to be assigned to one or more categories.</p> <p>Since all these items are basically types of subcategories, do I put them all together in a master table OR split them into separate tables for each one?</p> <p>Master table idea:</p> <p>ClassificationTypes (product line, category/sub, manufacturer, software, attribute would all be types) <br/>-TypeID <br/>-Name</p> <p>Classifications <br/>-ClassID <br/>-TypeID <br/>-ParentClassID <br/>-Name</p> <p>ClassificationsProductsAssociations <br/>-ProductID <br/>-ClassID</p> <p>I would still need at least one more table to link types together (eg - to link attributes to a category) and a way to link product lines to various types.</p> <p>If I go with a table for each type it can get messy quick and I will still need a way to link everything together.</p> <p>Multiple table setup:</p> <p>Categories <br/>-CategoryID <br/>-Name <br/>-ParentCategoryID</p> <p>CategoriesAssociations <br/>-CategoryID <br/>-ProductID <br/>-ProductLineID ?</p> <p>Attributes <br/>-AttributeID <br/>-Name <br/>-ParentAttributeID (use this as the parent would be "color" and child would be "red")</p> <p>AttributesAssociations <br/>-AttributeID <br/>-ProductID <br/>-CategoryID (do I also need to link the category to the parent attribute?)</p> <p>CompatibleSoftware <br/>-SoftwareID <br/>-Name</p> <p>CompatibleSoftwareAssociations <br/>-SoftwareID <br/>-ProductID <br/>-ProductLineID ?</p> <p>Manufacturers <br/>-ManufacturerID <br/>-Name</p> <p>ProductLines <br/>-ProductLineID <br/>-ManufacturerID <br/>-Name</p> <p>Products <br/>-ProductID <br/>-ProductLineID <br/>-ManufacturerID <br/>-Name</p> <p>Other option for associations is to have a single associations table to link the tables above:</p> <p>Master Associations <br/>-ProductID <br/>-ProductLineID <br/>-ManufacturerID <br/>-CategoryID <br/>-SoftwareID <br/>-AttributeID</p> <p>What is the best solution?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload