![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
David BL wrote: On Apr 12, 2:37 pm, Keith H Duggar <dug... (AT) alum (DOT) mit.edu> wrote: On Apr 12, 1:13 am, David BL <davi... (AT) iinet (DOT) net.au> wrote: snip The term ellipse(point(0,0),1,1) is distinct from circle(point(0,0),1) even though we may regard them as both encoding a unit circle. What is the point here? If we are talking about a multi-sorted FOL then those two terms have distinct types. If either is equal to some other expression say "UnitCircle()" or whatever, then that must be derivable from the stated axioms and type definitions. Actually I was considering single sorted FOL with equality. Sorry for not being clear. My point was that under interpretation, distinct terms can represent the same value. This leads to an equivalence relation on terms. I was actually thinking about an analogy to the D&D type system (where circle is a subtype of ellipse). The type system in question is a conditional. It is predicated on someone wanting something like inheritance in their type system. If you want something like that, then D&D show how to do it with some consistency. If you don't want a type system with something like inheritance, don't do that. |
#12
| |||
| |||
|
|
Anyhow, interpretation is orthogonal and therefore irrelevant to both FOL and RM. I agree. However I consider the topic of my post to concern the problem of how to encode values on a computer, in which case a formal semantics is required. Got it. Perhaps it would be worth discussing whether that is a fundamental requirement in database theory? I consider "data" to mean "encoded value". Data means information represented suitably for mechanical processing. The information might be a value or might be something else. |
#13
| ||||
| ||||
|
|
On Apr 12, 7:09 am, David BL <davi... (AT) iinet (DOT) net.au> wrote: On Apr 12, 2:37 pm, Keith H Duggar <dug... (AT) alum (DOT) mit.edu> wrote: Hopefully we can agree that since there is no interpretation defined in the RM nor FOL that there are not "multiple phases" nor "playing around" nor any other of the problems above. Yes I agree with that, but I actually want to consider the problems that arise under interpretations. Ok, cool. Thanks for this and the other clarifications. Now I'm a bit clearer on understanding what you are exploring. However, are we agreed that in the context of RM this is what we would call the "physical" layer? |
|
For example, suppose that we define a particular interpretation that maps the ellipse and circle terms to particular structures say sets over which we define various other axioms (perhaps even including axioms referring to natural (as in physical world) observations. |
|
Then I would argue that even though these sets are not bits and bytes they are, none-the-less, "physical" in so far as the RM is concerned. Would you agree? |
|
I think the problem is how to define a formal semantics, such that under interpretation a relation or tuple is able to encode something else (e.g. an image, string, triangulated surface etc). More importantly, how is the equality operator which can be regarded as predefined on relations and tuples somehow overridden to comply with the interpretation? Also note that the RM operators are defined in terms of equality of attribute values. So which version of equality is used on RVAs? An interpretation on nested terms is very simple and elegant. Equality can be treated as a predicate symbol. How is an interpretation defined on nested relations? Ok, let me make sure I understand this correctly by making up a concrete example. Suppose for example I have a relation with a DirectedGraph attribute where DirectedGraph is a relation valued attribute with header {NodeA : Node, NodeB : Node} under an interpretation "there is an edge from NodeA to NodeB". Now given those choices the question arises how to define "equality" because The RM already defines a strict equality for relations which would/could be applied to these RVAs but under our interpretation we may require that "equality" instead be defined as graph isomorphism. So it seems we have a problem of how to "override" the equality operator (say "=") such that it is consistent with our desired semantic interpretation. Is this what you mean? |
#14
| |||
| |||
|
|
David BL wrote: ... One of my main motivations here is to question the whole premise behind RVAs, which I have assumed are used to /encode/ attribute values within parent relations. I don't believe the RM should be allowed to play around with interpretation after the fact. Having multiple phases of interpretation seems extravagant, unnecessary and ill defined to me. I think FOL can encode all imaginable data types effectively using nothing more than nested terms with a single interpretation step. ... Within D&D's approach I don't think RVA's are at all 'ill defined'. |
#15
| |||
| |||
|
|
On Apr 12, 11:35 pm, Keith H Duggar <dug... (AT) alum (DOT) mit.edu> wrote: On Apr 12, 7:09 am, David BL <davi... (AT) iinet (DOT) net.au> wrote: I think the problem is how to define a formal semantics, such that under interpretation a relation or tuple is able to encode something else (e.g. an image, string, triangulated surface etc). More importantly, how is the equality operator which can be regarded as predefined on relations and tuples somehow overridden to comply with the interpretation? Also note that the RM operators are defined in terms of equality of attribute values. So which version of equality is used on RVAs? An interpretation on nested terms is very simple and elegant. Equality can be treated as a predicate symbol. How is an interpretation defined on nested relations? Ok, let me make sure I understand this correctly by making up a concrete example. Suppose for example I have a relation with a DirectedGraph attribute where DirectedGraph is a relation valued attribute with header {NodeA : Node, NodeB : Node} under an interpretation "there is an edge from NodeA to NodeB". Now given those choices the question arises how to define "equality" because The RM already defines a strict equality for relations which would/could be applied to these RVAs but under our interpretation we may require that "equality" instead be defined as graph isomorphism. So it seems we have a problem of how to "override" the equality operator (say "=") such that it is consistent with our desired semantic interpretation. Is this what you mean? Yes. Consider a FOL term (call it T) that under interpretation represents a particular relation of type DirectedGraph. Let GRAPH be a function symbol of arity 1. Under interpretation let GRAPH(T) denote the graph represented by T. This unary function isn't 1-1 and nicely handles the "override" of equality. Indeed GRAPH represents none other than the canonical projection map of the equivalence classes according to graph isomorphism. It would seem that the equivalent in the D&D RM would be to introduce a type named GRAPH and its selector function is the canonical projection map described above. |
#16
| |||
| |||
|
|
On Apr 13, 3:42 am, David BL <davi... (AT) iinet (DOT) net.au> wrote: Consider a FOL term (call it T) that under interpretation represents a particular relation of type DirectedGraph. Let GRAPH be a function symbol of arity 1. Under interpretation let GRAPH(T) denote the graph represented by T. This unary function isn't 1-1 and nicely handles the "override" of equality. Indeed GRAPH represents none other than the canonical projection map of the equivalence classes according to graph isomorphism. It would seem that the equivalent in the D&D RM would be to introduce a type named GRAPH and its selector function is the canonical projection map described above. Or to define an ISOMORPHIC function and use that in WHERE (or the equivalent) clauses, or to let GRAPH(T) denote simply the canonical projection as a DirectedGraph (no need for another type), or ... For example, if you want a "join" where isomorphism is used as "equality" rather than simple relational equality it seems any of these (and please forgive whatever pseudo SQL appears below): SELECT * FROM GroupA, GroupB WHERE ISOMORPHIC(GroupA.DAG, GroupB.DAG) SELECT * FROM GroupA, GroupB WHERE GRAPH(GroupA.DAG) == GRAPH(GroupB.DAG) ... So what precisely is the problem you perceive with the current state of affairs? What can we not currently express/define? |
#17
| |||
| |||
|
|
If this is how the RM is meant to fit into the picture |
#18
| |||
| |||
|
|
If this is how the RM is meant to fit into the picture |
#19
| |||
| |||
|
|
On Apr 12, 1:13 am, David BL <davi... (AT) iinet (DOT) net.au> wrote: If this is how the RM is meant to fit into the picture You have a lot of confusions and misunderstandings about FOPL, relations, RVAs, Prolog and programming abstraction. If you would properly write out the simplest database some of this would begin to become apparent to you. What are the names of your relation variables and constants? What is the characteristic predicate (parameterized statement about the world) for each? What is the formal wff for each? Why? What are the attributes for each? Why? What is your (example) query relation expression? What is the characteristic predicate of its result? Why? What are the (example) values of your relation variables? What statement does each make about the world? Why? What statement does the database make about the world? Why? What is the value of your query relation expression? Why? What statement does this value make about the world in the context of this query relation expression? Why? What statement does a query result make about the world regardless of its query relation expression? Why? The most important things to understand are that: 1. each relation expression corresponds to a certain wff and 2. equivalent relation expressions correspond to equivalent wffs The relational algebra is just another syntax for FOPL. (So they can't possibly be at odds.) |
|
The meaning of an RVA or a TVA, as with any attribute, is whatever the predicate of its containing relation gives it. Any attribute value could denote an abstract value or just itself. |
#20
| |||
| |||
|
|
On Apr 15, 5:01 am, com... (AT) hotmail (DOT) com wrote: .... The relational algebra is just another syntax for FOPL. (So they can't possibly be at odds.) You are merely talking about the correspondence between formulae in FOL versus expressions in the RA. E.g. RA: project((R1 join R2) union R3, {X}) FOL: exists y,z such that (P1(x,y) /\ P2(y,z)) \/ P3(x,y,z) R1,R2,R3 are relvar names. X is an attribute name. P1,P2,P3 are predicate symbols. x,y,z are variables. ... |
![]() |
| Thread Tools | |
| Display Modes | |
| |