DB
Back homeIndustry

E-commerce & retail

Inventory as current-state, order streams processed in place, and personalization served from memory — one engine behind the storefront.

The problem

Why this is hard today

Retail systems juggle three shapes at once: inventory that must reflect the last sale exactly, an order stream that never stops, and personalization that has to serve in milliseconds. The typical stack is an OLTP database for orders, a cache for inventory and sessions, and a warehouse for analytics — with the cache and the database racing to agree on stock.

Overselling is the classic symptom: the cache says in-stock after the database sold the last unit, because the two copies converge too slowly. Personalization reads a profile snapshot that predates the item just added to the cart.

What retail needs is inventory as authoritative current-state, orders processed as a stream in the same engine, and personalization served from memory — all reading the write that just happened.

Where NYXDB fits

Use-case journeys

Real-time inventory & current state

Exact stock per SKU, read-your-writes — no overselling.

Caching & real-time serving

Order-stream processing

Append orders and maintain fulfillment and revenue with continuous transforms.

Observability & logs

Personalization & recommendations

Serve profiles and vector recommendations from one engine.

AI & vector search

Architecture

How NYXDB fits e-commerce & retail

Inventory is a keyed latest-per-SKU table (exact, read-your-writes); orders append and drive continuous transforms; personalization state is served from memory — one engine, one truth for stock.

  1. 01

    Inventory

    A keyed table holds current stock per SKU — the last sale is the read.

  2. 02

    Orders

    Order events append; transforms maintain fulfillment and revenue state.

  3. 03

    Personalize

    Memory-resident keyed profiles serve in microseconds.

  4. 04

    Analyze

    Columnar scans power merchandising analytics off the same data.

Real SQL

Representative query

Inventory as latest-per-SKU current state
-- keep='latest' pins live keys for exact, spill-safe current state
CREATE STORAGE POLICY pin_p (
serve_pool='default', durable={pool:'default'}, delta={keep: 'latest'}
);
CREATE TABLE inventory (
sku String NOT NULL,
on_hand Int64,
PRIMARY KEY (sku)
) SETTINGS mode='keyed', storage_policy='pin_p';
SELECT sku, on_hand FROM inventory WHERE sku = 'ABC-123';

Every statement follows the engine’s own test SQL shapes. See the SQL reference for full syntax.

Capabilities

What you get

Exact current stock

Latest-per-SKU keyed state, read-your-writes.

Order streams

Transforms maintain fulfillment and revenue in place.

Personalization

Profiles and vector recommendations served from memory.

One engine

Retire the cache-and-warehouse split behind the storefront.

Proof

Measured on the vetted benchmark lane

Measured on Apple M4 Max (dev), macOS — server-class validation pending. Release build, median of 5, commit-pinned (d4a3885b, 2026-07-07). Ingest figures are engine-side. See the full benchmark suite.

One engine behind the storefront

Explore caching & real-time serving or run a node.