Understanding some issues on the denotational semantics

Alex, Eric

Can you guys clarify some issues that I'm not understanding correctly.

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<http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#>(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<http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#>(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<http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#>(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<http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#>(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<http://www.w3.org/TR/2010/WD-rdb-direct-mapping-20101118/#RDF-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 19:17:09 UTC