Ask about the design of E-commerce Website’s commodity list and commodity classification list?

  ios, question

Question list:

  1. Is PID infinite classification or path wireless classification better for classification table?

  2. If it is based on the wireless classification of PID, that is to say, the PID of a classification is either 0 (top-level classification), or it must belong to a classification, or it is a classification whose useless classification is forgotten, then does this need to set PID as foreign key constraint, and PID-ID appearance is also the main table, is this ok?

  3. Is the relationship between commodity table and classification table many-to-many or one-to-many?

  4. There are many levels of classification. Do commodities have to belong to the lowest level of a certain classification or are they free?

  5. How is Taobao designed, how many categories is Taobao estimated to have, and how is it designed and maintained

Taobao’s category system is a separate item, with special personnel to maintain the category. But also divided into foreground category and background category, foreground category facing users, background category facing technology. The front-end and back-end categories complete the mapping relationship through category attributes.

Category is not infinitely divisible. Any category is defined by a set of attributes. Commodities fall into one category only when they have attributes. For example, mobile phones are a category, but Huawei mobile phones are not a category, but only have brands: mobile phones with Huawei attributes, of course, mobile phones will not have only one attribute of brands. But all mobile phones belong to the category of mobile phones.

Taobao category is a tree structure with a maximum of 4 levels. All commodities have a category id. This category id must be a leaf category. Goods cannot be hung on non-leaf categories. The cell phone exemplified above is a leaf category.

In fact, in Taobao’s category system, attributes are the most important.