Database
What Database is for
Database is a headless content store: people, agents and scripts read and write structured tables and rows directly through the public API, as with a headless CMS. It holds content such as itineraries and catalogs, independently of the applications that use it. In the Praxis Application Model it is the system of record for an application’s business data; application state (sessions, cursors, locks, caches) stays in the application’s own components. It is not a data warehouse.
How it differs from application state and a data warehouse, and the typical content store → build → publish pattern, are in Concepts.
Each database is an isolated unit. The path you create it under decides its type, and it cannot be changed afterwards:
-
A table database (
/database/v1/table) with its own tables, fields, rows and events. Create databases and table structure through the Database API and read and write rows with the official supabase-js client; both row access URLs for a database share the same data. -
A key-value database (
/database/v1/kv) that stores strings, hashes, lists, sets and sorted sets by key, with optional expiry. Read and write it with the official@upstash/redisclient. -
Quickstart: create a database and table, then write and read your first row.
-
Key-value databases: create a key-value database and connect with
@upstash/redis. -
Concepts: field types, links, versions and recovery.
-
Limits and errors: capacity and query boundaries.
Where it is used
- Business operations hub: how raw, summary and run-log tables divide, and why a rerun adds no duplicates.
- Douyin shop operations hub: what each table holds in one real delivery.
- Sync a web back office into a database on a schedule: the recipe that upserts by unique key.
- Build a cross-product catalogue: the database holds SKUs and current revisions.
API reference → · Supabase-compatible API → · Upstash-compatible API → · Cookbook →