5 Serverless Database solutions to kickstart your Next.js app

Database scaling and dev ops are usually a nightmare for developers who focus on shipping new apps and features. To help with this, new database providers have arisen in the last couple of years, offering serverless database solutions.

What is a Serverless Database?

A serverless database is a cloud-based database provided as a service. As developers, we don't have to worry about maintaining, scaling, and backing up the database ourselves. We can focus solely on developing our applications while the database provider cares for the maintenance and scalability of the database. This makes it much easier to build full-stack applications since you have no database operations overhead.

What are the top solutions and their advantages?

All the providers listed below offer a generous free tier and an easy way to spin up a new database and connect your app to it. They are focused on the developer experience, making shipping apps fast. On top of that, they provide excellent documentation and resources to help you start. Some of the standard features they provide are CLIs, database branching, APIs, SDKs, and support for developing AI applications.


Neon is a fully managed open source serverless Postgres database provider. They offer a CLI, database branching, and can power AI applications. In terms of pricing, they offer a generous free tier, which is great for prototyping and small applications.


Turso is a serverless SQLite database provider. They offer a CLI and probably the most generous free tier, allowing up to 500 databases 🤯 and 9GB of total storage. If you're wondering how they can provide that for free, here's an article detailing how they made databases dirt-cheap. This is a no-brainer option if you need to kickstart or play with multiple projects.


If you're looking for a MySQL-compatible serverless database, PlanetScale is the go-to option. They are powered by Vitess and can also support AI applications. Like the other solutions, they offer a CLI and a free pricing tier to help you get going.


As they advertise, Supabase is an open-source Firebase alternative that provides PostgreSQL database solutions. They provide a CLI as well as a bunch of other features like Authentication, Edge Functions, Realtime connections, Storage as well as an AI Toolkit to support developing AI applications. Supabase also auto-generates REST and GraphQL API from your database, allowing you to connect directly from the browser through an interface. 🤩 All these abstractions help build apps faster and easier.


Xata is a serverless database platform powered by PostgreSQL. On top of the CLI it offers features like full-text search, vector-search which makes it great for developing AI applications and file-attachments right into your database 😮. You can even query ChatGPT against your data 🤯. Like Supabase, they offer a REST API. They provide excellent documentation and a quick starting guide for Next.js with Xata.

How do you use any of these?

Once connected to the database, you can work directly with SQL commands or use an ORM to communicate with it. All the options listed above work with typical ORMs like Drizzle or Prisma, which makes it developer-friendly to interact with the database.

Which solution should I pick?

One benefit of a serverless database is the pricing per usage. You only pay for what you use. All these providers come up with a generous free tier for kickstarting your app. Generally, you have enough database operations quota by the time you need to pay, which should be enough to kickstart your Next.js app.

If you're looking for a specific type of database like MySQL, PostgreSQL, or SQLite, pick anyone from the list that satisfies the criteria. You can't go wrong with any of these. In case you're having a lot of small projects and don't care about the database type, I think Turso is an excellent option since the free tier allows you to spin up multiple databases. Happy shipping! 🚀

Subscribe for more like this!

Drop your email below and I'll send you new stuff to your inbox!

No spam, ever. I respect your email privacy. Unsubscribe anytime.

Read more similar articles