# Let's build a database!

DevFeed: [Let's build a database!](<https://devfeed.tech/articles/let-s-build-a-database-113332.md>)

Original publisher: [Read original article](<https://stack.convex.dev/lets-build-a-database>)

Author: Stack

Published: 2026-10-09T15:00:37Z

Content type: tutorial

Language: en

Sources: [Stack](<https://devfeed.tech/sources/stack.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [transaction-log](<https://devfeed.tech/topics/transaction-log.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [acid](<https://devfeed.tech/topics/acid.md>), [database-consistency](<https://devfeed.tech/topics/database-consistency.md>), [Heroku Postgres](<https://devfeed.tech/topics/heroku-postgres.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [convex](<https://devfeed.tech/tags/convex.md>), [database](<https://devfeed.tech/tags/database.md>), [file](<https://devfeed.tech/tags/file.md>), [fundamentals](<https://devfeed.tech/tags/fundamentals.md>), [json](<https://devfeed.tech/tags/json.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [wrapper](<https://devfeed.tech/tags/wrapper.md>)

## AI overview

Convex's SQLite or Postgres layer stores bytes; the article attributes its transactional and reactive behavior to Convex's own backend. It builds a model from an append-only transaction log, a committer that validates read sets and retries conflicts, timestamps and versioned indexes for snapshot reads, and subscriptions that rerun queries after relevant commits. Mutations must be deterministic and side effect free so retries are safe; actions handle external effects, while a scheduler can enqueue them atomically with a successful mutation. Inspection of a local SQLite deployment shows document versions stored as timestamped rows linked to prior versions, with indexes also persisted in tables. The article presents this as an explanatory model and notes that other Convex features are outside its scope.

## Source excerpt

Is Convex just a Postgres wrapper? To answer that we build a database from scratch with the same properties as Convex, starting from a single JSON file, then crack open the SQLite file Convex uses to see what it's actually doing.