Analysis and Design of commodity models in e-commerce systems

Source: Internet
Author: User

Preface

In the e-commerce system, the commodity model is crucial and the core of the entire e-commerce system. The following uses a simple analysis to design a basic commodity model.

Product model evolution

In the past, CMS was very popular. The most common model was the topic-Article model. As a result, e-commerce naturally inherits this one-to-many relationship. It's just that the topic is classified, and the article is commodities. Products also have unique business attributes. The menu on the left of many e-commerce websites is the category.

Later, we found a problem that only classification could not meet all the requirements, such as nike shoes and nikeT shirts. Users may want to see all the products of nike first, and this model cannot satisfy them. We want to add the "brand" concept to this relationship. So:

In this way, basic users can find their desired products by category or brand on the homepage, or directly view popular products and newly launched products. However, the problem also arises. After a user enters the category, many products are displayed in front of the user, and the user wants to filter and query the products closer to his target. Therefore, an excellent product designer designed a UI similar to this:

Users can further narrow their targets through these filtering conditions, and the problem arises again. Such product requirements are placed in front of programmers. How can we achieve this? After analysis, we found a way to know that there may be a big difference in attributes between products, such as jeans with attributes such as pattern, waist, and trousers length; the computer has CPU, video card, and other attributes, and the attributes of various products are different. Furthermore, casual trousers also have attributes such as Edition, waist, and pants length. Desktop or laptop have attributes such as CPU and video card. Therefore, we can conclude that a category corresponds to several attributes, and an attribute corresponds to several attribute options, while a specific item corresponds to several attribute options (such as a pair of jeans, his pants length: 7 points, pants: straight ). Taste it carefully.

We can see from the figure that the relationship between categories and attributes (for example, "jeans" has attributes such as pants, Pants length, and layout), and between attributes and attribute options (for example: pants length attributes include long, 9-pants, and 7-pants options), goods, and attribute options (for example, the length of a pair of jeans is 7-pants ). So far, we know the classification, brand, and attributes of a product and their corresponding attribute values. By filtering conditions, you can naturally query the specified product. The price is also an attribute. Do not use the price field in the commodity table for calculation. This is not conducive to the query but also increases the complexity, so that the business editors can set attributes and ensure their correctness.

With this model, we can see the following interface (Please do not pay too much attention to the left, focus on the right and below):

This page shows all the information about the product. It seems that all the information can be satisfied according to the previous design. However, we seem to have missed something. On the right side of the graph, we find the current color and size of the item, and allow users to select other colors and sizes. This gives us some questions about what the "color" and "size" here are. The different colors of a product are different. After thinking, we found that we have confused two concepts: "goods" and "goods ". Goods of different specifications are independent commodities. For example, a trousers with L, M, and a USB flash drive with 16 GB or 32 GB are all of the same products with different specifications. It can be considered that the relationship between goods and goods is one-to-many. After understanding this concept, it will be much easier to deal with this requirement. Here, we will deal with "color" and "size" as "specifications", while red and black; number L and number M are regarded as the type options or value. A product corresponds to several specifications, and a product with a certain specification value is a product.

Okay, it seems like it is now. This model can meet the basic product search and display needs. The search engine can also generate the corresponding item index based on the model data to achieve accurate search. The product module also works with other modules, such as the user system, order system, and payment system. Under normal circumstances, we will make the commodity business independent into a "commodity center" service, and focus on commodity query, update, and release services to support other businesses.

Analysis and Design of commodity models in e-commerce systems

Related Article

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.