We launched Convex Components to make adding features to your app easier! 🎉
Learn moreFull backend service with real-time updates and superior transactional support, all in TypeScript.
Hosted SQL solutions have been around for more than 30 years, acting as the backbone for organizations dependent on transactions… which is most organizations. SQL databases such as MySQL and Postgres fall in and out of favor depending on software trends, but they remain as solid choices for organizations that have dedicated individuals to raise and nurture them.
In the world of full-stack engineering, the solo product developer is suddenly the database administrator, which leads to a lot of unnecessary overhead in getting an app to market. Because of this, most developers opt for backend solutions like Convex that abstract away the performance management to get time back on their project. We respect SQL’s legacy and use MySQL internally, because our team has spent years understanding and optimizing infrastructure. We just think that your application deserves the best, so we’ve spent a lot of time making the tough optimization decisions for you.
Here, we’re looking at the DX difference between Convex and manually setting up MySQL, Postgres, SQLite, or another RDBMS off the shelf.
Both Convex and SQL-oriented Databases:
Convex doesn’t use SQL. Convex functions write directly to documents without needing to manage an ORM (object-relational-mapping). Convex pairs with TypeScript for schema inference, meaning you don’t need to write a SQL schema. Convex generates a Javascript-based schema for you that you can edit down the road.
Well… pretty much every RDBMS uses SQL, as it’s one of the main attractions. If SQL is familiar to you, this might be a plus in your book. When you go down this route, you need to write and manually manage your SQL schema, raw SQL queries, an ORM, a custom data access framework, or some combination of all of this.
Convex is a full platform that offers much more than just a database. It offers thoughtful APIs for developing your product, building blocks for other parts of your backend (scheduler, vector database, file storage), and a delightful TypeScript integration that autocompletes your types and generates your schemas. You can technically use Convex as just a database if you want, adding the other parts to your development workflow as you develop your product.
SQL stores like MySQL and Postgres are fairly barebones. You get an endpoint to read and write data to, and that’s it. Even if you’re using a database-as-a-service, you’ll have to manage a lot of the optimizations yourself.
Convex’s database offers realtime capabilities out of the box with automatic function subscriptions to components, allowing your application to always reflect the latest data. There are significant advantages to this approach, as there is no setup or middleware required to configure it.
Most RDBMS’s are not optimized for realtime use cases. They lack the built-in APIs, ingestion efficiency, and architecture for modern applications.
Convex uses a custom, transactional document store that exclusively interfaces with Convex mutations and queries. This enables us to have strong performance guarantees on any interactions with the database, as we empower developers by not having to worry about database tuning. Convex has built-in query-caching and all Convex functions are automatically subscribed to database changes. All of this sits on top of a SQL database to power our transactions, but abstract it away to improve the developer experience.
For SQL stores, WYSIWYG, for better or worse.
Convex takes full responsibility for your database. Our custom interface with Convex queries and mutations prevent common database failures. When something goes wrong, it’s on us. There’s usually only one way to do things with Convex, simplifying backend choices.
When you directly interface with SQL databases, you are responsible for your data and database. Depending on whether or not you use a managed database, you may or may not be responsible for caching, optimization, resource management, scaling, and configuring all settings.
Convex offers schema generation from Convex TypeScript functions, type inference, autocompletion, and tRPC-style type-safety. The experience is molded to make interfacing with your database in TypeScript perfect, reducing time spent on customizing data access patterns.
You’re on your own. Your developer experience in TypeScript is entirely influenced by the ORM, custom interface, and/or strategy you choose for data management. This is a choose your own adventure story that will scale to your experience in managing databases.
Convex has a free developer plan with resource and member limits which is great for beginning your app building journey. If you want to increase your limits, Convex Pro is $25 a month, with fees for seats and going beyond resource limits.
We can’t cover every permutation of hosting solution and relational database here, or this page would be particularly unhelpful. You can run SQLite locally for “free,” a small RDS instance for $20 a month, or purchase an enterprise service for $2000 a month or more. Again, these are more decisions that you need to evaluate and make for your product.
Check out Convex’s pricing here:
The Convex client is open-source. The Convex backend just became open-source!
Most RDBMS tools are open source and are designed to be deployed in your own infrastructure.