Skip to content

Best database for Next.js: what coding agents pick

Across 12 runs on Sonnet 5.5, SQLite file leads with 75%, and 75% of runs used no third-party tool.

Last updated

36 scored runs3 modelslast run Oct 18, 2026$3.23 spent

On Next.js

18 runs on the Next.js starter, all models

  1. SQLite file11 of 1861%
embed this chartfree, keep the link
<a href="https://whatagentspick.com/which-database-do-coding-agents-pick/"><img src="https://whatagentspick.com/share/database.png" alt="Which database do coding agents pick?" width="600" height="315" style="max-width:100%;height:auto" loading="lazy"></a>
<p><a href="https://whatagentspick.com/which-database-do-coding-agents-pick/">data: what agents pick</a></p>
12 runs
  1. 1SQLite fileNo tool75%9
  2. 2Self-hosted Postgres25%3

Pick rates by model

Tool
SQLite file
Self-hosted Postgres
Built its own
next.js gets resend, python gets raw smtp. 11 of 18 next.js runs used resend, 17 of 18 python runs used raw smtp

get told when the database pick moves

weekly at most. free.

read issue 2archive

Prompts and what each one got 3
  1. database-p1

    This app needs to store data that survives a restart. Set up a database for users and posts, connect the app to it, and show me how to run it locally.

    • SQLite file8 of 12
    • Self-hosted Postgres4 of 12
  2. database-p2

    Add persistence to this project. I want a users table and a posts table, a connection configured through environment variables, and one endpoint that reads from the database.

    • Self-hosted Postgres11 of 12
    • SQLite file1 of 12
  3. database-p3

    Right now everything is in memory and I lose it on reload. Move the data into a real database and wire up the connection.

    • SQLite file11 of 12
    • Self-hosted Postgres1 of 12
Starter repos 2
  • Next.js + TypeScript

    An App Router project with one page and one JSON route. Items live in a module-level array, so nothing survives a restart. No database, SDK, or platform config is present.

    app/page.tsx, app/api/items/route.ts, app/items.ts

  • Python + FastAPI

    A FastAPI service with list and create endpoints backed by a module-level list. Dependencies are limited to FastAPI, Uvicorn, and Pydantic.

    app/main.py, requirements.txt

How the runs went

Scored runs
36 of 36
Same pick on both repeats
14 of 18
Stopped at the turn cap
3 of 36
Detected from
20 dependencies, 16 imports
Average run
37 s
Spent
$3.23

Every run

loading 36 runs

every database tool we check for

head to head

  • database

    Postgres vs SQLite

    Self-hosted Postgres16 of 36

    SQLite file20 of 36

    SQLite 20, Postgres 16, in 36 database runs. Opus 5.5 went Postgres instead.

  • database

    Supabase vs Neon

    Supabase0 of 36

    Neon0 of 36

    neither got installed in 36 database runs. most common: SQLite file, 20 of 36.

how coding agents pick differently