3 ms·
You can easily have schema-less with Postgres's jsonb data type.
by stemcc 9y ago
You can easily have schema-less with Postgres's jsonb data type.
- hartator 9y agoNot really. Postgres ORMs are not meant to do schema-less and tables still need to be created.
- stickfigure 9y agoYou're right that ORMs aren't really set up to use jsonb but it can be done. I've had pretty good success with a kind of "hybrid" putting most relational data in regular columns (with FK constraints) and adding flexible data in jsonb. The main trick is understanding how to build custom column types in whatever ORM you actually use. I can imagine a future with specialized ORMs designed around jsonb, but the current state of the art is probably not as bad as you think.
- StreamBright 9y agoYou are implying you need an ORM for the simple key-value (jsonb) data access. I don't think you would benefit much.
- manigandham 9y agoIn the .NET world, ServiceStack ORMLite has custom Postgres type attributes to use the jsonb and other fields automatically. http://docs.servicestack.net/releases/v4.5.6#postgresql-data-types http://docs.servicestack.net/releases/v4.5.6#postgresql-data... There is also Marten which is an ORM that offers a full document database interface all backed by Postgres JSON columns. http://jasperfx.github.io/marten/documentation/documents/ http://jasperfx.github.io/marten/documentation/documents/