Hacker News new | ask | show | jobs
by jasonhansel 1860 days ago
> Typically semi-structured data have schemas that are only enforced by convention

Technically, in Postgres you can (kind of) enforce arbitrary schemas for semi-structured data using CHECK constraints. Unfortunately this isn't well-documented and NoSQL DBs often don't support similar mechanisms.

2 comments

Seems likely that the enforced schema would then break things when someone updates the "live" schema without updating all of the checks littered through downstream tables...
I'd love a document database that supports JSON Schema validation on read and write.