Data
Overview

Data

Lux provides two data storage options: Tables for relational data and KV Store for key-value storage.

Data Storage Options

Tables (Relational)

SQL-based storage with schemas, perfect for structured data.

  • Best for: User records, orders, products, structured entities
  • Features: SQL queries, schemas, relationships, migrations
  • Backend: Turso (SQLite-compatible)

Learn more about Tables →

KV Store (Key-Value)

Fast key-value storage for simple data.

  • Best for: Settings, cache, session data, counters
  • Features: Get/set operations, fast lookups, TTL support
  • Backend: Cloudflare KV

Learn more about KV Store →

Which Should I Use?

Use CaseRecommendation
User profiles with multiple fieldsTables
Product catalog with searchTables
Order history with relationshipsTables
User preferencesKV Store
Rate limiting countersKV Store
Cache/temporary dataKV Store
Session tokensKV Store

Data in Flows

Both data types are accessible from Flows:

Trigger → Fetch Data (from Table) → Process → Update Data
Trigger → Get KV Value → Check Value → Set KV Value

Data Isolation

Data is isolated by:

  • Organization - Each org has separate databases
  • Project - Projects within an org have separate data

Next: Tables →