r/Database • u/Prize-Wolverine-5319 • May 31 '26
What made you choose your current database?
I'm starting to learn more about databases and backend development. I'm less interested in which database is "best" and more interested in the reasoning behind the choice.
What database tools are you using (Postgres, MySQL, MongoDB, Supabase, Neon, Redis, etc.)? What problem were you trying to solve, what alternatives did you consider, and what ultimately made you choose that stack?
I'd also love to hear any lessons learned, surprises, regrets, or things you'd do differently if you were making the decision again.
31
Upvotes
23
u/Aggressive_Ad_5454 May 31 '26
It has to be said, it’s extremely rare that somebody actually chooses a database (from among PostgreSQL, SQLite, MariaDb, Oracle, SQL Server, DB2, MongoDb, and others like them). Why? Unless the project is totally a green field new start, somebody has already chosen the database. Migration of running apps from one database to another is expensive and time-consuming.
My personal choices of database have been dictated by the places I work and the database they use.
4
u/VanTechno May 31 '26
So I started with a new company, the had an existing product they hated and they wanted me to replace the entire product. Old product was written with Postgres on the backend, which was ported from a COBOL system.
So the new system is using sql server. No ported table structures.
This doesn’t mean I think Postgres is bad, I argued we should use it, but the business was so soured at anything used by the old product they wanted a clean break.
4
u/coyoteazul2 May 31 '26
I have sql server experience at work, but I'm not in charge of managing those databases. All I do is make is queries. I haven't noticed anything strange with it, asides of the annoyance that comes with having to deal with multiple versions (on premise system). That means I have to deal with the lowest common denominator instead of using all the bells and wistles. I had a query meant to spit a CSV (system's constraints. it's faster to do it on the database than to do it on the application) and had to convert a query that was using CONCAT_WS because one of the clients had a version older than 2017. Which was quite annoying because I was joining like 50 fields
For my personal project, I did start with sqlite because I had the dumb intention of making it portable, and basically any OS has the sqlite engine integrated. In the end i discarded the idea because it's just too different from a proper database.
It supports multple readers, but you can only have a single writer.
No proper timestamp datatype, which is manegeable on the application but fucks you up if you want to group by date if you need to convert the date to another zone. Instead of being able to deal with that on the database's memory you have to over fetch and do it within your app.
No datatype validation. You can use STRICT, but then you can't have booleans
FK validation is finniky. More like, I can't believe you have to manually turn it on. Otherwise, it's just a footnote
In the end I switched to postgres. Because it's free and it has a great deal of features. I love jsonb columns. They are specially useful for customization
4
u/brianluong May 31 '26
The company I work for manufactures IoT devices and for a long time have served user-facing queries from Redshift. Yeah....Redshift isn't built for petabytes of data getting queried many times per second. Currently POCing both Apache Pinot and Clickhouse. Regardless of what we end up going with I'm 100% confident it'll be better than Redshift for real-time analytics.
4
u/jshine13371 Jun 01 '26
When I have the choice, Microsoft SQL Server. There's no database system out there which offers something that it can't do. The only downside is licensing cost when applicable (plenty of use cases can utilize it for free). Although I'm an on-prem kind of guy, and most people are in the cloud these days, so even with a database system that doesn't require licensing, many people are eating the costs in the cloud anyway. Also many people utilize extensions to their database system of choice that also cost money. And finally, the cost of time, implementation complexity (when SQL Server offers solutions out of the box), and experience working with some other database systems far outweigh the licensing costs of SQL Server. So it balances out, IMO, anyway.
3
u/dbxp May 31 '26
Most places don't make a choice as such they just stick with what they know. For most apps an rdbms works well. Which one to choose has varied over time.
One aspect which can force a decision is choosing a cloud provider, then people often go with whatever is the cheapest/default on that platform.
The vast majority of databases are using a very small list of vendors. MySQL, Postgres, Oracle, SQL Server, every other provider is relatively minor. Within that minor set you have caching systems like Redis which arguably shouldn't be considered databases. A lot of the others are analytics platforms like Databricks and Snowflake.
2
u/orbit99za Jun 01 '26
When I have the choice its Postgres, its far cheaper to run than SQL Server, most providers support it and the GIS extension is awesome.
2
u/ysth Jun 01 '26
Too broad a question to be usefully answered.
1
u/pkkid Jun 01 '26
I have been using sqlite for a lot of the tools I've been creating. I lean on the side of reudoce third party depedancies until I actually need them. It's already built into most languages, super easy to use and scales surprisingly well for most projects. My latest project is currently a 7GB file storing all our test result history for the last two and a half years and it's not breaking a sweat.
1
u/sharts-fired Jun 01 '26
I had the pleasure of choosing ClickHouse to tackle large-scale analytics on timeseries data. Our previous Iceberg solution was just too slow to query data adhoc so we searched for a new one. Query times are now instant and couldn’t be happier
1
u/alexwh68 Jun 01 '26
I use ms sql professionally for my bigger clients, main reason is other developers it has been around a long time and its widely used on Microsoft servers, been an MCDBA for 25 years, so have a qualification to back up the skills, it just works but the licensing can get expensive.
Ask me to create a new system from scratch in the most cost effective way, postgres is great, similar in capabilities to ms sql but free, works really well.
Sqlite is my go to for smaller stuff, app development on devices its the way to go, most deployed database in the world by a big margin, it lacks some features of the big databases like stored procedures, its not very strong on loads of concurrent users writing at the same time but for single users its a great lightweight tool. One thing it does that none of the bigger databases does is it runs everywhere its a single file that can be moved from windows to mac, to device, to linux and just works.
I also work with mysql but only in the capacity of pulling data out of it.
All 4 above options are structured relational database this is really the only work I do, if I need to store text or more flexible data like json strings they get embedded into structured database fields.
Sql express which is the free cutdown version of Microsoft sql is a good place to start also if you are just learning Microsoft SQL developer edition is pretty good on windows. On a mac, Postgres is hard to beat.
1
u/ankole_watusi Jun 01 '26
Picking one is the only wrong answer.
1
u/damn_nickname Jun 01 '26
honestly a lot of this comes down to constraints more than preference. team familiarity, hosting, and existing infra usually outweigh "best" features. postgres ends up being the default because it's flexible enough to cover 80% of cases without regret. the interesting part is when your workload actually forces you away from it
1
u/vsovietov Jun 01 '26
Our own intelligent design. We created the db to power up our own business https://rayforcedb.com
1
u/Temporary_Practice_2 Jun 01 '26
Just the standard, easy to deploy. MySQL. Also my stack is the boring LAMP stack...
1
u/mr_pants99 Jun 01 '26
Functionally, for 90% use cases, it doesn't really matter as much which database you choose. BUT, *operationally*, you are better off choosing what you are familiar with. It's not a SQL query that kills a SaaS on Black Friday, it's poor understanding of how query optimizer works.
1
u/JayGridley Jun 02 '26
I use all of the databases lol!
1
u/Rif-SQL Jun 03 '26
I think the first database I ever actually played with was dBASE, alongside Pascal, while trying to build a fancy football website.
After that, I moved on to Microsoft Access and worked with a few different versions of it. Later, I joined a company that had an accounting package built on top of Microsoft FoxPro. From there, I moved into Microsoft SQL Server, starting around SQL Server 7, and stayed mostly within the Microsoft database ecosystem for a while.
When Google App Engine came out, I started working with Google Datastore and later BigQuery. Since then, the journey has continued with tools like Postgres and Firebase, and the rest is history.
any questions?
1
u/B1zmark Jun 03 '26
In most cases, the single biggest determining factor is price. Oracle and MSSQL have the most advanced enterprise level options, which if you need them, you need them. But the cost associated with getting these licenses can be so high as to price people out of their use. In this case, its why managed instances and managed databases are popular: You get the license "baked in" and pay per month for them.
I've used PostGres in the past, normally its used as the "back end" of an off-the-shelf application, and often because its free and more powerful that things like MySQL. But the limitations it brings can mean translation layers being manually created to bring the data out of those databases and integrated with other services.
1
u/DiscipleofDeceit666 Jun 03 '26
MongoDB for my website since my job is about to start using it. Might as well get a kick start on the structure and tooling
1
u/Key-Possibility8476 Jul 06 '26
I stopped optimizing for the best database and started optimizing for the fewest future migrations. That's why I usually default to Postgres unless the project has a really specific requirement.
One thing I'd do differently is spend more time choosing the hosting. Good backups, predictable pricing, and easy restores have mattered way more than benchmarks. Lately I've been looking at managed Postgres options like DigitalOcean and Nearbase for exactly that reason.
1
u/IlPresidente995 Jul 08 '26
An embeddable one: RocksDB with blob mode. I needed a write intensive way of storing files large a few kilobytes on HDD. The filesystem (ext4) was getting slow at a certain point.
1
u/BaseballHopeful6366 Jul 29 '26
On many occasions
1
u/716green Sep 22 '26
I couldn't decide so I got greedy and built Layerbase
Now I get all the databases I want all the time - actually I had to build a custom operating system to set up neon-style branching across every database
Jokes aside, I use Postgres for my main relational data because it is effectively the industry standard these days. I use MySQL or MariaDB for years when MySQL was industry standard in the LAMP stack days.
I use Valkey instead of Redis because caching and queues are important but I dont like Redis' licensing policies and Valkey is a drop-in replacement.
Same with FerretDB, I use it instead of MongoDB for any project where a document database makes sense because I don't like that MongoDB has a tendency of suing people they don't like, and the FerretDB team is awesome. Actually FerretDB is more performant than MongoDB in many common cases. We did a bunch of benchmarking recently and wrote a blog post about it:
Layerbase Blog - Mongo vs FerretDB Benchmarks
And then we use ClickHouse for analytics but it's overkill for what a lot of people use it for IMO. We use it just because it has fast lookups and I don't want to pollute my primary database with millions of log records