--- type: entity tags: [parking, stack, database] sources: [parking-system-architecture] updated: 2026-06-14 --- # SQLite The local database (`better-sqlite3` driver, accessed via [[drizzle-orm]]). The right call for a **single-site, single-writer** system. (See [[parking-system-architecture]] §2, §4.) ## Why it fits Its only practical limit is **write concurrency** — one writer at a time, mitigated by **WAL mode** (many concurrent readers + one writer). A parking workload never approaches this. Other official limits are far beyond reach: ~281 TB max DB size, effectively unlimited rows, 32,767 columns/table, 1 GB per text/blob cell. You'd only outgrow SQLite with multiple machines writing the same DB (**never do this over a network share**) or sustained high-frequency concurrent writes — neither applies here. ## Relation to PostgreSQL The move to remote PostgreSQL is a **business/durability** decision (the remote sync target), **not a capacity** one. [[drizzle-orm]] schemas port over with minimal change. Open risk: a disk failure currently means total revenue-history loss — see [[open-questions]] #5 (durability/backup). Part of the [[technology-stack]].