Interactive demo · synthetic dataEvery record on this page is fabricated.

Style Master Data Entry

One style in two shapes, a column-per-attribute workbook and a database, and what a new request costs each.

The system behind this demo was engineered by Prada Dipa — LinkedIn profile, opens in a new tab and Luthfi Aditya — LinkedIn profile, opens in a new tab. My part — manager and technical lead, technical & product direction, defined the target shape: a style with colourways, a bill of materials per colourway and measurements per size, required the migration be reversible, so a new season loads the same way, set the operational contract — the office installs, verifies, backs up and restores it without a developer.

Read about the system

The same style, in two shapes

A style has colourways; a colourway has a bill of materials; a size has a measurement per point of measure. Three one-to-manys, and a column cannot hold a one-to-many — so the workbook numbers them.

WORKBOOK COLUMNS

72

DATABASE ROWS

48

ONE ROW · 72 COLUMNS · SCROLL →

The style as one workbook row, 72 columns wide.
STYLE_CODESTYLE_NAMESEASONCOLLECTIONSUB_GROUPSTATUSGAUGEMACHINEFOB_USDRETAIL_USDPACKINGCARTON_QTYSHIP_MODECW1_CODECW1_NAMECW1_YARN1CW1_YARN1_GCW1_YARN2CW1_YARN2_GCW1_YARN3CW1_YARN3_GCW2_CODECW2_NAMECW2_YARN1CW2_YARN1_GCW2_YARN2CW2_YARN2_GCW2_YARN3CW2_YARN3_GCW3_CODECW3_NAMECW3_YARN1CW3_YARN1_GCW3_YARN2CW3_YARN2_GCW3_YARN3CW3_YARN3_GWT_XSWT_SWT_MWT_LWT_XLCHEST_XSCHEST_SCHEST_MCHEST_LCHEST_XLBODY LENGTH_XSBODY LENGTH_SBODY LENGTH_MBODY LENGTH_LBODY LENGTH_XLSLEEVE LENGTH_XSSLEEVE LENGTH_SSLEEVE LENGTH_MSLEEVE LENGTH_LSLEEVE LENGTH_XLSHOULDER_XSSHOULDER_SSHOULDER_MSHOULDER_LSHOULDER_XLARMHOLE_XSARMHOLE_SARMHOLE_MARMHOLE_LARMHOLE_XLNECK WIDTH_XSNECK WIDTH_SNECK WIDTH_MNECK WIDTH_LNECK WIDTH_XL
MER-2601MERIDIANAW26KnitwearCrew NeckDevelopment7GGFlat bed48.50189.00Folded, polybag20SeaCW-01OATMEALLambswool 2/28 Ecru340Merino 2/30 Natural74Nylon Binder 1/7022CW-02SLATELambswool 2/28 Slate340Merino 2/30 Natural74Nylon Binder 1/7022CW-03MOSSLambswool 2/28 Moss336Mohair Loop 1/1478Nylon Binder 1/702241243646148851747.049.552.054.557.062.063.565.066.568.058.059.060.061.062.040.541.742.944.145.321.021.822.623.424.217.518.018.519.019.5

59 of these 72 columns exist only because the workbook has to fake a one-to-many with numbered slots — colourway slots and size slots. The blanks are slots with no data in them, and every style in the book carries them.

Ask for something ordinary

A fourth colourway and a sixth size are the two most ordinary requests a style master ever gets. Watch which shape treats them as data.

The dropdowns teach themselves

A yarn or a packing method typed once becomes an option the next person is offered. It is a distinct-values query and nothing more, and it is the difference between a column you can group by and a column you cannot.

6 yarns known. 6 offered.

THE SAME YARN, IN A FREE-TEXT COLUMN

  • Lambswool 2/28 Ecru
  • lambswool 2/28 ecru
  • LAMBSWOOL 2/28 ECRU
  • Lambswool 2/28 Ecru
  • Lambwool 2/28 Ecru
Distinct strings, as typed
5
After folding case and whitespace
2
With a dropdown
1

Folding closes four of the five and cannot close the last, because one is a missing letter rather than a format. A dropdown does not repair spelling — it removes the opportunity to spell. Which is why “which styles use this yarn” is a question one of these shapes can answer.

One edit, four statements

Somebody changes a price, adds a colourway with its bill of materials and corrects a weight. That is one action to them and four statements to the database. Fail one of them on purpose.

  1. 1

    Price → 51.00, packing → “Folded, polybag, hangtag”

    UPDATE styles SET fob_usd = ?, packing_method = ? WHERE id = ?

    PENDING

  2. 2

    Colourway CW-04 STORM

    INSERT INTO colourways (style_id, code, name) VALUES (?, ?, ?)

    PENDING

  3. 3

    Bill of materials — 4 yarn lines

    INSERT INTO colourway_yarns (colourway_id, yarn_id, placement, consumption_g) VALUES …

    PENDING

  4. 4

    Finished weight, size XL → 521 g

    UPDATE style_sizes SET finished_weight_g = ? WHERE style_id = ? AND size_id = ?

    PENDING

THE OPERATIONAL CONTRACT

Not a simulation — none of this runs on this page. It is what was delivered, written down, because an office that cannot restore a system does not have one.

SET UP
Two commands. A pre-built interface ships with it, so an office machine never runs a build.
RUN
One command. API and interface are one process on one port.
BACK UP
Copy one file. The whole database is that file.
RESTORE
Put the file back.
VERIFY
The README is written as an operator manual: how to check the install worked, the top three failure modes and their fixes, and what a forced reseed destroys.

The migration that preceded day one moved 237 styles, 705 colourways and 214 yarns out of the workbook. Those are figures about the delivered system; nothing on this page is derived from them, and no record here came from it.

What is real, and what is simulated

Runs in your browser

  • The projection between the two shapes — the normalised tables rendered back into the wide workbook row, column for column, including the cells that are blank because a slot exists and the data does not
  • Add a colourway and add a size, in both shapes at once, with the column and row arithmetic computed rather than quoted
  • The cascading delete: the five style-owned tables and the five shared lookups, and which of them a delete may touch
  • The self-teaching dropdowns — distinct values offered back, case and whitespace folded for matching, and the typo that proves folding is not the point
  • The transactional save, with an injected mid-write failure and a structural check that finds the half-written style the untransacted version leaves behind

This is not a port of a production module — the app's logic is SQL and an Express route, and neither runs in a browser. What is ported is the SHAPE: the ten tables, which five cascade, the workbook's fixed yarn slots and per-size column suffixes. 39 tests assert the arithmetic the page shows a visitor — including the exact column names each operation adds, and every number the guided tour speaks aloud. The migrated volumes quoted below — 237 styles, 705 colourways, 214 yarns — are published figures about the delivered system, not measurements of anything on this page.

Simulated

  • node:sqlite and the single database file. Nothing here is SQL; the statements shown beside each save step are labels for what runs in production, not statements this page executes
  • Express, multer and the photo upload; the pre-built interface an office machine runs without a build step
  • The one-off Python extractor that read the season workbook and produced the seed
  • The operational contract — set up, run, back up, restore — which is a card on this page because that is what it is: an instruction, not a behaviour
  • MERIDIAN, MER-2601, every yarn, price, weight and measurement. All fabricated for this page