Product Catalog Systems
Learn Product Catalog Systems as part of the Domain Knowledge learning path for software engineers and architects.
A product catalog is one of the most important building blocks of an e-commerce platform. It organizes product information, defines product attributes and variants, manages product relationships, and makes product data available to storefronts, search engines, recommendation systems, and downstream commerce services.
When customers browse an online store, they expect product names, descriptions, images, prices, specifications, and available options to be accurate and consistent. Behind this experience is a product catalog system that manages product information throughout its lifecycle.
For software engineers and solution architects, understanding product catalog systems means going beyond basic CRUD operations. It involves designing flexible data models, managing product variations, supporting different categories, integrating product information from multiple sources, publishing catalog updates, and delivering fast product discovery at scale.
This article explains product catalog systems from a business, domain modeling, implementation, and architecture perspective, with practical examples using Java and Spring Boot.
Learning Flow
flowchart TD
A[Product Catalog Fundamentals] --> B[Product Data Model]
B --> C[Categories and Attributes]
C --> D[Products and Variants]
D --> E[Catalog Management Workflow]
E --> F[Validation and Enrichment]
F --> G[Search Index and Storefront]
G --> H[Events and Integrations]
H --> I[Java and Spring Boot Implementation]
I --> J[Scalability and Reliability]
J --> K[Hands-on Catalog Project]
1. What Is a Product Catalog System?
A product catalog system stores, organizes, validates, and distributes information about products that a business sells.
A typical product record may contain:
- Product name and description
- Product identifier or SKU
- Brand and manufacturer
- Category and subcategory
- Product images and digital assets
- Technical specifications
- Product variants, such as size and color
- Product status and publication state
- Search keywords and metadata
- Relationships to accessories, replacement parts, or related products
Consider an online store selling running shoes. The catalog must describe the general product, its brand, materials, and features. It must also represent individual purchasable options, such as size 9 in black or size 10 in blue.
These requirements make catalog design more complex than maintaining a single table with a name and price.
1.1 Product catalog versus product information management
A Product Catalog System makes product information available to commerce channels and applications.
A Product Information Management (PIM) system focuses on collecting, enriching, governing, and distributing product information across channels.
These capabilities frequently overlap. Some businesses use a commerce platform's built-in catalog, while others use a dedicated PIM connected to multiple commerce platforms.
| Capability | Product catalog | PIM |
|---|---|---|
| Product records | Core responsibility | Core responsibility |
| Category and attribute management | Common | Common |
| Rich descriptions and specifications | Supported | Strong enrichment capabilities |
| Workflow and approvals | Varies by platform | Often a major capability |
| Supplier data consolidation | May be supported | Common use case |
| Multilingual product content | Platform-dependent | Often extensive |
| Distribution to sales channels | Storefront and commerce focused | Often multi-channel |
| Product discovery integration | Common | Usually feeds discovery systems |
A product catalog does not necessarily replace a PIM. In a larger enterprise, the PIM may own enriched product content while the commerce catalog owns the representation needed for online selling.
1.2 Why product catalogs are business-critical
Poor catalog data creates business problems, not just technical defects.
- Incorrect specifications can cause customers to purchase the wrong product.
- Missing attributes reduce filtering and search quality.
- Duplicate products confuse customers and distort reporting.
- Incorrect variant relationships can lead to unavailable options being displayed.
- Stale content can create inconsistent experiences across web, mobile, and marketplaces.
- Invalid product data can prevent a product from being published.
A reliable catalog improves product discovery, conversion, merchandising, operational efficiency, and customer trust.
2. Core Product Catalog Concepts
Before designing the system, understand the main domain concepts.
2.1 Product
A product represents a commercial item or product family.
Examples:
- A particular laptop model
- A running shoe design
- A branded bottle of shampoo
- A specific book edition
Depending on the business, a product may itself be purchasable or may act as a parent for multiple variants.
2.2 SKU
SKU stands for Stock Keeping Unit. It identifies a specific item that a retailer manages as an individual sellable or inventory-tracked unit.
For example:
| Product | Color | Size | Example SKU |
|---|---|---|---|
| Running shoe | Black | 8 | RUN-BLK-08 |
| Running shoe | Black | 9 | RUN-BLK-09 |
| Running shoe | Blue | 8 | RUN-BLU-08 |
Each SKU identifies a specific configuration. SKU conventions are business-specific; do not assume every company uses the same format.
A SKU is not automatically the same as a UPC, EAN, GTIN, or manufacturer part number. These identifiers serve different business purposes.
2.3 Product variant
A variant is a specific configuration of a product, often determined by attributes such as size, color, capacity, or material.
For example:
- Product: Cotton T-Shirt
- Variant 1: Medium, blue
- Variant 2: Large, blue
- Variant 3: Medium, white
A variant may have its own SKU, barcode, dimensions, availability, and fulfillment information.
2.4 Category
Categories organize products into a hierarchy.
Home and Garden
├── Furniture
│ ├── Sofas
│ ├── Tables
│ └── Chairs
├── Lighting
│ ├── Ceiling Lights
│ └── Table Lamps
└── Kitchen
├── Cookware
└── Storage
Categories help customers browse the catalog and allow the business to apply category-specific attributes, navigation rules, and merchandising strategies.
A product may appear in more than one category. Therefore, a catalog model should not always assume that each product has exactly one category.
2.5 Product attributes
Attributes describe the properties of a product.
Examples include:
- Color
- Size
- Weight
- Dimensions
- Material
- Brand
- Energy rating
- Processor type
- Storage capacity
Attributes may be shared across many products or defined specifically for certain categories.
For example, a laptop category may require RAM, processor, and storage capacity, while a sofa category may require upholstery material, seat count, and dimensions.
2.6 Product relationship
Products can have relationships beyond their category membership.
Common examples:
- Compatible accessories
- Replacement parts
- Frequently bought together
- Similar products
- Bundle components
- Substitute products
- Parent-child variant relationships
These relationships support cross-selling, product discovery, bundles, and product configuration.
3. Product Catalog System Architecture
A catalog system usually consists of several logical components. These components may be separate microservices in a large platform or modules within a modular monolith.
flowchart TD
A[Admin Portal / Supplier Feed] --> B[Catalog Management API]
B --> C[Product Domain Service]
C --> D[(Catalog Database)]
C --> E[Validation and Enrichment]
E --> F[Publication Workflow]
F --> G[Catalog Event Publisher]
G --> H[Event Broker]
H --> I[Search Indexer]
H --> J[Storefront Cache]
H --> K[Recommendation Service]
H --> L[Marketplace / Channel Integration]
I --> M[(Search Index)]
N[Web / Mobile Storefront] --> O[Product Discovery API]
O --> M
O --> D
3.1 Catalog management API
The management API allows authorized users and systems to create, update, validate, and publish product information.
Typical operations include:
- Create a product
- Update product attributes
- Add or remove variants
- Assign categories
- Upload or reference product assets
- Submit a product for approval
- Publish or unpublish a product
Administrative APIs usually have stricter authorization and audit requirements than customer-facing product APIs.
3.2 Catalog domain service
The catalog domain service enforces business rules.
Examples:
- A SKU must be unique within the relevant business scope.
- A published product must have required information.
- A variant must reference a valid parent product.
- A category assignment must reference an existing category.
- A product cannot be published if required approval is incomplete.
These rules should be enforced by the domain layer and, where possible, supported by database constraints.
3.3 Catalog database
The catalog database is the authoritative store for the product information owned by the catalog service.
A relational database works well when products have strong relationships, constraints, and transactional requirements. A document database may be appropriate for flexible, nested product attributes or document-oriented access patterns.
The choice depends on the domain, access patterns, consistency requirements, and operational capabilities of the team.
3.4 Search index
Search systems such as Elasticsearch or OpenSearch are commonly used to provide:
- Full-text search
- Faceted filtering
- Sorting
- Relevance ranking
- Autocomplete
- Synonym handling
- Category navigation
The search index is generally a derived representation of catalog data, not the authoritative record. Updates may take time to propagate from the database to the search index.
3.5 Product discovery API
The product discovery API serves customer-facing requests.
Examples:
- Search for wireless headphones
- Filter laptops by RAM and price
- Browse the furniture category
- Retrieve product details
- Find related products
This API may combine catalog data with information from pricing, inventory, promotions, and personalization services.
The catalog should not automatically become the owner of every piece of information displayed on a product page. Ownership boundaries matter.
4. Product Catalog Data Modeling
A robust catalog model separates core product identity, variants, category membership, attribute definitions, and attribute values.
The right degree of normalization depends on the product domain and query requirements.
4.1 High-level entity relationship model
erDiagram
PRODUCT ||--o{ PRODUCT_VARIANT : contains
PRODUCT ||--o{ PRODUCT_ATTRIBUTE_VALUE : has
ATTRIBUTE_DEFINITION ||--o{ PRODUCT_ATTRIBUTE_VALUE : defines
CATEGORY ||--o{ PRODUCT_CATEGORY : includes
PRODUCT ||--o{ PRODUCT_CATEGORY : assigned_to
PRODUCT ||--o{ PRODUCT_RELATIONSHIP : source
PRODUCT ||--o{ PRODUCT_RELATIONSHIP : target
PRODUCT {
UUID id
string name
string description
string brand
string status
}
PRODUCT_VARIANT {
UUID id
UUID product_id
string sku
string variant_name
string status
}
CATEGORY {
UUID id
string name
UUID parent_id
}
ATTRIBUTE_DEFINITION {
UUID id
string code
string data_type
boolean filterable
}
PRODUCT_ATTRIBUTE_VALUE {
UUID product_id
UUID attribute_id
string value
}
4.2 Product table
A simplified product table may contain:
| Field | Purpose |
|---|---|
id |
Internal product identifier |
name |
Display name |
description |
Product description |
brand |
Brand identifier or brand name |
status |
Draft, review, published, or archived |
created_at |
Creation timestamp |
updated_at |
Last modification timestamp |
version |
Optimistic concurrency version |
Use an internal immutable identifier rather than relying on a product name as the primary key.
4.3 Product variant table
| Field | Purpose |
|---|---|
id |
Internal variant identifier |
product_id |
Parent product |
sku |
Business-facing stock keeping identifier |
variant_name |
Optional display label |
status |
Variant lifecycle status |
created_at |
Creation timestamp |
updated_at |
Last modification timestamp |
A unique database constraint should protect SKU uniqueness according to the business's scope. Some businesses require globally unique SKUs; others scope them by tenant, seller, or catalog.
4.4 Category table
A category can contain a reference to its parent category.
category
--------
id
name
slug
parent_id
status
sort_order
A root category has a null parent_id. Child categories reference their parent.
For larger catalogs, evaluate how category hierarchies will be queried. Recursive SQL, materialized paths, closure tables, and nested-set approaches each have different trade-offs.
4.5 Attribute definitions and values
An attribute definition describes what a field means and how it should behave.
For example:
| Attribute code | Data type | Category | Filterable |
|---|---|---|---|
color |
String or controlled value | Apparel | Yes |
size |
String or controlled value | Apparel | Yes |
screen_size_inches |
Decimal | Electronics | Yes |
ram_gb |
Integer | Computers | Yes |
water_resistant |
Boolean | Watches | Yes |
Separating definitions from values helps a business add new category-specific attributes without creating a new database column for every possible property.
However, flexible attribute models introduce complexity. Validation, indexing, sorting, type safety, and reporting must be designed deliberately.
5. Modeling Flexible Product Attributes
One of the most important catalog design decisions is how to store attributes that vary by category.
Option 1: Fixed columns
Example:
product
-------
id
name
brand
color
size
weight
processor
ram
storage
material
Advantages
- Simple SQL queries
- Strong typing
- Straightforward constraints
- Easy reporting for a stable product domain
Disadvantages
- Many irrelevant columns
- Frequent schema changes
- Poor fit for a large number of unrelated product categories
Fixed columns work well when the attribute set is small and stable.
Option 2: Entity-attribute-value (EAV)
In an EAV model, attributes and their values are stored separately.
Example:
product_attribute_value
-----------------------
product_id | attribute_code | value
------------------------------------
P100 | color | Black
P100 | ram_gb | 16
P100 | storage_gb | 512
Advantages
- Flexible attribute definitions
- New attributes can be introduced without changing the product table
- Supports heterogeneous categories
Disadvantages
- Complex queries and joins
- Type validation requires additional design
- Filtering and sorting can become expensive
- Unique constraints across attribute combinations are harder to enforce
Avoid storing every attribute as an untyped string if numeric comparisons, validation, or sorting are important.
Option 3: JSON attributes
A product may contain a JSON attribute object.
{
"color": "Black",
"ramGb": 16,
"storageGb": 512,
"processor": "Example Processor"
}
Advantages
- Flexible structure
- Natural representation for nested attributes
- Fewer joins for reading product details
- Supported by many modern databases
Disadvantages
- Validation must be enforced deliberately
- Database-specific indexing behavior
- Harder to guarantee consistent schemas across categories
- Analytics can become difficult if the model is not governed
5.1 Recommended hybrid approach
For many commerce systems, a hybrid model is a practical starting point:
- Keep core identity and lifecycle fields in relational columns.
- Keep category definitions in dedicated tables.
- Store flexible product attributes in JSON or typed attribute tables.
- Use a search index for high-volume discovery and filtering.
- Keep price, inventory, and order data in their authoritative systems.
This approach provides flexibility without making every business concept unstructured.
6. Product and Variant Lifecycle
Products should follow a controlled lifecycle instead of becoming visible as soon as a record is created.
A typical workflow is:
stateDiagram-v2
[*] --> Draft
Draft --> Enrichment
Enrichment --> Validation
Validation --> InReview
InReview --> Approved
InReview --> Draft: Corrections Required
Approved --> Published
Published --> Unpublished
Unpublished --> Published
Published --> Archived
Draft --> Archived
The exact lifecycle depends on business requirements. Some catalogs need only draft and published states; others require supplier onboarding, compliance approval, localization, or channel-specific publication.
6.1 Draft
The product record exists, but information may be incomplete. It should not automatically appear in customer-facing search results.
6.2 Enrichment
Content teams or automated processes add descriptions, specifications, images, translations, and merchandising metadata.
6.3 Validation
The system verifies required fields, attribute types, category rules, identifier uniqueness, and asset references.
6.4 Review and approval
Authorized users review product information when approval is required by business policy.
6.5 Publication
The product is approved for a specific storefront, marketplace, region, or sales channel.
Publication may trigger events that update search indexes, caches, feeds, and downstream systems.
6.6 Unpublishing and archiving
Unpublishing removes the product from a particular sales channel without necessarily deleting its historical data. Archiving indicates that the product is no longer actively maintained or sold.
Avoid hard deletion when products are referenced by historical orders, audit records, or regulatory records. Retention policies should be explicit.
7. Catalog Validation and Data Quality
Catalog quality is a major operational concern, especially when product information comes from suppliers, manufacturers, internal teams, and third-party feeds.
7.1 Required-field validation
A product may require:
- Product name
- Brand
- Primary category
- Product description
- At least one valid image
- One or more variants when variants are required
- Category-specific mandatory attributes
Requirements should be defined by category and publication channel rather than hardcoded as one universal list.
7.2 Type and range validation
Examples:
weight_kgmust be a positive number.ram_gbmust be an integer within an allowed range.water_resistantmust be a Boolean.colormust use an allowed value when controlled vocabulary is required.release_datemust follow a valid date format.
7.3 Uniqueness validation
Examples:
- SKU must be unique within its defined scope.
- External product identifiers must follow their relevant uniqueness rules.
- A category slug may need to be unique within a storefront or locale.
Enforce critical uniqueness constraints in the database. Application-level checks alone can fail when concurrent requests attempt to create the same identifier.
7.4 Asset validation
Image and document validation can check:
- File type
- File size
- Required image roles
- Image dimensions
- Asset availability
- Malware scanning where appropriate
- Licensing or usage metadata where required
Store asset metadata and durable references in the catalog. Large binary assets are generally better managed by an object-storage or digital-asset-management solution.
7.5 Data quality metrics
Useful metrics include:
- Percentage of products missing mandatory attributes
- Percentage of products with invalid identifiers
- Number of products blocked from publication
- Duplicate product detection rate
- Product image coverage
- Catalog feed processing failures
- Time from draft creation to publication
- Percentage of published products with stale or invalid data
These metrics help teams identify operational issues before they affect customers.
8. Product Catalog APIs
A catalog API should separate administrative operations from customer-facing discovery.
8.1 Administrative endpoints
Example REST API:
POST /api/admin/v1/products
GET /api/admin/v1/products/{productId}
PUT /api/admin/v1/products/{productId}
PATCH /api/admin/v1/products/{productId}
POST /api/admin/v1/products/{productId}/validate
POST /api/admin/v1/products/{productId}/publish
POST /api/admin/v1/products/{productId}/unpublish
POST /api/admin/v1/products/{productId}/variants
GET /api/admin/v1/categories
The API should validate requests, enforce authorization, return meaningful errors, and avoid exposing internal database structures unnecessarily.
8.2 Customer-facing endpoints
GET /api/store/v1/products/{productId}
GET /api/store/v1/products?category=running-shoes
GET /api/store/v1/products?brand=ExampleBrand
GET /api/store/v1/products?color=Black&size=9
GET /api/store/v1/categories
GET /api/store/v1/products/{productId}/related
For high-volume search and filtering, a dedicated search endpoint is often more appropriate than attempting to implement every discovery use case through relational database queries.
8.3 Pagination and sorting
A large catalog should never return every product in one response.
Example:
GET /api/store/v1/products?limit=24&cursor=eyJpZCI6IjEwMCJ9
Cursor-based pagination can be more stable than offset pagination for large or frequently changing result sets, provided the cursor is based on a deterministic ordering.
For administrative tables, offset pagination may be adequate at moderate scale. Choose the strategy according to the expected workload.
8.4 API error handling
Common error scenarios include:
| Scenario | Typical HTTP response |
|---|---|
| Invalid request fields | 400 Bad Request |
| Product not found | 404 Not Found |
| Duplicate SKU | 409 Conflict |
| User lacks permission | 403 Forbidden |
| Unauthenticated request | 401 Unauthorized |
| Rate limit exceeded | 429 Too Many Requests |
| Unexpected service failure | 500 Internal Server Error |
Use a consistent error structure with a machine-readable code, a human-readable message, and field-level details when appropriate.
9. Implementing a Product Catalog with Java and Spring Boot
Let's build a simplified catalog domain using Java, Spring Boot, Spring Data JPA, and a relational database.
This example focuses on product creation and retrieval. A production implementation would also include authentication, category and variant management, validation workflows, audit records, and publication events.
9.1 Define the product status
public enum ProductStatus {
DRAFT,
IN_REVIEW,
APPROVED,
PUBLISHED,
UNPUBLISHED,
ARCHIVED
}
9.2 Create the product entity
import jakarta.persistence.*;
import java.time.Instant;
import java.util.UUID;
@Entity
@Table(name = "products")
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@Column(nullable = false, length = 200)
private String name;
@Column(nullable = false, length = 100)
private String brand;
@Column(length = 5000)
private String description;
@Enumerated(EnumType.STRING)
@Column(nullable = false, length = 30)
private ProductStatus status = ProductStatus.DRAFT;
@Version
private long version;
@Column(nullable = false, updatable = false)
private Instant createdAt;
@Column(nullable = false)
private Instant updatedAt;
protected Product() {
}
public Product(String name, String brand, String description) {
this.name = name;
this.brand = brand;
this.description = description;
this.status = ProductStatus.DRAFT;
}
@PrePersist
void onCreate() {
Instant now = Instant.now();
this.createdAt = now;
this.updatedAt = now;
}
@PreUpdate
void onUpdate() {
this.updatedAt = Instant.now();
}
public UUID getId() {
return id;
}
public String getName() {
return name;
}
public String getBrand() {
return brand;
}
public String getDescription() {
return description;
}
public ProductStatus getStatus() {
return status;
}
public long getVersion() {
return version;
}
}
Important design considerations:
UUIDprovides an internal identifier that is independent of the product name.@Versionenables optimistic locking to help prevent silent overwrites during concurrent updates.ProductStatusrepresents the lifecycle explicitly.- Timestamps support audit and operational troubleshooting.
- Database migrations should define production constraints and indexes.
For a complete application, add controlled methods for updating fields and changing status rather than allowing arbitrary lifecycle changes.
9.3 Define the repository
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.UUID;
public interface ProductRepository
extends JpaRepository<Product, UUID> {
}
Spring Data JPA provides common persistence operations. More complex searches should use explicit repository queries or a search service.
9.4 Define request and response DTOs
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
public record CreateProductRequest(
@NotBlank
@Size(max = 200)
String name,
@NotBlank
@Size(max = 100)
String brand,
@Size(max = 5000)
String description
) {
}
A DTO separates the public API contract from the persistence model.
This prevents clients from setting protected fields such as internal IDs, publication status, or audit timestamps through an unrestricted entity-binding operation.
9.5 Create the service layer
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.UUID;
@Service
public class ProductService {
private final ProductRepository productRepository;
public ProductService(ProductRepository productRepository) {
this.productRepository = productRepository;
}
@Transactional
public Product create(CreateProductRequest request) {
Product product = new Product(
request.name().trim(),
request.brand().trim(),
request.description()
);
return productRepository.save(product);
}
@Transactional(readOnly = true)
public Product getById(UUID productId) {
return productRepository.findById(productId)
.orElseThrow(() ->
new ProductNotFoundException(productId));
}
}
The service layer coordinates domain behavior and persistence. As the system grows, it can also coordinate validation, category rules, audit logging, and publication workflows.
9.6 Add a domain-specific exception
import java.util.UUID;
public class ProductNotFoundException
extends RuntimeException {
public ProductNotFoundException(UUID productId) {
super("Product not found: " + productId);
}
}
Map this exception to a consistent 404 Not Found response using @ControllerAdvice.
9.7 Create the REST controller
import jakarta.validation.Valid;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import java.util.UUID;
@RestController
@RequestMapping("/api/admin/v1/products")
public class ProductAdminController {
private final ProductService productService;
public ProductAdminController(ProductService productService) {
this.productService = productService;
}
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
public Product create(
@Valid @RequestBody CreateProductRequest request) {
return productService.create(request);
}
@GetMapping("/{productId}")
public Product getById(@PathVariable UUID productId) {
return productService.getById(productId);
}
}
This controller illustrates the basic flow, but a production API should return response DTOs rather than expose JPA entities directly. It should also apply role-based authorization and avoid exposing administrative endpoints to anonymous storefront users.
9.8 Example create-product request
POST /api/admin/v1/products
Content-Type: application/json
{
"name": "Wireless Headphones",
"brand": "Example Audio",
"description": "Wireless headphones with noise cancellation."
}
A successful request creates a draft product. The product should not become publicly searchable until it satisfies the relevant validation and publication rules.
9.9 Production implementation checklist
Before deploying the service, add:
- Request and response DTOs
- Global exception handling
- Authentication and role-based authorization
- Database migrations
- Unique constraints and appropriate indexes
- Optimistic locking conflict handling
- Audit logging
- Integration and unit tests
- API documentation
- Structured logging and metrics
- Rate limiting where needed
- Publication workflow and event handling
10. Product Variants and SKU Management
Variant modeling is one of the most important areas in an e-commerce catalog.
Consider a shirt available in three colors and four sizes. If every combination is valid, the product has twelve variants.
However, not every product follows a simple Cartesian product. Some sizes may not be available in particular colors, or some configurations may require additional components.
10.1 Parent product and variant relationship
flowchart TD
A[Product: Cotton T-Shirt] --> B[Variant: Black / S]
A --> C[Variant: Black / M]
A --> D[Variant: White / S]
A --> E[Variant: White / M]
The parent product usually holds shared content such as the description and brand. Variants hold configuration-specific data such as SKU and variant attributes.
Some fields may be inherited from the parent, overridden at the variant level, or calculated from other systems. Define those rules explicitly.
10.2 SKU uniqueness
A common implementation is a database constraint:
CREATE TABLE product_variants (
id UUID PRIMARY KEY,
product_id UUID NOT NULL REFERENCES products(id),
sku VARCHAR(100) NOT NULL,
status VARCHAR(30) NOT NULL,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
CONSTRAINT uq_product_variants_sku UNIQUE (sku)
);
This example assumes SKUs are globally unique. If the business scopes SKUs by tenant or seller, the constraint must reflect that scope.
The application should also normalize identifiers consistently, such as trimming whitespace and applying the business-defined case-sensitivity rules.
10.3 Do not confuse variants with inventory
A catalog variant identifies a sellable configuration. Inventory represents the quantity or availability of that item at a location or fulfillment node.
For example, a size 9 black shoe can exist in the catalog while being out of stock in one warehouse and available in another.
Keep these responsibilities separate:
- Catalog: What is the product?
- Inventory: How much is available, and where?
- Pricing: What price applies?
- Order management: What did the customer purchase?
The storefront can combine these views to display a complete shopping experience.
11. Category and Attribute Architecture
Categories are not just navigation labels. They can determine required fields, filters, product templates, and merchandising rules.
11.1 Category-specific attributes
Example:
| Category | Attribute | Data type | Required |
|---|---|---|---|
| Laptops | RAM | Integer | Yes |
| Laptops | Storage | Integer | Yes |
| Laptops | Processor | String or reference | Yes |
| Shoes | Size | Controlled value | Yes for applicable variants |
| Shoes | Material | Controlled value | Depends on policy |
| Furniture | Width | Decimal with unit | Yes |
| Furniture | Assembly required | Boolean | Depends on policy |
Use stable attribute codes such as ram_gb instead of relying on display labels such as Memory Size.
Display labels can change by language or business preference. Stable codes are better for integrations, APIs, and data processing.
11.2 Attribute governance
A mature catalog should define:
- Attribute code and display name
- Data type
- Allowed values
- Unit of measurement
- Required or optional status
- Search and filter behavior
- Variant-defining behavior
- Localization rules
- Validation rules
- Category applicability
For example, dimensions should not be represented ambiguously. A width of 20 is incomplete unless the system knows whether it means centimeters, inches, or another unit.
Use standardized units or an explicit unit model.
11.3 Attribute versioning
Changing an attribute definition may affect thousands of products and multiple integrations.
Examples:
- Renaming an attribute
- Changing a unit
- Restricting allowed values
- Changing a field from optional to required
- Changing whether the attribute is searchable
Treat significant schema changes as governed operations. Use migrations, compatibility rules, validation reports, and staged rollout rather than changing production behavior without impact analysis.
12. Product Catalog Search and Discovery
A catalog can contain millions of product records. Customer-facing search requires more than a simple SQL query against product names.
12.1 Search requirements
Typical search capabilities include:
- Full-text matching
- Typo tolerance
- Synonyms
- Category filters
- Brand filters
- Price ranges
- Attribute filters
- Sorting
- Autocomplete
- Relevance ranking
- Personalized recommendations
For example, a customer searches for "lightweight running shoes" and filters by brand, size, and color.
The search service must translate those filters into an efficient query over the indexed catalog representation.
12.2 Search index document
A search index document may contain:
{
"productId": "product-100",
"name": "Lightweight Running Shoes",
"brand": "Example Sports",
"categories": ["running-shoes", "footwear"],
"attributes": {
"color": ["Black"],
"material": ["Mesh"]
},
"published": true
}
A production document may also include localized fields, variant information, ranking signals, and other denormalized values needed for discovery.
Do not blindly copy every internal field into the search index. Include only the information required for search, filtering, ranking, and display.
12.3 Search indexing workflow
sequenceDiagram
participant Admin as Catalog Admin
participant API as Catalog API
participant DB as Catalog Database
participant Outbox as Outbox Table
participant Broker as Event Broker
participant Indexer as Search Indexer
participant Search as Search Index
Admin->>API: Update product
API->>DB: Save catalog changes
API->>Outbox: Record publication event
API-->>Admin: Return result
Outbox->>Broker: Publish event
Broker->>Indexer: Deliver event
Indexer->>DB: Load current product data
Indexer->>Search: Upsert search document
This diagram illustrates the transactional outbox pattern. In a practical implementation, the catalog changes and outbox record are committed in the same database transaction. A separate publisher reads the outbox and publishes events.
The event broker and search index are not normally part of the same database transaction.
12.4 Handling stale search results
The database and search index may temporarily disagree.
For example:
- A product is unpublished.
- The database commits the status change.
- The search index has not yet processed the update.
- A customer search may briefly return the old document.
Mitigations include:
- Fast and reliable event processing
- Retry policies and dead-letter queues
- Idempotent index updates
- Monitoring index lag
- Periodic reconciliation
- Filtering results against authoritative publication state when required
The appropriate consistency model depends on the business. A short delay may be acceptable for descriptive content, but certain publication, compliance, or availability rules may require stronger safeguards.
13. Event-Driven Catalog Integration
A product catalog often supplies information to many downstream systems.
Instead of requiring every consumer to repeatedly poll the catalog, the system can publish domain events.
Example event types:
ProductCreated
ProductUpdated
ProductValidated
ProductApproved
ProductPublished
ProductUnpublished
ProductArchived
ProductVariantCreated
ProductVariantUpdated
CategoryUpdated
Events should describe meaningful business changes rather than merely exposing database implementation details.
13.1 Example product-published event
{
"eventId": "event-789",
"eventType": "ProductPublished",
"eventVersion": 1,
"occurredAt": "2026-10-27T15:30:00Z",
"productId": "product-100",
"catalogVersion": 12,
"channel": "web"
}
The example uses a notification-style event. Consumers retrieve the required product data using the product ID and version, or the event contract can include an approved data snapshot.
Choose the event payload based on privacy, coupling, performance, and consistency requirements.
13.2 Transactional outbox pattern
A common failure scenario occurs when the application saves the product to the database but fails to publish the corresponding event.
The transactional outbox pattern solves the dual-write problem by writing the business update and an outbox record within the same database transaction.
A background publisher then sends the outbox event to the broker.
Important considerations:
- Outbox records must be retried safely.
- Consumers should be idempotent.
- Events may be delivered more than once.
- Monitoring should detect delayed or failed publication.
- Outbox cleanup must preserve records long enough for operational needs.
Do not assume event delivery is exactly once simply because a broker offers strong delivery guarantees within a particular boundary.
13.3 Idempotent consumer
An event consumer should tolerate duplicate delivery.
One approach is to store processed event IDs:
processed_events
----------------
consumer_name
event_id
processed_at
Use a unique constraint on the appropriate consumer and event identifier combination. Record successful processing consistently with the consumer's business update where possible.
For search indexing, an idempotent upsert using a product identifier and catalog version is often simpler than treating every event as an independent insert.
14. Integrating with Pricing, Inventory, and Orders
A product catalog is part of the broader commerce platform. It should integrate with neighboring systems without absorbing their responsibilities.
14.1 Pricing integration
The catalog may store basic product metadata, but the pricing service typically owns the authoritative selling price when pricing depends on:
- Customer segment
- Promotions
- Region
- Currency
- Contract terms
- Sales channel
- Time-based pricing
A storefront may combine product information from the catalog with a price quote from the pricing service.
14.2 Inventory integration
Inventory services manage stock by SKU, warehouse, fulfillment node, or other business dimensions.
The catalog may expose variant identifiers and relevant product attributes, while inventory provides availability.
Avoid storing a single stock quantity in the catalog if stock changes independently across locations.
14.3 Order management integration
Order management references the product and variant identifiers selected by the customer.
When an order is placed, the system should preserve an appropriate product snapshot, including relevant names, SKU, and purchase-time descriptions. Historical orders should not change unexpectedly when the current catalog description is edited.
Pricing and tax snapshots must follow their own business rules and authoritative records.
14.4 Integration ownership matrix
| Information | Typical authoritative system |
|---|---|
| Product name and description | Catalog or PIM |
| Category and product attributes | Catalog or PIM |
| SKU and variant identity | Catalog or product master |
| Current selling price | Pricing service |
| Promotion eligibility | Promotion service |
| Available stock | Inventory service |
| Cart contents | Shopping cart service |
| Confirmed order | Order management |
| Shipment tracking | Fulfillment or shipping service |
| Product discovery index | Search platform, derived from source data |
The precise ownership model varies by organization. Document it explicitly to avoid multiple services independently modifying the same business data.
15. Product Catalog Security
Catalog administration is a high-impact capability because unauthorized changes can alter product content, publication status, or sales-channel availability.
15.1 Authentication and authorization
Use the organization's identity provider and enforce authorization on the server.
Example roles:
- Catalog Viewer
- Catalog Editor
- Catalog Approver
- Catalog Administrator
- Supplier Integration Client
A user who can edit product content should not automatically be able to approve or publish every product.
Apply least privilege and separate duties where business controls require it.
15.2 Supplier integration security
Supplier feeds and external integrations should use authenticated service identities.
Controls may include:
- OAuth 2.0 client credentials or equivalent machine authentication
- API scopes
- Signed requests where appropriate
- Rate limits
- Schema validation
- File type and content checks
- Idempotency controls
- Audit trails
- Secrets management
Treat incoming supplier data as untrusted. Never assume a valid supplier identity guarantees that every field is correct or safe.
15.3 Audit and traceability
Record important actions such as:
- Who created or changed a product
- Which attributes changed
- When the change occurred
- Who approved or published the product
- Which source system supplied the data
- Whether the change was accepted or rejected
For high-value or regulated product domains, consider immutable audit storage and stronger approval controls.
16. Performance and Scalability
Catalog systems need to support both administrative updates and high-volume customer reads.
16.1 Read-heavy workloads
Customer-facing traffic often consists of many more reads than administrative writes.
Common optimizations include:
- CDN caching for suitable public assets
- Application-level caching for frequently requested product details
- Search indexes for full-text and faceted queries
- Database indexes for common lookups
- Pagination
- Connection pooling
- Query optimization
- Precomputed category summaries
Cache invalidation must be tied to product updates and publication changes. Avoid caching unpublished or unauthorized content in publicly accessible caches.
16.2 Database indexing
Potential indexes include:
CREATE INDEX idx_products_status
ON products(status);
CREATE INDEX idx_products_brand
ON products(brand);
CREATE INDEX idx_product_variants_product_id
ON product_variants(product_id);
These are illustrative examples, not a universal index strategy. Evaluate query plans, cardinality, write overhead, and actual access patterns before adding indexes.
If product names or descriptions require complex full-text search, use an appropriate database capability or dedicated search engine rather than assuming a basic B-tree index is sufficient.
16.3 Bulk catalog imports
Large catalogs may be loaded from CSV, XML, JSON, supplier APIs, or enterprise product systems.
A reliable import pipeline should:
- Authenticate the source.
- Validate file format and schema.
- Stage incoming records.
- Normalize identifiers and values.
- Validate category-specific attributes.
- Detect duplicates and conflicting updates.
- Apply accepted changes in controlled batches.
- Publish change events.
- Generate a reconciliation report.
- Quarantine invalid records for correction.
For large imports, avoid holding a single database transaction open for the entire file. Use bounded batches and explicit recovery procedures.
16.4 Bulk update safety
Bulk operations should support:
- Dry-run validation
- Batch identifiers
- Idempotent retries
- Per-record results
- Partial failure reporting
- Rate limits
- Rollback or compensation strategies where feasible
A single invalid product should not silently corrupt an entire import. Decide whether the batch is atomic or permits partial acceptance, and communicate that behavior clearly.
17. Multi-Tenant and Multi-Channel Catalogs
Large commerce platforms may manage multiple sellers, brands, storefronts, regions, and languages.
17.1 Multi-tenant catalog
A multi-tenant system may separate product data by tenant.
Possible isolation models include:
- Shared tables with a tenant identifier
- Separate schemas
- Separate databases
Shared tables can be cost-efficient, but every query and uniqueness constraint must enforce tenant isolation. Stronger isolation models may be appropriate for strict regulatory or contractual requirements.
17.2 Multi-channel publication
A product can be published to one channel and remain a draft or unpublished in another.
For example:
Product: Premium Headphones
Website: Published
Mobile App: Published
Marketplace A: Pending Approval
Marketplace B: Unpublished
A single global product status may not represent these states accurately.
Consider a separate channel publication entity:
product_channel_publication
---------------------------
product_id
channel_id
status
published_at
last_sync_status
last_sync_at
The publication model can track channel-specific requirements, errors, and synchronization state.
17.3 Localization
Localized catalogs may need translations for:
- Product name
- Description
- Features
- Category labels
- Attribute labels
- Marketing content
Separate stable product identity from localized display content. Use explicit locale identifiers and define fallback behavior when a translation is missing.
Localization also affects search analyzers, synonyms, sorting, and channel publication rules.
18. Observability and Operational Monitoring
A catalog system needs observability across synchronous APIs, database updates, asynchronous events, imports, and search indexing.
18.1 Technical metrics
Monitor:
- API request rate
- API latency percentiles
- HTTP error rates
- Database connection utilization
- Query latency
- Queue depth
- Event processing latency
- Search indexing delay
- Retry and dead-letter counts
- Cache hit ratio
18.2 Business metrics
Monitor:
- Number of active published products
- Number of products awaiting approval
- Catalog completeness percentage
- Supplier import success rate
- Products rejected during validation
- Average time to publish
- Number of products failing channel synchronization
- Number of published products missing required assets
18.3 Distributed tracing
Use trace and correlation IDs to follow a product update through:
- Administrative API
- Catalog service
- Database transaction
- Outbox publisher
- Message broker
- Search indexer
- Search platform
This is especially valuable when the database contains the latest product information but the storefront still displays stale content.
Avoid putting sensitive supplier credentials or unnecessary personal data into logs and traces.
19. Common Product Catalog Design Mistakes
Mistake 1: Treating a product and SKU as the same entity
A parent product may have many variants. Combining them into one record makes size, color, inventory, and fulfillment behavior harder to model.
Better approach: Separate product identity from variant identity when the domain requires multiple configurations.
Mistake 2: Putting price and stock directly into the catalog as the only source
Pricing and inventory can change independently and have their own rules.
Better approach: Define authoritative ownership and integrate with pricing and inventory services.
Mistake 3: Making every product attribute a database column
This leads to sparse tables and frequent schema changes for heterogeneous product categories.
Better approach: Use a governed hybrid model, with stable core fields and flexible category-specific attributes.
Mistake 4: Using an ungoverned JSON document for everything
JSON provides flexibility but can create inconsistent values, poor filtering, and difficult analytics.
Better approach: Define attribute schemas, data types, validation, and indexing rules.
Mistake 5: Exposing draft products to customers
A product record's existence does not mean it is ready for sale.
Better approach: Use an explicit publication workflow and ensure storefront queries filter by channel and publication state.
Mistake 6: Assuming event delivery is exactly once
Duplicate events, retries, and partial failures are normal in distributed systems.
Better approach: Use idempotent consumers, version-aware updates, retry policies, and reconciliation.
Mistake 7: Updating the database without updating search
A database update alone does not guarantee that the search index has been refreshed.
Better approach: Use reliable event publication, monitor indexing lag, and implement reconciliation.
Mistake 8: Deleting products without considering history
Orders and reports may reference old product data.
Better approach: Use lifecycle states, archival policies, and order snapshots instead of indiscriminate hard deletion.
Mistake 9: Ignoring attribute units and controlled values
Values such as 10, Large, and XL can be ambiguous or inconsistent.
Better approach: Define units, allowed values, normalization, and validation rules.
Mistake 10: Creating too many microservices too early
Splitting catalog management, attributes, categories, variants, and publication into separate services can introduce unnecessary network calls and distributed transactions.
Better approach: Start with clear domain boundaries. Split services when scale, independent ownership, deployment needs, or organizational boundaries justify the additional complexity.
20. Hands-On Project: Build a Product Catalog Service
Create a catalog service for an online store selling electronics, clothing, and home products.
Project requirements
The service should support:
- Creating and updating products
- Defining categories and category hierarchies
- Creating product variants and SKUs
- Defining category-specific attributes
- Validating product completeness
- Publishing and unpublishing products
- Searching and filtering published products
- Publishing product-change events
- Tracking import failures
- Recording audit history
Suggested technology stack
| Layer | Technology |
|---|---|
| Programming language | Java |
| Application framework | Spring Boot |
| API | Spring MVC / REST |
| Persistence | Spring Data JPA |
| Database | PostgreSQL |
| Search | OpenSearch or Elasticsearch |
| Messaging | Kafka or another supported broker |
| Caching | Redis, if justified by workload |
| Object storage | S3-compatible storage for product assets |
| Security | Spring Security and OAuth 2.0/OIDC |
| Observability | Micrometer, OpenTelemetry, and centralized logs |
| Testing | JUnit, Mockito, and integration tests with Testcontainers |
You do not need every component on day one. Begin with a modular Spring Boot application and PostgreSQL, then add search, messaging, and caching as explicit learning stages.
Phase 1: Core catalog
Implement:
- Product entity
- Product repository
- Product service
- REST endpoints
- Request validation
- Database migrations
- Exception handling
Deliverable: A working product CRUD API with automated tests.
Phase 2: Categories and attributes
Implement:
- Category hierarchy
- Category-product associations
- Attribute definitions
- Attribute validation
- Product attribute storage
Deliverable: Products can have category-specific attributes with validation rules.
Phase 3: Variants and SKUs
Implement:
- Parent-child product relationships
- Variant creation
- SKU uniqueness
- Variant-specific attributes
- Product-to-variant retrieval
Deliverable: A product can have multiple valid variants with unique identifiers.
Phase 4: Publication workflow
Implement:
- Draft state
- Validation endpoint
- Approval workflow
- Publication and unpublication
- Channel-specific publication status
Deliverable: Only eligible products are exposed through customer-facing APIs.
Phase 5: Search
Implement:
- Search index
- Product indexing
- Text search
- Category and attribute filters
- Pagination and sorting
- Index update monitoring
Deliverable: Customers can search and filter published products efficiently.
Phase 6: Event-driven integration
Implement:
- Transactional outbox
- Product lifecycle events
- Search index consumer
- Retry handling
- Idempotent processing
- Dead-letter monitoring
Deliverable: Catalog changes propagate reliably to downstream consumers.
Phase 7: Production readiness
Add:
- Authentication and role-based authorization
- Audit history
- Rate limiting
- Structured logs
- Metrics and traces
- Performance tests
- Bulk import support
- Reconciliation jobs
- Deployment and recovery documentation
Deliverable: A catalog service with a documented operational model.
21. What to Practice
Use this checklist to evaluate your understanding and implementation.
- Explain the difference between a product, variant, SKU, and external product identifier.
- Explain the difference between a product catalog and a PIM system.
- Design a product-category relationship that supports multiple category assignments.
- Compare fixed columns, EAV, and JSON for flexible attributes.
- Design a variant model that enforces SKU uniqueness.
- Define a product publication state machine.
- Explain how category-specific validation works.
- Design REST APIs for administrative and storefront use cases.
- Explain why the search index is usually a derived data store.
- Implement an event-driven search indexing workflow.
- Explain how the transactional outbox pattern prevents lost database-to-event updates.
- Design an idempotent consumer.
- Explain catalog, pricing, and inventory ownership boundaries.
- Design bulk import validation and reconciliation.
- Describe tenant isolation and channel-specific publication.
- Define technical and business observability metrics.
- Explain how historical orders remain stable when product data changes.
22. Solution Architect Interview Questions
Fundamental questions
1. What is a product catalog system?
A system responsible for managing and distributing product identity, descriptions, categories, attributes, variants, and publication information to commerce applications and channels.
2. What is the difference between a product and a SKU?
A product represents an item or product family. A SKU identifies a specific stock-managed configuration. The relationship depends on the domain, but a product can have multiple SKUs when it has variants.
3. Why do catalogs need category-specific attributes?
Different product categories require different specifications. Category-specific schemas support relevant validation, filters, product details, and consistent product data without forcing every product into the same attribute structure.
Data modeling questions
4. Would you choose relational tables or JSON for product attributes?
I would assess attribute stability, validation requirements, query patterns, reporting needs, and operational expertise. A hybrid model often works well: relational fields for core identity and lifecycle, with governed JSON or typed attribute tables for flexible properties.
5. How would you prevent duplicate SKUs?
Normalize SKU input according to business rules, validate it at the application layer for user-friendly feedback, and enforce the required uniqueness scope using a database constraint. Application checks alone are not sufficient under concurrency.
6. How would you represent a product that belongs to multiple categories?
Use a many-to-many association between products and categories, with additional metadata if the relationship needs channel, locale, or primary-category semantics.
Architecture questions
7. Why use a search engine instead of querying the catalog database for every search?
A dedicated search engine provides capabilities such as relevance ranking, full-text matching, typo tolerance, and faceted filtering. It also isolates discovery workloads from transactional database workloads.
8. How do you keep the search index synchronized with the catalog?
Publish reliable change events, update the index idempotently, monitor indexing lag, retry failures, and reconcile the index periodically against authoritative catalog state.
9. How would you prevent product updates from being lost when publishing events?
Use the transactional outbox pattern so the catalog update and event record are committed in the same database transaction. A separate publisher sends the event and retries safely.
10. Should price and inventory belong in the catalog database?
They may be represented as read models for convenience, but their authoritative ownership should remain clear. If price and inventory change independently, dedicated pricing and inventory systems are generally better sources of truth.
Reliability and scalability questions
11. How would you handle a supplier import containing one million products?
Use staged ingestion, schema validation, bounded processing batches, idempotent upserts, per-record error reporting, backpressure, and reconciliation. Avoid a single long-running transaction for the entire import.
12. How would you prevent unpublished products from appearing in search results?
Enforce publication eligibility in indexing and query filtering, monitor index propagation delays, and use an authoritative validation or suppression mechanism for cases where stale visibility is unacceptable.
13. How would you design a multi-channel catalog?
Separate product identity and shared content from channel-specific publication state. Track each channel's validation, publication, and synchronization status independently.
14. How would you monitor catalog quality?
Track required-attribute completeness, invalid records, duplicate identifiers, publication failures, import success rates, search-index lag, and channel synchronization failures.
23. Key Takeaways
- A product catalog is a core e-commerce capability that manages product identity, descriptions, categories, attributes, variants, and publication state.
- A PIM system often focuses on product data enrichment and governance, while a commerce catalog serves commerce applications and sales channels.
- Product, variant, SKU, category, attribute, and publication concepts should be modeled explicitly.
- Flexible attributes can use fixed columns, EAV, JSON, or a hybrid approach, depending on query and governance requirements.
- Product validation and publication workflows protect customers from incomplete or invalid product information.
- Search indexes are usually derived data stores that must be synchronized with authoritative catalog data.
- Event-driven integration, the transactional outbox pattern, idempotent consumers, and reconciliation improve reliability.
- Pricing, inventory, and order management have separate responsibilities and should have clearly defined ownership boundaries.
- Multi-tenant and multi-channel catalogs need explicit isolation and publication rules.
- Production-ready catalog systems require security, auditability, observability, data quality controls, and a practical recovery strategy.
Was this guide helpful?
CodeWithVenu is free to read, with no paywall. If this guide saved you time or helped you prepare, a small voluntary contribution helps me write more practical tutorials, architecture guides, and interview-prep content.