dbTalk Databases Forums  

General semantics

comp.databases.theory comp.databases.theory


Discuss General semantics in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Nilone
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 08:35 AM






On May 21, 1:38*pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote:
Quote:
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.
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.

Reply With Quote
  #42  
Old   
Erwin
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 09:12 AM






On 21 mei, 12:41, Nilone <rea... (AT) gmail (DOT) com> wrote:
Quote:
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.
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.



Quote:
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() { }

}
(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_ ?



Quote:
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.
Yes, the RM is sufficiently complete to also be able to describe the
entire state history of a running program.



Quote:
*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.

The fact of being able to use relations to describe/define (e.g.) the
existance of some variable in some running OO program, does not imply
that the programming constructs used in that running program also
"map" to the relational constructs used to describe it (and do so
universally). It should be a well-known fact that no single
relational structure is ever "THE" single unique possible solution to
any given modeling problem. That holds too if the modeling problem is
about running programs.

It feels to me like you're seriously mixing up distinct levels here.

Reply With Quote
  #43  
Old   
Bob Badour
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 10:20 AM



Nilone wrote:

Quote:
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!

Reply With Quote
  #44  
Old   
paul c
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 10:59 AM



Erwin wrote:
Quote:
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.
It is amazing how much has been written about what Codd wrote compared
with the few dozen pages he described his approach. Also amazing how he
cut through the chaff only to see thousands of people try to
re-introduce it. Why are thousands of web pages recommended reading
instead of a handful of his short papers? What is it exactly that Codd
omitted that needs to be said? Who studies chess without playing it?


It's human nature to take refuge in taxonomies and dogmas of all kinds.
Opportunists see profit by inventing jargon to exploit that
weakness and the standard technique of evangelists is to overwhelm their
target victims (who are naturally lazy by reason of human nature) by
dictating vocabulary and enticing them with intricate thought frameworks
that pretend to be self-contained but are really quite insular, eg., in
the db field, the various 'modelling' rarely suggest a complete
implementation. As in theology, the meaning of belief is then distorted
to be the desire to believe, which becomes the product that is actually
sold. I'd say the question usually remains: where is the mechanical
leverage of any particular 'modelling' religion, eg., what is the point
of improved natural language expressiveness without accompanying machine
operators, as in 'how does a submarine swim'? Do any of them 'improve'
the lack of connection of ER and its ilk with implementation? A model
of beliefs is not the same as a model of a useable computer system. Why
do people persist in dodging the Information Principle? How can ORM
avoid sets without producing equivalents for the set operators? Do the
ORM proponents truly believe there is an advantage in postponing
implementation or is there just a vested interest in making systems more
complicated? The dozens of db's I worked on all had one problem in
common, the implementation of unnecessary requirements, nearly always
they were introduced by so-called domain experts and their programming
flunkies. Once in a while a powerful user would cancel them.

Reply With Quote
  #45  
Old   
paul c
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 11:02 AM



Nilone wrote:
Quote:
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.
Tell us why we need more 'correspondences'.

Reply With Quote
  #46  
Old   
Clifford Heath
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 11:44 AM



Cimode wrote:
Quote:
Having tried for more than 30 years to discard RM, OO crowd is now
reinventing (attempting to) RM.
Maybe. But the "objects" of object role modeling have nothing to do
with the object of the O-O crowd. The word object in ORM was derived
from linguistics, and in use before the term O-O was invented.

The only ones displaying the behaviour of the faithful here are those
who rubbish things they know nothing about.

Reply With Quote
  #47  
Old   
Clifford Heath
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 11:58 AM



paul c wrote:
Quote:
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.
Indeed. It has the potential to help people understand
the relational model better, and to implement it more
purely than has yet been done.

Quote:
Tell us why we need more 'correspondences'.
Because it does contain additional insight, for those
who are open to it. Few here though, it seems. They
refer to parade their partial knowledge instead.

But if you're not in that class, I dare you to at least
take a glance at some of the example models in ORM2 and
CQL on this page and honestly tell me you think there's
nothing interesting happening there:
<http://dataconstellation.com/ActiveFacts/examples/>
This stuff is pure relational, but at a level that anyone
can understand... and that makes a difference.

Reply With Quote
  #48  
Old   
Nilone
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 01:27 PM



On May 21, 4:20*pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote:
Quote:
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.

Reply With Quote
  #49  
Old   
Nilone
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 01:29 PM



On May 21, 3:12 pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote:
Quote:
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.
We must include the host system in the model. During execution, the
DBMS / VM would derive the new state of the object from its variables
and methods, and update the tuple(s) that represent it in the
relvar(s) that describe the run-time state of the program.

Quote:
(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 ?
The class defines the set. You can see the members right there. In
general, however, classes designate sets and subsets implicitly.
Classes with public constructor functions (and some classes without
them) define unbounded sets. However, I see it as one of the
weaknesses of OOP that I can't query the set of all instances of a
class. I could use a static private List or Dictionary to keep track
of instances, but that would interfere with the GC reclaiming the
object automatically.

Quote:
How can I intersect that set with another one ?
Please don't ask me to map from the relational model to OOP. I can't
do so in general, since the RM has greater expressive power than OOP.
The greater system can describe the lesser, but not the other way
around.

I could write functions to determine intersections in specific cases,
but your question illustrates a general weakness of OOP. Although OOP
languages can't easily or generally query the objects in the memory of
programs, I still think a relational interpretation of the constructs
and mechanisms of OOP provide the best possible understanding of it.

Quote:
(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.
All OOP classes describe set-like relations over a domain of objects.
I see no general relationship in the opposite direction. Perhaps I
used 'correspond' incorrectly, I had in mind a unidirectional
relationship. I took care to write that OOP classes 'correspond to'
relations, and not vice-versa. If I messed up the terminology again,
I apologize.

Quote:
(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_ ?
I don't disagree with you, but I don't see the need for the term
'type' yet. I imagine "Man Erwin" declares a relvar with a maximum
cardinality of 1, from the symbol Erwin to an element in the domain of
the Man class. A 'null value' corresponds to the empty relation. "=
new Man()" creates a new object in the domain of the class and updates
the relvar. I can imagine other implementations, e.g. a binary
relation for (symbol, class) and a relvar for (symbol, class, value).

Quote:
Yes, the RM is sufficiently complete to also be able to describe the
entire state history of a running program.
Good, some common ground at last.

Quote:
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.
Would you agree that the RM can describe the entire possible state
space of any program?

Quote:
It should be a well-known fact that no single
relational structure is ever "THE" single unique possible solution to
any given modeling problem.
I see, I used 'map' incorrectly. I had in mind that for every OO
model, there exists at least one corresponding RM model. Would you
agree with that?

Quote:
It feels to me like you're seriously mixing up distinct levels here.
The possibility always exists. I sometimes experience stubborn
misconceptions and flights of fancy. I'll try to keep my nuttiness
reasonable and well-mannered, and I appreciate any time and effort you
spend to read and respond to me.

Reply With Quote
  #50  
Old   
Bob Badour
 
Posts: n/a

Default Re: General semantics - 05-21-2010 , 01:42 PM



Nilone wrote:

Quote:
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.
Sorry, Nilone, it's still sounds like a lousy idea to me.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.