![]() | |
#41
| |||
| |||
|
|
On 21 mei, 12:45, Nilone <rea... (AT) gmail (DOT) com> wrote: On May 21, 7:57*am, Clifford Heath <n... (AT) spam (DOT) please.net> wrote: paul c wrote: By unary relation I mean a relation with one attribute (which I think is pretty standard lingo, surprised that anybody here wouldn't think that) Right, that's what I thought you meant. In which case, it could be a representation of either an existential fact type (an object type), or a unary predicate over one. The distinction is important. A unary predicate creates a subset of the object type it involves. This distinction was, I believe, the cause of your earlier disagreement. Further, a unary fact type does not have to be mapped as a unary relation. It could be represented as a boolean value in a table of that object type. but I have no idea what a 'fact type' is. *I know of relation andtuple types but don't know what use terms like 'fact type' or 'unary fact' terms might have. Perhaps, fact type = intension while unary fact = proposition Instantiating a predicate with attribute values always yields a proposition, no matter what the degree of the relation is. |
#42
| ||||
| ||||
|
|
On May 20, 10:51*pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: We can describe deterministic methods as binary relations over the possible states of a set of variables. *We can say that OOP classes embed these methods as RVAs in the class or subclass. |
|
Why not? *I can write object classes that correspond to that relation. *Here's one, somewhat unconventional, in C#: class Man { * * static Man Erwin = new Man(); * * static Man Nilone = new Man(); * * static Man Bob = new Man(); * * private Man() { } } |
|
Keith described the binding relation of a variable over time in the "On Formal IS-A definition" thread. *AFAIK, we can express any mechanism of OOP in relational terms. *OOP programs get compiled every day. *Trivially, each compiler corresponds to its own model of OOP. However, class-based languages share many similarities, so we can generalize some. *I believe any model can be described as a relational model. |
|
*Therefore, there must exist a mapping from OOP to RM (I don't think anyone could invert that mapping, though). |
#43
| |||
| |||
|
|
On May 20, 10:51 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Thanks for the feedback. Let's see if I can explain and defend that argument. You seem to axiomatically assume that OIDs are a necessity, and that they _must_ exist. Not at all. However, OOP languages are built on OIDs / references / pointers. Any relational description of OOP must include them. |
#44
| |||
| |||
|
|
On 21 mei, 07:57, Clifford Heath <n... (AT) spam (DOT) please.net> wrote: paul c wrote: By unary relation I mean a relation with one attribute (which I think is pretty standard lingo, surprised that anybody here wouldn't think that) Right, that's what I thought you meant. In which case, it could be a representation of either an existential fact type (an object type), or a unary predicate over one. The distinction is important. A unary predicate creates a subset of the object type it involves. This distinction was, I believe, the cause of your earlier disagreement. Further, a unary fact type does not have to be mapped as a unary relation. It could be represented as a boolean value in a table of that object type. but I have no idea what a 'fact type' is. I know of relation and tuple types but don't know what use terms like 'fact type' or 'unary fact' terms might have. Fact oriented modeling has a parallel history with relational modeling. It's built on logic rather than sets; those are two sides of one coin. Needless to say, it has its own terminology - I tried to introduce some. It's a different perspective, equal in power and purity to RM. It has some advantages in mapping to natural language somewhat better. Seehttp://ormfoundation.orgfor more details. Ignore it, or look into it, but don't scoff at it until you've looked into it. It seems like the "big brown book" is the bible of the ORM faith. Looking at the TOC, I see that in the field of constraints, the book distinguishes between uniqueness constraints, value constraints, subset constraints, equality constraints, exclusion constraints, ring constraints, join constraints, ... That is not an approach that invites to read on. The RM really has all that is needed to be able to (de facto) do fact- oriented modeling : relvars having predicates, plus the CWA. SIRA_PRISE records the predicate of each relvar in its catalog. The predicate of the catalog relvar that does this, is "<relvarname> is a relvar whose predicate is <predicate>.". SIRA_PRISE also has a method that can generate sentences from this predicate, e.g. the sentence "RELVAR is a relvar whose predicate is "<relvarname> is a relvar whose predicate is <predicate>.".". Incidentally, and referring to the subtitle of that website, the name of the method that does this is getTheFacts(). And I never needed any sort of ORM stuff to achieve that. Nor did I need to make artificial distinctions between the predicates of unary catalog relvars (e.g. "<typename> is a DBMS-supported type.") and the others. |
#45
| |||
| |||
|
|
On May 21, 1:38 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: On 21 mei, 12:45, Nilone <rea... (AT) gmail (DOT) com> wrote: On May 21, 7:57 am, Clifford Heath <n... (AT) spam (DOT) please.net> wrote: paul c wrote: By unary relation I mean a relation with one attribute (which I think is pretty standard lingo, surprised that anybody here wouldn't think that) Right, that's what I thought you meant. In which case, it could be a representation of either an existential fact type (an object type), or a unary predicate over one. The distinction is important. A unary predicate creates a subset of the object type it involves. This distinction was, I believe, the cause of your earlier disagreement. Further, a unary fact type does not have to be mapped as a unary relation. It could be represented as a boolean value in a table of that object type. but I have no idea what a 'fact type' is. I know of relation and tuple types but don't know what use terms like 'fact type' or 'unary fact' terms might have. Perhaps, fact type = intension while unary fact = proposition Instantiating a predicate with attribute values always yields a proposition, no matter what the degree of the relation is. Thanks for the correction. Let me try again: it seemed to me that Clifford's unary fact types correspond to propositional functions, while his unary facts correspond to the propositions yielded by instantiating such a type. As such, I see no real argument between the models; in fact, the little I know of ORM (mostly from looking at Halpin's page a while back) seemed to match up with the relational model well. |
#46
| |||
| |||
|
|
Having tried for more than 30 years to discard RM, OO crowd is now reinventing (attempting to) RM. |
#47
| |||
| |||
|
|
Nilone wrote: As such, I see no real argument between the models; in fact, the little I know of ORM (mostly from looking at Halpin's page a while back) seemed to match up with the relational model well. |
|
Tell us why we need more 'correspondences'. |
#48
| |||
| |||
|
|
Nilone wrote: On May 20, 10:51 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Thanks for the feedback. *Let's see if I can explain and defend that argument. You seem to axiomatically assume that OIDs are a necessity, and that they _must_ exist. Not at all. *However, OOP languages are built on OIDs / references / pointers. *Any relational description of OOP must include them. Hell no! |
#49
| |||||||||
| |||||||||
|
|
On 21 mei, 12:41, Nilone <rea... (AT) gmail (DOT) com> wrote: We can describe deterministic methods as binary relations over the possible states of a set of variables. We can say that OOP classes embed these methods as RVAs in the class or subclass. This is only true of read-only operators. Update operators are not relations/functions, and read operators with side-effects are "still a bit more" than just the relation/function on the arguments that determines the return value. If your aim is to "better understand OOP, and/or why it has the problems it has", then you can't narrow down the discussion to just read-only operators. |
|
(a) There are probably hundreds of distinct ways to find correspondences between this class and relational concepts. A tuple of degree three with the attributes all being of type 'Man' and named 'Erwin', 'Nilone' and 'Bob', respectively, is one of them. And what about this : a relation is a set. Where is the set in your class ? |
|
How can I intersect that set with another one ? |
|
(b) The fact that a certain class can be fabricated that may seem to resemble a relation, does not warrant the conclusion that relation corresponds to class (and vice-versa), in general. |
|
(c) Wouldn't you agree that "static Man Erwin" is the declaration of a variable named 'Erwin' which' type is 'Man' (making abstraction here of the issue about pointers) ? Wouldn't you agree that " = new Man()" is an assignment of a value of type Man (once again making abstraction of the issue of 'pointer to Man') to that newly declared variable ? Wouldn't you agree that all of this very very strongly points toward 'Man' being a _type_ ? |
|
Yes, the RM is sufficiently complete to also be able to describe the entire state history of a running program. |
|
Therefore, there must exist a mapping from OOP to RM (I don't think anyone could invert that mapping, though). I disagree with "therefore". I do not see what kind of axiom makes this a necessary consequence of the foregoing. |
|
It should be a well-known fact that no single relational structure is ever "THE" single unique possible solution to any given modeling problem. |
|
It feels to me like you're seriously mixing up distinct levels here. |
#50
| |||
| |||
|
|
On May 21, 4:20 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: Nilone wrote: On May 20, 10:51 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: Thanks for the feedback. Let's see if I can explain and defend that argument. You seem to axiomatically assume that OIDs are a necessity, and that they _must_ exist. Not at all. However, OOP languages are built on OIDs / references / pointers. Any relational description of OOP must include them. Hell no! Sorry, Bob, I think that came out the wrong way. I meant a direct description of OOP in a RM would require a domain called OID over which we can define relations. In current SQL systems, I could use an integer of the same width as the address bus. I certainly don't want to change the RM in any way. |
![]() |
| Thread Tools | |
| Display Modes | |
| |