DEV Community

loading...

Discussion on: What database should i use?

Collapse
sarneeh profile image
Jakub Sarnowski

This! People mindlessly go for MongoDB because of NoSQL hype, not understanding the real use case for these kind of databases. I was one of them. Maintaining "a typical app" was a real pain in the ass. Moved to PostgreSQL fixed all the issues and removed a lot of code hacks from the codebase.

Collapse
patarapolw profile image
Pacharapol Withayasakpunt • Edited

No, I was there because of the lower cost of entry.

  • Generousness of free tier.
  • Easier to configure.

Of course, I know that RDBMS's TRIGGER and FOREIGN KEYs can be convenient.

Also, I don't hate RDBMS, but the language (SQL) itself.

Maintaining "a typical app" was a real pain in the ass. Moved to PostgreSQL fixed all the issues and removed a lot of code hacks from the codebase.

Indeed, if you can explain more...

Thread Thread
sarneeh profile image
Jakub Sarnowski

Mostly, with NoSQL you can't assure any kind of data integrity - everything needs to be based on your app's code. There are no relationships in NoSQL unless you code it yourself - I think that's the main pain for me and it's very, very fragile.

Thread Thread
patarapolw profile image
Pacharapol Withayasakpunt

Indeed, most RDBMS enforces integrity very well, and it would be counter-intuitive to store denormalized / JSON data. Actually, graph-type NoSQL can do this as well (as well as being ACID compliant).

BTW, how do you balance between ORM features vs true SQL features?

Forem Open with the Forem app