W3C home > Mailing lists > Public > public-rdb2rdf-wg@w3.org > June 2010

Re: Direct Mapping document

From: Juan Sequeda <juanfederico@gmail.com>
Date: Tue, 8 Jun 2010 10:08:49 -0500
Message-ID: <AANLkTikzTRPm1L4cn0K0s4pBRrBKZwyRCcEMJbYS5XMZ@mail.gmail.com>
To: "Eric Prud'hommeaux" <eric@w3.org>
Cc: Richard Cyganiak <richard@cyganiak.de>, RDB2RDF WG <public-rdb2rdf-wg@w3.org>
I thought this was going to be on a wiki first and not published
immediately?


Juan Sequeda
+1-575-SEQ-UEDA
www.juansequeda.com


On Tue, Jun 8, 2010 at 5:41 AM, Eric Prud'hommeaux <eric@w3.org> wrote:

> * Richard Cyganiak <richard@cyganiak.de> [2010-06-08 09:56+0100]
> > Hi Eric,
> >
> > That's a good start.
>
> I'm hoping that by actually including the URL (!)
>  http://www.w3.org/2001/sw/rdb2rdf/directGraph/
> I can clarify many of these questions.
>
> In penance, I will go through your comments and point to where they
> should be answered in the doc.
>
> > On 7 Jun 2010, at 16:49, Eric Prud'hommeaux wrote:
> > >In order to get some common terminology, I've created a draft of a
> > >Direct Mapping.
> >
> > Maybe start by defining what a database is in your notation? "A
> > database db is a set of relations R_1...R_i" etc?
>
> http://www.w3.org/2001/sw/rdb2rdf/directGraph/#Rel-Database
>
> > >This defines a Direct Graph and demonstrates how this
> > >definition can be extended.
> > >
> > >The crux of it is still:
> > >
> > >directDB(db)    ≝   { directR(r) ∀ r ∈ db }
> > >directR(R)      ≝   { directT(R, T) ∀ T ∈ R.Body }
> > >directT(R, T)           ≝   { directL(R, S, A) ∀ A ∈ scalar(T) }
> > >                    ∪ { directN(R, S, A) ∀ A ∈ reference(T) }
> >
> > What are scalar(T) and reference(T)?
>
> http://www.w3.org/2001/sw/rdb2rdf/directGraph/#direct-scalar
> http://www.w3.org/2001/sw/rdb2rdf/directGraph/#direct-reference
>
> > >                     ∣ S = nodemap(R, pk(T))
> > >directL(R, S, A)   ≝ triple(S, predicatemap(R, A), literalmap(A))
> >
> > What's literalmap?
> >
> > >directN(R, S, A)   ≝ triple(S, predicatemap(R, A), nodemap(R, A))
> > >
> > >nodemap(R, A)      ≝ IRI(stem + "/" + R.name "/" A.name + "." +
> > >A.value + "#_")
> > >predicatemap(R, A) ≝ IRI(stem + "/" + R.name "#" A.name)
> >
> > What's the logic for uses hashes in some places and slashes in others?
>
> http://www.w3.org/2001/sw/rdb2rdf/directGraph/#LD
>
> > Shouldn't there be an rdf:type triple somewhere? If not, then how do
> > you SPARQL for all records in a single DB?
>
> Would you be satisfied with a TypeAnnotation extension?
>  http://www.w3.org/2001/sw/rdb2rdf/directGraph/#extend
> It feels like keeping the direct mapping agnostic to types
> simplifies later math.
>
> > To be really useful, this direct mapping should define a URI for the
> > DB itself, for each relation, and for each attribute in the
> > relations.
>
> The direct mapping is defined in terms of a <code>stem</code>
>  http://www.w3.org/2001/sw/rdb2rdf/directGraph/#alg
>
> > >I'm still playing with the notation.
> >
> > I'd prefer classical mathematical sets, so where you have:
> >
> >   directDB(db)           ≝   { directR(r) ∀ r ∈ db }
> >
> > I'd rather see:
> >
> >   directDB(db) = { directR(r) | r ∈ db }
>
> Any seconds on this? I'm pretty agnostic to notation.
>
> Did the scala notation resonate with you at all?
>
> > General note: "succinct" and "clear" are correlated, but not the
> > same. The latter should be the goal, not the former.
> >
> > Best,
> > Richard
> >
> >
> >
> >
> > >It's currently a pretty classic
> > >notation:
> > >
> > > 3.1 Notation for Types
> > >   A  : a type
> > >   A ⊔ B  : disjoint union of A and B
> > >   ( A, B )  : tuple (Cartesian product) of types A and B
> > >   [ A ]  : list of elements of type A
> > >   { A }  : set of elements of type A
> > >   { A→B }  : map of elements of type A to elements of type B
> > > 3.2 Notation for Injectors
> > >   a  : an instance of an A
> > >   ( a1, b1 )  : a tuple with elements a1 and b1
> > >   [ a1, a2 ]  : list with elements a1 and a2
> > >   { a1, a2 }  : set with elements a1 and a2
> > >   { a1→b1, a2→b2 }  : map with elements with key a1 mapped to b1
> > >and key a2 mapped to b2
> > > 3.3 Supporting Functions
> > >   AB[a]  : in a map of A to B, the instance of B for a given A*
> > >
> > >We can get more type-safety if we use something like a scala notation,
> > >but I'm not sure how to tersely express things like disjoint union.
> > >
> > > 3.1 Notation for Types
> > >   x:X  : x is an element in the set X
> > >   A ?? B : disjoint union of A and B (normally case classes
> > >            extending an abstract class, e.g.:
> > >              abstract class AB; A extends AB; B extends AB;
> > >            )
> > >   ( A, B )  : tuple (Cartesian product) of types A and B
> > >   List[ A ]  : list of elements of type A
> > >   Set[ A ]  : set of elements of type A
> > >   Map[ A, B ]  : map of elements of type A to elements of type B
> > > 3.2 Notation for Injectors
> > >   a  : an instance of an A
> > >   ( a1, b1 )  : a tuple with elements a1 and b1
> > >   List( a1, a2 )  : list with elements a1 and a2
> > >   Set( a1, a2 )  : set with elements a1 and a2
> > >   Map( a1→b1, a2→b2 )  : map with elements with key a1 mapped to
> > >b1 and key a2 mapped to b2
> > > 3.3 Supporting Functions
> > >   AB(a)  : in a map of A to B, the instance of B for a given A*
> > >
> > >--
> > >-ericP
> > >
> >
>
> --
> -ericP
>
>
Received on Tuesday, 8 June 2010 15:16:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 June 2010 15:16:29 GMT