Database Modeling and Query Practices for Figure Collectible Catalogs

    This article presents a vendor-neutral approach to modeling and querying a collectible figure catalog. It explains why a wide table fails over time, how to separate logical items from physical releases, and how to represent uncertain values such as unknown pricing or pending release months with explicit status fields. It also covers tag dictionaries and faceted search, a three-stage import governance pipeline, indexing, caching, and hot/cold data tiering, plus a pre-launch checklist. The design maps directly to mainstream relational databases and general cloud capabilities.

    1. Background: From a Single Listing Page to a Data Model

    The source material describes a catalog entry for a scale figure collectible with the following structured elements: series membership, work title, character name, motif theme, scale class, appearance tags, release channel type, pricing status, release month, and manufacturer. Pages like this share one trait: few fields but dense semantics, along with many optional or uncertain values (for example, an unknown price or a release date far in the future).

    Stuffing the raw page text into one wide table looks convenient in the short term but creates three problems over time:

    1. Semantic drift: the same “series” is written inconsistently across entries, which distorts aggregate statistics.
    2. Null proliferation: many fields are empty during the pre-release stage, making business rules hard to express consistently.
    3. Difficult extension: adding dimensions such as “re-release,” “bundle,” or “limited channel” later forces frequent schema changes.

    This article therefore avoids any specific product and instead abstracts the problem into general modeling and query practices for a collectible catalog system.

    2. Domain Abstraction: Separate the “Object” from the “Version”

    The first modeling principle is to distinguish the logical entity from the physical version. This is especially clear in the collectible domain: the same character and the same motif theme may exist as an initial release, a re-release, and multiple channel-limited physical versions, while all of them share many attributes for business purposes.

    Suggested entity breakdown:

    • Work: work name, work type.
    • Character: character name, parent work.
    • Series: series name, used for aggregation and navigation.
    • Motif: an appearance theme tag, such as “bunny girl.”
    • Item: the logical-level “this particular design.”
    • Release: the channel, pricing, and release month of a specific batch.
    • Tag and join table: descriptive tags such as “mild appearance,” many-to-many.

    The benefit: when a release date changes from “TBD” to “April 2027,” you only add or update one release record instead of modifying the item itself.

    3. Sample Schema (Independent of Any Specific Database Product)

    The following uses generic SQL syntax so it can be migrated to any relational database:

    1. CREATE TABLE work (
    2. id BIGINT PRIMARY KEY,
    3. name VARCHAR(128) NOT NULL,
    4. created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
    5. );
    6. CREATE TABLE item (
    7. id BIGINT PRIMARY KEY,
    8. series_id BIGINT REFERENCES series(id),
    9. character_id BIGINT REFERENCES character(id),
    10. motif_id BIGINT REFERENCES motif(id),
    11. scale_class VARCHAR(16), -- scale class, e.g. 1/4, non-scale
    12. channel_class VARCHAR(16), -- release channel type, e.g. prize, retail
    13. title VARCHAR(200) NOT NULL,
    14. UNIQUE (series_id, character_id, motif_id)
    15. );
    16. CREATE TABLE release (
    17. id BIGINT PRIMARY KEY,
    18. item_id BIGINT NOT NULL REFERENCES item(id),
    19. price_amount DECIMAL(12,2), -- nullable, means price unknown
    20. price_currency CHAR(3),
    21. ship_month CHAR(7), -- e.g. 2027-04, nullable
    22. is_price_tbd BOOLEAN NOT NULL DEFAULT TRUE,
    23. UNIQUE (item_id, ship_month, channel_class)
    24. );

    Key design points:

    • Both price and release month are nullable, with an explicit boolean flag for “TBD” so the application layer does not rely on magic values.
    • ship_month uses a fixed-length string rather than a full date, because catalog data is usually precise only to the month.
    • Unique constraints provide idempotency: re-importing the same version does not create dirty data.

    4. Representing Uncertain Values: Do Not Use One Null for Two Meanings

    “Price unknown” and “not yet priced” are not equivalent in business terms, and neither are “release month TBD” and “cancelled.” The recommended approach is to separate the missing value from the status:

    1. {
    2. "price": { "amount": null, "currency": null, "status": "TBD" },
    3. "release": { "ship_month": null, "status": "PLANNED" }
    4. }

    The recommended state machine is limited to: PLANNED, TBD, SHIPPED, and CANCELLED. All external query interfaces return this structure uniformly, so the frontend can render placeholder text such as “price unknown” in a consistent way without special-casing on every page.

    5. Tags and Search: Make “Appearance” a Controlled Vocabulary

    Subjective tags like “mild appearance” are prone to free-text sprawl. Implementation advice:

    1. Create a tag dictionary table (tag_dict) with tag name, category, and whether multiple selections are allowed.
    2. Link items and tags through a join table in a many-to-many relationship.
    3. Use tag categories as facets for search, for example combining filters across three dimensions: “appearance,” “scale,” and “channel.”

    Sample query: count entries per channel type under a given series.

    1. SELECT i.channel_class, COUNT(*) AS cnt
    2. FROM item i
    3. JOIN series s ON s.id = i.series_id
    4. WHERE s.name = :series_name
    5. GROUP BY i.channel_class
    6. ORDER BY cnt DESC;

    6. Import and Governance: Three Gates for External Catalog Data

    Catalog systems mostly ingest externally curated data, so a governance process is required:

    • Gate one, normalization: unify full-width and half-width characters, hyphens, and spaces; build an alias mapping table for character names and series names.
    • Gate two, validation: required fields, enum validity, and month format (regex ^\d{4}-(0[1-9]|1[0-2])).
    • Gate three, idempotent writes: rely on unique constraints for “update if exists” to avoid duplicate batches.
    1. import re
    2. MONTH_RE = re.compile(r"^\d{4}-(0[1-9]|1[0-2])$")
    3. def normalize_release(payload):
    4. month = (payload.get("ship_month") or "").strip()
    5. if month and not MONTH_RE.match(month):
    6. raise ValueError(f"invalid ship_month: {month}")
    7. return {
    8. "ship_month": month or None,
    9. "status": payload.get("status", "TBD"),
    10. "is_price_tbd": payload.get("price_amount") is None,
    11. }

    7. Performance and Scale: Indexing, Caching, and Hot/Cold Tiering

    Once entries grow beyond a hundred thousand, a read-heavy, write-light catalog system can be optimized in three ways:

    1. Index design: build composite indexes for frequent filters, such as (series_id, channel_class), (character_id), and ship_month; avoid function calls on indexed columns.
    2. Caching strategy: detail-page data changes rarely, so it suits long-lived caching keyed by item ID, with event-based invalidation when release status changes.
    3. Hot/cold tiering: entries shipped years ago see sparse access and can be archived to low-cost object storage while keeping only their index in the online database, loaded on demand when needed.

    For cloud deployment, a relational database can serve online transactional queries, object storage can hold archives and raw import files, a message queue can decouple import from index building, and logging plus monitoring with alerting can cover import failure rates and slow queries. These are all general capability categories; specific choices should be evaluated against the team’s existing technology stack.

    8. Pre-Launch Checklist

    • Are “item” and “release” modeled as distinct entities?
    • Do pending states use explicit enums rather than guesses based on nulls?
    • Do unique constraints cover re-import scenarios?
    • Do tags use a dictionary, and is faceted search supported?
    • Does the import pipeline have format validation and failure observability?
    • Do composite indexes match real query patterns, and are slow queries alerted on?
    • Is the archival strategy reversible, and has the recovery path been rehearsed?

    9. Summary

    Abstracting a single collectible listing page into a layered model of “work–character–series–item–version–tag,” expressing uncertain information with explicit states, guaranteeing import idempotency with unique constraints and validation, and then supporting growth with composite indexes, caching, and hot/cold tiering is the most reliable engineering path for this kind of catalog system. The approach depends on no specific vendor product, maps directly onto mainstream relational databases and general cloud capabilities, and can be implemented in environments such as Baidu AI Cloud according to a team’s existing standards.