[okfn-labs] "Foreign Key" support in JSON Table Schema and Tabular Data Packages

Stefan Urbanek stefan.urbanek at gmail.com
Mon Mar 10 17:48:19 UTC 2014


On 10 Mar 2014, at 17:30, Rufus Pollock <rufus.pollock at okfn.org> wrote:

> Foreign Key support is now into JSON Table Schema:
> 
> http://dataprotocols.org/json-table-schema/#foreign-keys
> 
> And hence also into Simple Data Format / Tabular Data Packages (which uses JSON Table Schema).
> 

Awesome to have it.

I have one question. The spec reads:

	”MUST have an attribute fields which is a string if the outer fields is a string, else an array of the same length as the outer fields”

Why MUST and not just MAY? Can’t we just default to the “fields” if not provided? It is not uncommon to have a design where keys have unique name all over the place, regardless whether they are primary or foreign. Data warehouses might have a surrogate key naming convention: id_*, *_id, *_key or similar, for example product_key, id_product or product_id. The (mostly surrogate) key names are used as the primary key column as well as a foreign keys. This design pattern in the data warehouse increases understandability of queries.

Stefan

Twitter: @Stiivi
Personal: stiivi.com
Data Brewery: databrewery.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20140310/41065876/attachment-0004.html>


More information about the okfn-labs mailing list