- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Tue, 8 Jun 2010 11:30:50 -0400
- To: Juan Sequeda <juanfederico@gmail.com>
- Cc: Richard Cyganiak <richard@cyganiak.de>, RDB2RDF WG <public-rdb2rdf-wg@w3.org>
* Juan Sequeda <juanfederico@gmail.com> [2010-06-08 10:08-0500]
> I thought this was going to be on a wiki first and not published
> immediately?
I started futzing with a wiki page and was unsatisfied with what I
got out of preview. In a fit of frustration, I went straight to XML.
That said, a discussion page could be useful.
> 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
> >
> >
--
-ericP
Received on Tuesday, 8 June 2010 15:36:50 UTC