Ask HN: Open-source data model definition

1 points by d_watt ↗ HN
I'm trying to find a good language to be able to document relationships between tables. For example, some thing that declares that a `users` table can be joined to a `customers` table on `users.customer_id = customers.id`.

Examples of this that I know of

- ORMs define these relationships

- LookML as a proprietary format

- Foreign Keys can kind of do this, but enforce a restriction, rather than just being declarative.

Ideally this format can be serialized/deserialized to help inform possible queries that can be run, and is agnostic from an ORM/specific data stack.

It's always surprised me the SQL spec itself doesn't have a mechanism for declaring this information about the relationship between tables, other than strict fkeys.

0 comments

[ 1.4 ms ] story [ 11.9 ms ] thread

No comments yet.