我正在重新开发中型产品数据库的前端和数据库,以便支持类别/子类、产品线、制造商、支持的软件和产品属性。 现在只有一个产品表。 制造商将通过辅助软件(选择)按类别/子类别列出产品页。 每个网页将根据其他分类进行额外的过滤。
Categories/Subcategories (multi level) Products and product lines can be assigned to multiple category trees. Up to 5 levels deep should be supported.
Product lines (single level) Groups of products. Product can only be in single product line.
Manufacturers (single level) Products and product lines can be assigned to single manufacturer.
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.
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.
由于所有这些物品基本上都是子类,因此,我是否将其全部放在总表格中,或将其分成单独表格。
硕士:
ClassificationTypes (product line, category/sub, manufacturer, software, attribute would all be types)
-TypeID
-Name
Classifications
-ClassID
-TypeID
-ParentClassID
-Name
ClassificationsProductsAssociations
-ProductID
-ClassID
我仍然至少需要一个表格,把各种类型联系起来(例如将属性与一类联系起来),以及将产品线与各种类型联系起来。
如果我拿到每类表格的话,它就能够迅速获得,我仍需要一种把所有事项联系起来的办法。
表格设置:
Categories
-CategoryID
-Name
-ParentCategoryID
CategoriesAssociations
-CategoryID
-ProductID
-ProductLineID ?
Attributes
-AttributeID
-Name
-ParentAttributeID (use this as the parent would be "color" and child would be "red")
AttributesAssociations
-AttributeID
-ProductID
-CategoryID (do I also need to link the category to the parent attribute?)
CompatibleSoftware
-SoftwareID
-Name
CompatibleSoftwareAssociations
-SoftwareID
-ProductID
-ProductLineID ?
Manufacturers
-ManufacturerID
-Name
ProductLines
-ProductLineID
-ManufacturerID
-Name
Products
-ProductID
-ProductLineID
-ManufacturerID
-Name
社团的其他选择是设立一个单一的协会表格,将上述表格联系起来:
Master Associations
-ProductID
-ProductLineID
-ManufacturerID
-CategoryID
-SoftwareID
-AttributeID
什么是最佳解决办法?