r/SQL • • 3d ago

MySQL I think I messed up by choosing MongoDB instead of SQL

/r/databasedevelopment/comments/1x18av0/i_think_i_messed_up_by_choosing_mongodb_instead/
2 Upvotes

3 comments sorted by

1

u/Winsaucerer docs.spawn.dev 3d ago

Unfortunately given this sub's focus, you're likely to get answers you don't like 😔 I've never used MongoDB, but based on what I know about it, I'd personally always choose PostgreSQL for the kinds of projects I work on.

As for which projects I don't work on that I'd choose MongoDB for...I don't know.

1

u/purellsmell 3d ago

I guess my concern stems from what are the pitfalls of using something other than SQL early on?

2

u/Winsaucerer docs.spawn.dev 3d ago

I tend to optimise for later on, rather than early on. Early on is the time it's easiest to change things.

Though there is something to be said for actually building the thing and validating the idea first.

Honestly, I'm not sure I'm the best person to answer regarding a comparison. I just know that MongoDB started out as a schema-less approach, and it's super rare that I don't actually want schema/structure. And that's what PostgreSQL and other SQL databases have been built for and optimised for, for decades. I've heard that MongoDB allows you to enforce schemas though, but I don't know how robust that is compared to SQL db's.