News for hackers. Stuff that matters.
Re:MongoDB Wire Protocol Specification License by flowerlad on Wednesday July 21, 2021 @01:50PM (#27909580)
SQL relies on joins. Joins are fine for reasonably sized databases, but on internet scale joins have miserable performance. "Document" based databases such as Mongo are designed to avoid joins.

MongoDB has automatic sharding, which is very important for horizontal scaling of writes. For MySQL you have to do manual sharding which is extremely hard.

And finally, document oriented databases are schemaless, which means there is no downtime when you add/remove fields.

Re:MongoDB Wire Protocol Specification License by McGlockenshire on Wednesday July 21, 2021 @03:18PM (#27910777)
This entire post sounds like the "MongoDB is web scale" video that is now a decade old. "Internet scale" is meaningless jargon. "Joins are slow" is a meme based on now-ancient MySQL performance.

Schemaless / document databases have a place and a purpose, but nine times out of ten the data we're dealing with day to day has a known and rigid structure that changes infrequently.

Re:MongoDB Wire Protocol Specification License by gbuk2013 on Wednesday July 21, 2021 @02:27PM (#27910102)
That’s the theory, in practice “no schema” in my recent painful experience translates to “move the schema into the apps” which really sucks when you have a bunch of interdependent services owned by different teams.

And you still need to do joins to enrich data from different collections.

I want Postgres back. :(

Re:MongoDB Wire Protocol Specification License by laichzeit0 on Wednesday July 21, 2021 @03:00PM (#27910541)
It’s exactly that. Shifting the problem from schema-on-write to schema-on-read. It’s like dynamic vs statically typed. Personally, I don’t like it at all, none of your problems have magically disappeared, you just shifted it to runtime (or the application layer, as you say).
Re:MongoDB Wire Protocol Specification License by vel0city on Wednesday July 21, 2021 @04:05PM (#27911401)
In many document databases these days you can have required fields and types enforced by the database to ensure all documents in the collection have at least a certain schema.

https://docs.mongodb.com/manual/core/schema-validation/#rest...

Re:MongoDB Wire Protocol Specification License by flowerlad on Wednesday July 21, 2021 @02:37PM (#27910218)
> really sucks when you have a bunch of interdependent services owned by different teams.

That's true. The strictness of SQL lets you use SQL as the integration point. Without it you'd have to write a service on top as the integration layer.

Re:MongoDB Wire Protocol Specification License by jjav on Wednesday July 21, 2021 @06:43PM (#27913097)
> “move the schema into the apps”

Exactly. There is always a schema, there has to be. It's just a question of whether it can easily be seen or if it is buried in a thousand places in the code.

Re:MongoDB Wire Protocol Specification License by fredros on Wednesday July 21, 2021 @02:36PM (#27910214)
> but on internet scale joins have miserable performance.

Please define internet scale. Joining 10s of billions of rows using clickhouse here.

Re:MongoDB Wire Protocol Specification License by flowerlad on Wednesday July 21, 2021 @02:38PM (#27910226)
Clickhouse is OLAP. We are talking OLTP.
Re:MongoDB Wire Protocol Specification License by ksec on Wednesday July 21, 2021 @02:45PM (#27910336)
>For MySQL you have to do manual sharding which is extremely hard.

Vitess [1] and PlanetScale [2] ?

[1] https://vitess.io

[2] https://www.planetscale.com

Re:MongoDB Wire Protocol Specification License by bogomipz on Wednesday July 21, 2021 @08:04PM (#27913720)
>""Document" based databases such as Mongo are designed to avoid joins."

That is not something specific to document databases that is an approach taken by NOSQL datastores. It's known as denormalization which has its own share of issues that then need to be addressed.