How to design databases for such cross-classification?

Source: Internet
Author: User
How does one design databases for such cross-classification, such as www.shoes.com? the main types are classification tables and product tables. In this way, I set a brand table brand, a user object table (women, girl, men) user_scope, and a product category table categorybrand and user_scope with no hierarchical concept, how to design a database by applying such a cross-classification method to category?
For example, this website www.shoes.com
How do you design the table mainly including the category table and product table.
I set it like this.
A brand table, a user object table (women, girl, men) user_scope, and a product category table category
Neither brand nor user_scope has a hierarchical concept. a level and parent field must be added to category.
Then there is a pair of contact lists between brands, user_scope, and category.
Brand_scope {id, brand_id, scope_id}
Brand_category {id, brand_id, category_id, levl (classification of category )}
Scope_category {id, scope_id, category_id, levl (classification of category )}
The product uses the eav structure, and three fields correspond to the brand, user object, and product category.


Product attribute table product_option, {option_id, title, sku}
Product property value table product_option_value {option_value_id, option_id, value },
Product attribute contact table product_to_option {product_id, option_id}

Is there any problem with this setting?

------ Solution --------------------
Product attribute contact table product_to_option {product_id, option_value_id}

This should be the case.
------ Solution --------------------
List of links between brands, user_scope, and category
It should be treated as an index table. In general, the index table is not updated. only when the user clicks update index in the background, the index table is updated through the brand, scope, and category fields in the product table...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.