D1 is Cloudflare's serverless SQL database built on SQLite. It gives you full query capabilities with the simplicity you've come to expect from Cloudflare's ecosystem. Create a database with a single command, then use the D1 API or traditional SQL clients.
The querying API is straightforward: binding.execute() for mutations, binding.prepare() for statements you want to reuse. Parameters are bound by position or name, protecting against injection. D1 supports most SQLite features including foreign keys, indexes, and views.
What surprised me most is the DX. Local development works with wrangler d1 execute, showing exactly what your queries will do. Migrations are just SQL files you apply in order. The free tier handles small projects beautifully, with paid plans starting reasonably.