Re:Goodbye MongoDB, Hello PostgreSQL (2015)
by anticristi on Thursday March 11, 2021 @01:55PM
(#26427609)
Maybe I explained it badly. :)
SQL essentially forces you to first define your data schema, then write data according to that schema. This works great for reading a user profile given an email; or read all comments of all users who are born before 1995. Since you have a schema on write, you can add indexes to optimise these queries.
In contrast, if you need to do "anomaly detection" over an opaque dataset (where the definition of "anomaly" moves faster than you can rewrite your schemas), then it's better to just do a full dataset scan and create a schema on read.
My 2 cents.
Re:Goodbye MongoDB, Hello PostgreSQL (2015)
by aidos on Thursday March 11, 2021 @03:05PM
(#26428391)
Still not sure I buy it. I can extract a document representation from my relational data that matches your document store at read time. I can effectively choose my schema when I read, there’s no need to rewrite it at the storage layer.
With an object store you mostly have to have decided upfront which data is collocated together.