Designing a Scalable E‑Commerce Product Model: From SPU to SKU
This article walks through the evolution of e‑commerce product modeling, explaining how categories, brands, attributes, SPU and SKU concepts combine to form a flexible system that supports browsing, filtering, and detailed product pages while keeping the architecture maintainable.
Preface
In e‑commerce systems, the product model is the core of the entire platform. The article shares insights and design guidelines for building a solid product model that can handle diverse business scenarios.
Evolution of the Product Model
Early e‑commerce sites inherited the CMS column‑article pattern, treating categories as columns and products as articles. This one‑to‑many relationship worked for simple listings but struggled when users wanted to browse by brand or other dimensions.
To address the limitation, a "brand" concept was added, allowing users to find products by both category and brand. However, the sheer number of items in a category required additional filtering UI.
Attributes differ across product types (e.g., jeans have waist, length; computers have CPU, GPU). The model therefore links a category to many attributes, each attribute to many attribute options, and a concrete product to a set of selected options.
This relationship enables precise filtering and searching. Price is also treated as an attribute to keep pricing logic within the attribute framework.
From SPU to SKU
SPU (Standard Product Unit) represents the abstract product concept that users recognize (e.g., iPhone 6). SKU (Stock Keeping Unit) identifies a concrete item with specific attributes such as color, storage, and network version.
Both SPU and SKU have their own codes, facilitating inventory management and price differentiation. An SPU links to categories and brands, while a SKU stores the actual price and specific attribute values.
Attribute and Specification Design
Attributes (e.g., color, size) belong to a category, and each attribute has multiple options. Options can be shared across categories, but a many‑to‑many relationship may be used to avoid redundancy. Specifications are the concrete values of a SKU that appear on detail pages and may also serve as filter criteria.
By separating attributes, options, and specifications, the model supports flexible product listings, detailed pages, and efficient search indexing.
Final Product Model Diagram
The presented model covers basic product search and display needs. In a large‑scale system, additional modules handle pricing tiers, cost accounting, promotional discounts, and integration with order, user, and payment services.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
