News for hackers. Stuff that matters.
Re:Bye Bye Mongo, Hello Postgres (2018) by SergeAx on Sunday December 27, 2020 @01:32PM (#25553130)
Mongo is very, I say, agile-friendly. With SQL I should always mind schema migrations, and think about it both ways. If I have large enough RDBMS setup with sharding and replication - altering large tables may even became a complete show-stopper.

With Mongo and null-friendly languages (Kotlin, PHP) I can just start writing documents with new fields right away.

Re:Bye Bye Mongo, Hello Postgres (2018) by jayd16 on Sunday December 27, 2020 @01:36PM (#25553162)
Like the parent said, Postgres supports unstructured data with json fields. The syntax is "clean enough" and you can easily migrate to a full column with a single query.
Re:Bye Bye Mongo, Hello Postgres (2018) by giantrobot on Sunday December 27, 2020 @02:51PM (#25553721)
I like that I can easily build a view that includes "columns" from JSONB and normal table columns and clients are none the wiser. The clients get a consistent contract (the view schema) which can be backed by whatever tables make sense (or don't make sense but are used anyways).

I definitely appreciate the flexibility of a document store but I despise not having schemas for clients. Interface contracts reduce errors and ultimately make life easier for everyone. The database also has tons of information in RAM it can use to search and sort data, pushing those operations to the client balloons bandwidth requirements unnecessarily.

Re:Bye Bye Mongo, Hello Postgres (2018) by SergeAx on Monday December 28, 2020 @02:53AM (#25557536)
If you maintain clean layered code, accessing every collection via corresponding set of repository/data object classes - you will be just fine with MongoDB. But you better do that with SQL database too, anyway.
Re:Bye Bye Mongo, Hello Postgres (2018) by Too on Monday December 28, 2020 @02:59AM (#25557553)
Mongo has schema enforcement, and if adding index it will keep and serve data straight from RAM.
Re:Bye Bye Mongo, Hello Postgres (2018) by collyw on Monday December 28, 2020 @05:45AM (#25558191)
Having used Django a lot in the past, migrations aren't that much of a problem with a decent tool. Mongo is still quite crap to work with in general.