Hacker News new | ask | show | jobs
by jabberwcky 2004 days ago
Mongo stores objects pretty much the same as PG here, a single key update requires a rewrite of the object. Maybe Mongo has some fancy algorithms to avoid full decode/reencode in some cases, but in principle the physical data formats are almost identical
1 comments

In a tiny bit more detail - mongo uses BSON, which is effectively TLV encoded json. I'm not sure how storage of entire collections is done though.

https://en.wikipedia.org/wiki/BSON

> (...) BSON, which is effectively TLV encoded json.

For those who, like me, never heard of TLV prior to this post, it's type-length-value encoding.

https://en.wikipedia.org/wiki/Type-length-value

thanks for the link, you weren't alone