News for hackers. Stuff that matters.
Re:MongoDB: How to Use the JSON Schema Validator by tapirl on Sunday August 19, 2018 @03:29AM (#17793051)
you should interpret "schemaless" as "free/non-fixed schema".

> Your data has a schema, whether you're explicit about it or not,

Partially true, but not accurate. Often the items in a data set have similar schemas, but not exact the same one.

Re:MongoDB: How to Use the JSON Schema Validator by bsaul on Sunday August 19, 2018 @07:27AM (#17793824)
good luck writing code for that kind of dataset then.

Data has schema by definition otherwise you wouldn't be able to reason about it.

Re:MongoDB: How to Use the JSON Schema Validator by amarkov on Sunday August 19, 2018 @11:40PM (#17797564)
Certainly, but that doesn't mean the schema has to be a strict validation encoded into your storage format. It's a perfectly well-defined programming model to say "well, I'm reading query X with schema Y, and if some rows don't match Y give me nulls instead".
Re:MongoDB: How to Use the JSON Schema Validator by bsaul on Wednesday August 22, 2018 @09:54AM (#17818672)
"well, I'm reading query X with schema Y, and if some rows don't match Y give me nulls instead"

Seems like a recipe for disaster to me, but well... A database isn't a "storage format". It's most often the single source of truth for a set of information.

Not being fully sure what data you expect from that source of truth and yet being able to query it is really dangerous. What if you start to update this data after having nullified things you didn't understand ?

Re:MongoDB: How to Use the JSON Schema Validator by amarkov on Wednesday August 22, 2018 @08:49PM (#17823614)
Schemaless databases are good for scenarios where the database isn't a source of truth. If you have a table full of e.g. per-second heartbeats from a bunch of deployed services, there's no fundamental underlying truth anyone's trying to gather from it, and you can't afford to run a full schema migration every time someone adds a new metric.

I recognize some people do try to use schemaless databases in the way you're describing, and I agree that's weird and dangerous.