- From: Alexandre Bertails <bertails@w3.org>
- Date: Wed, 16 Feb 2011 15:24:39 -0500
- To: Juan Sequeda <juanfederico@gmail.com>
- Cc: public-rdb2rdf-wg@w3.org
> One good indication of our work is to follow the activity on > the > repository. We don't produce the maths without having the > corresponding > code and tests. This part is now living in the "no_hierarchy" > branch but > I plan to merge that into the default one in the next days. > That will > also update the web application but this will be transparent, > as both > branches pass exactly the same test-suite. > > > ok And I forgot to mention the RSS feed https://dvcs.w3.org/hg/FeDeRate/rss-log . Alexandre. > > Alexandre. > > > > > > > > > Alexandre Bertails. > > > > [1] > http://www.w3.org/mid/1297880900.11894.25.camel@simplet > > [2] > http://www.w3.org/2011/02/16-DM-denotational-rdf-semantics > > > > > > > > > > > > > Thanks! > > > > > > > > > I'm going to use this as my > > > example: > > > http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#lead-ex > > > > > > > > > First, I'm going to define a Database Model, > following: > > > > > > http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#Rel > > > > > > > > > Database = {"Address -> Table1, "People" -> > Table2} > > > > > > > > > Table1 = (Header1, 0, [id], 0, Body1) > > > Header1 = {id -> int, city -> char, state ->char} > > > Body1 = [Tuple1, Tuple2] > > > Tuple1 = {id -> 18, city -> Cambridge, state -> > MA} > > > Tuple2 = {id -> 19, city -> Austin, state -> TX} > > > > > > > > > Table2 = {Header2, 0, [id], FK2, Body2) > > > Header2 = {id -> int, fname -> char, addr -> int} > > > FK2 = { [addr] -> (Table1, [id]) } > > > Body2 = [Tuple3, Tuple4, Tuple5] > > > Tuple3 = {id -> 7, fname -> Bob, addr -> 18} > > > Tuple4 = {id -> 8, fname -> Sue, addr -> null} > > > Tuple5 = {id -> 9, fname -> Joe, addr -> 19} > > > > > > > > > So lets start! > > > [23] > > > directDB() > > > ≝ > > > { directR(R, M) ∣ > > > R ∈ DB } > > > > > > > > > First of all, I do not know what M is. I'm > assuming that DB > > is the > > > Database, therefore: > > > > > > > > > R = {"Address -> Table1, "People" -> Table2} > > > > > > > > > If I understand the notation correctly, then: > > > > > > > > > directDB() = {directR("Address -> Table1, M), > > directR("People" -> > > > Table2, M)} > > > > > > > > > so let's do the first directR > > > > > > > > > 24] > > > directR(R, M) > > > ≝ > > > { directT(T, R, > > > M) ∣ T ∈ R.Body } > > > > > > I'm still unclear what is M > > > > > > > > > What is R.Body? I'm assuming you are retrieving > Body. > > Therefore Body > > > of Table1 is [Tuple1, Tuple2], therefore I assume: > > > > > > > > > T = [Tuple1, Tuple2] > > > > > > > > > now we have: > > > > > > > > > directR("Address -> Table1, M) = > { directT([Tuple1, Tuple2], > > "Address > > > -> Table1, M) } > > > > > > > > > now let's go to the definition of directT > > > > > > > > > 25] > > > directT(T, R, M) > > > ≝ > > > { directS(S, T, > > > R, M) ∣ S = > > > subject(T, R, > > > M) } > > > > > > > > > now we need to know what is S > > > > > > > > > 26] > > > subject(T, R, M) > > > ≝ > > > if (pk(R) = > > > ∅) then new blank > > > node else rowIRI(R, T[pk(R)]) # references the > ultimate > > referent of hierarchical key > > > > > > > > > What is pk(R)? > > > > > > > > > now we have: > > > > > > > > > subject([Tuple1, Tuple2], "Address -> Table1, M) = > if > > (pk("Address -> > > > Table1) = 0 > > > > > > then new blank node > > > > > > else > > > > > > rowIRI("Address -> Table1, T[pk("Address > -> > > Table1)]) > > > > > > > > > > > > > > > I'm assuming tat pk("Address -> Table1) will > return the > > primary key, > > > then we have > > > > > > > > > pk("Address -> Table1) = [id] > > > > > > > > > Now we have > > > > > > > > > subject([Tuple1, Tuple2], "Address -> Table1, M) = > > rowIRI("Address -> > > > Table1, T[[id]]) > > > > > > > > > Now let's go to the definition of rowIRI > > > > > > > > > [31] > > > rowIRI(R, As) > > > ≝ > > > IRI(UE(R.name) + > > > "/" + (join(',', > > > UE(A.name) + "=" > > > + UE(A.value)) ∣ > > > A ∈ As ) + "#_") > > > > > > > > > What is UE()? > > > > > > > > > What is R.name? Where is it defined? > > > > > > > > > Ok, I'm stopping here. > > > > > > > > > p.s. By the time I finished doing all of this, I > saw that > > Alex sent an > > > email with a new version of the denotational > semantics. I'm > > guessing I > > > should re-do what I just did with the new version? > > > > > > > > > Thanks guys for the clarifications! > > > > > > > > > Juan Sequeda > > > +1-575-SEQ-UEDA > > > www.juansequeda.com > > > > > > > > > > > > > > > > > >
Received on Wednesday, 16 February 2011 20:24:49 UTC