Re: Could primaryKey be specified directly as a column name?

Dear Jeni, all,

just a guts feeling: Things like 'primary key' are constraints on the data. Another group is primarily concerned with constraints on data and validation of these: http://www.w3.org/2014/data-shapes/

In the F2F meeting of the DRF Data Shapes WG I noted that I would be surprised if basic SQL constraints (like primary/foreign key constrainrs would NOT be covered there), so likewise here I wonder whether these constraints are something we shouldn't do in liaison with the RDF data shapes group, rather  than specifying properties in isolation.

Thoughts?

Axel

--
Prof. Dr. Axel Polleres
Institute for Information Business, WU Vienna
url: http://www.polleres.net/  twitter: @AxelPolleres

On 03 Nov 2014, at 11:53, Jeni Tennison <jeni@jenitennison.com> wrote:

> Hi David,
> 
> This was an attempt to make the metadata JSON be good JSON-LD. The draft now just uses the “name” property and references those names within “primaryKey", which makes it easier to write but requires a bit more application logic.
> 
> Jeni
> 
> -----Original Message-----
> From: David Booth <david@dbooth.org>
> Reply: David Booth <david@dbooth.org>>
> Date: 1 November 2014 at 20:36:05
> To: public-csv-wg@w3.org <public-csv-wg@w3.org>>
> Subject:  Could primaryKey be specified directly as a column name?
> 
>> In the 30-Oct-2014 draft at
>> http://w3c.github.io/csvw/csv2rdf/
>> there is a very nice, simple example in Sec 4. (Thanks for that!) But
>> I'm wondering about one detail.
>> 
>> Example 3 shows CSV metadata, which includes:
>> 
>> . . .
>> "columns": [{
>> "@id": "_:GID",
>> "name": "GID",
>> "datatype": "integer"
>> }, {
>> . . .
>> "primaryKey": "_:GID"
>> }]
>> . . .
>> 
>> I notice that the value provided for "primaryKey" above is specified as
>> an indirect identifier ("_:GID") for the primary key column, instead of
>> being directly specified as the column name "GID". I assume that there
>> is some rationale for doing it this way -- perhaps so that the metadata
>> can specify duplicate column names, though wouldn't that be a bad use
>> case to support? -- but it seems cumbersome and error prone. Can this
>> be simplified to allow the "primaryKey" to be specified directly as the
>> column name?
>> 
>> Thanks,
>> David
>> 
>> 
>> 
> 
> --  
> Jeni Tennison
> http://www.jenitennison.com/
> 

Received on Monday, 3 November 2014 11:37:28 UTC