Re: Understanding some issues on the denotational semantics

Alex,


On Feb 17, 2011, at 16:18 , Alexandre Bertails wrote:

[snip]
> 
> Sorry, I did not understand your comment this way as I think that the
> type is already correct.
> 
>> But does that specification means that for every table t, primaryKey(t) will give me a set s=primaryKey(t) where size(s)<=1? Ie, that, for every table, the primaryKey is either empty or restricted to one single column? That is the discrepancy with section 2.2 that explicitly speaks about multi-column primary keys...
> 
>> From you comment:
> s/the primaryKey is either empty or restricted to one single column/the primaryKey is either empty or restricted to one single CandidateKey/
> 

Sorry, right

> So primaryKey's type tells you that primaryKey gives you either 0 or 1
> CandidateKey. The definition for CandidateKey is
> [[
> CandidateKey ::= List(ColumnName)
> ]]
> 
> So you do have multi-columns for a Primary Key (if there is one).
> 
> Am I getting it right? I may be not introducing this one the right way.
> 

I think I get it now but... why do I need this? Why not define

primaryKey : Table → CandidateKey

or is a List necessarily non-empty, ie, 

CandidateKey ::= List(ColumnName)

means that there _is_ at least one column (ie, the no primary Key alternative would not be covered?)

Ivan

----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Friday, 18 February 2011 10:39:56 UTC