Object/Relational Mapping is the Vietnam of Computer Science

On Thu, Mar 29, 2007 at 05:44:06PM +0900, [email protected] wrote:

[1] I’d love it if there were knowledge consultants in the world. Just
like I can go to a shop and have someone assist me in buying clothes,
I’d like to be able to go to someone and say “I’d like to know about x”,
and they would say “ah perhaps you’d like this, this and this, then”,
and I’d say “yes, those sound good, but this isn’t quite right”, etc. x
could be music, or part of biology, or international relations. And then
I could just drink things up and appreciate everything out there that
interests me.

That might just be an excellent idea for how to put together the
university of the future – but I’m not holding my breath. I rather
suspect university “educations” will continue to be half-baked
checklists of topic overviews presented in the most painful
institutional styles available for quite some time to come.

Sebastian Hanigk schrieb:

my queries. Because If I query on C I might have to query on A and B
as well.

The inheritance relation of an ER model can be represented in the
table model as views. Depending on the circumstances, it might be
favourable to model the subclasses as distinct tables and the
respective superclasses as views or the other way around.

Either way, queries over the subclasses will query the superclasses, but
that’s not different from the OO point of view.

combining it with a view is surely a good idea. It makes the queries
more easy. I don’t want to say it is different, it is just not as nice
as with normal tables.

So if your objects can be mapped nicely to an relational database,
then most possibly you are using a not so object oriented part of your
object system.

As Austin already has mentioned, object modeling can be seen as a
special form of ER modeling - which explains the plethora of
dysfunctional and outright ugly object hierarchies one encounters in
software engineering because those people do not understand the
fundamental mathematics.

I don’t agree with austin and the resulting ugly class hierarchy is
prove enough for me. Not in all cases of course :wink:

S.O.D.A.

The point is still valid: OODBs are not suited to represent arbitrary
views to the data as long as there isn’t a possibility of creating new
object classes based on the query.

ok, let me quote Carl here:
Indeed db4o was intended for one-app-one-schema but there is no reason
to stop thinking and designing here. Why should it not be possible to
have “object views” or “class-to-class” mappings if people need that? I
am sure that we will get to a stage where we will think about ways to
supply such functionality.

So I am not saying I know a database that can do arbitrary views, but on
the other hand I don’t think OODBs will never be able to do that. Your
last resort is always a object describing the class and the values to
form an instance. db4o does already have this. So I think the step to an
arbitrary view is not out of reach.

queries in an efficient way), I haven’t seen anything like that for
OODBs.

and why is it needed? you can describe objects as sets too, they are
just more complex. But I am no scientist in that area. In fact I think
the object model is a higher level of abstraction that allows you to use
different underlaying techniques, for example a partial relational
model. And of course you can apply the theories of that area for that
part of the implementation.

Why not consider OODB mathematics as part of graph theory and others?

bye blackdrag

Austin Z. wrote:

Please, please, please read more about relational theory before you
make statements like this, because it’s technical nonsense. There is
no “object model.”
Yet. That you know of. Yet. :slight_smile:

Seriously, the folks in the UK that developed the PI-Calculus have done
some work in computer-science models of objects, but I don’t know enough
about them to know if they’re relevant to this discussion. The one
reference I have is on the edge of my readability scale – if I sat down
with the book and the right programming language, I might be able to
learn it, but there are other things I’m more interested in doing.


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On 3/29/07, Jochen T. [email protected] wrote:

relational algebra and set theory (which faciliates optimising
queries in an efficient way), I haven’t seen anything like that for
OODBs.
and why is it needed? you can describe objects as sets too, they are
just more complex.

No, they’re not (more complex). The only thing about objects that
relational theory can’t model is operations (e.g., encapsulation). So,
no, objects aren’t just “more complex sets.”

But I am no scientist in that area. In fact I think the object model
is a higher level of abstraction that allows you to use different
underlaying techniques, for example a partial relational model.

Please, please, please read more about relational theory before you
make statements like this, because it’s technical nonsense. There is
no “object model.”

Part of the problem, of course, is that a lot of terms are used and
reused imprecisely.

  1. The Relational Model of Data is the combination of set theory and
    relational algebra. There is no corresponding theory or mathematical
    basis for object orientation. That is, there’s no “Object Orientation
    Model of Data”.

    Object orientation is, in fact, an implementation technique – a
    refinement of procedural programming that more tightly ties data with
    operations related to that data. That’s an important point, too:
    object orientation is about programming. It is not about data and
    the storage of data.

  2. When implementing something, you will model the data. This can be
    your data model that can be extended into an object model for
    programming purposes. These “models” are better considered “schema”;
    they describe the layout of the data.

Just because one can create something that works without a
mathematical theory behind it does not mean that one should do so. One
certainly shouldn’t claim that the thing without a mathematical theory
behind it is superior to the thing with – because that’s something you
should be able to demonstrate with, well, another theory. Performance
metrics are not evidence of superiority of concept; just of
implementation.

And of course you can apply the theories of that area for that part of
the implementation.

Why not consider OODB mathematics as part of graph theory and others?

There are no OODB mathematics, and that’s part of the point that I’ve
been trying to make. If you can point to OODB mathematics papers and
theories, I’ll retract or clarify that statement, but I have a
reasonably high level of confidence that object orientation isn’t
expressed in terms of mathematics or theory the way that the relational
model is.

Sure, an object store can be set up to allow for smart loading and such,
but that doesn’t mean that it’s a good idea. It might be the “right
now” idea, but it is something you’ll have to pay the piper for using at
some point in the future.

Like it or not.

-austin

Chad P. wrote:

That might just be an excellent idea for how to put together the
university of the future – but I’m not holding my breath. I rather
suspect university “educations” will continue to be half-baked
checklists of topic overviews presented in the most painful
institutional styles available for quite some time to come.

Maybe … but for all practical purposes, you can do what benjohn
describes on the Internet. That’s why I spend so much time here. :slight_smile:


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On Fri, Mar 30, 2007 at 05:15:49AM +0900, M. Edward (Ed) Borasky wrote:

interests me.

That might just be an excellent idea for how to put together the
university of the future – but I’m not holding my breath. I rather
suspect university “educations” will continue to be half-baked
checklists of topic overviews presented in the most painful
institutional styles available for quite some time to come.

Maybe … but for all practical purposes, you can do what benjohn
describes on the Internet. That’s why I spend so much time here. :slight_smile:

I do that as well, and rather enjoy it – though it’s a skill in itself,
and there aren’t really “consultants” to handle it for you.

Austin Z. schrieb:
[…]

Please, please, please read more about relational theory before you
make statements like this, because it’s technical nonsense. There is
no “object model.”

of course there is none as you define it. Who said I am using the same
definition? Is your definition a common definition for “model” in
general? If so please point me to a reference. I don’t know all the
correct UK/US terms used for this.

Part of the problem, of course, is that a lot of terms are used and
reused imprecisely.

  1. The Relational Model of Data is the combination of set theory and
    relational algebra. There is no corresponding theory or mathematical
    basis for object orientation. That is, there’s no “Object Orientation
    Model of Data”.

never said something different, or?

Object orientation is, in fact, an implementation technique – a
refinement of procedural programming that more tightly ties data with
operations related to that data.

I usually define what should be done and how to change the state, yes.
How is that related to the problem?

That’s an important point, too:
object orientation is about programming. It is not about data and
the storage of data.

I agree partially. It is a data structure, it is not more about
programming as a binary tree is. So it is about structuring your data to
fit your needs of computation… but that fits so much that is a useless
statement

  1. When implementing something, you will model the data. This can be
    your data model that can be extended into an object model for
    programming purposes. These “models” are better considered “schema”;
    they describe the layout of the data.

What you want to say is, that a schema is no model? Or at last not all
schemata are models. I think… I am not sure yet :wink:

Just because one can create something that works without a
mathematical theory behind it does not mean that one should do so.

or should not do so.

One
certainly shouldn’t claim that the thing without a mathematical theory
behind it is superior to the thing with – because that’s something you
should be able to demonstrate with, well, another theory. Performance
metrics are not evidence of superiority of concept; just of
implementation.

I have never done that. So I guess you don’t mean me, because I am well
aware of the problems of OODBs

And of course you can apply the theories of that area for that part of
the implementation.

Why not consider OODB mathematics as part of graph theory and others?

There are no OODB mathematics, and that’s part of the point that I’ve
been trying to make.

ah, yes, ok.

If you can point to OODB mathematics papers and
theories, I’ll retract or clarify that statement, but I have a
reasonably high level of confidence that object orientation isn’t
expressed in terms of mathematics or theory the way that the relational
model is.

ok, see “A Query Algebra for Object-Oriented Databases (1989)” on
citeseer http://citeseer.ist.psu.edu/shaw89query.html

Found after searching 2 minutes in google. And 1989 isn’t very new. The
papers citing that paper are also quite interesting.

The nice thing in mathematics is, that I can use it to define very much
things… even if they are useless in the end. I guess you should give
more constraints.

Sure, an object store can be set up to allow for smart loading and such,
but that doesn’t mean that it’s a good idea. It might be the “right
now” idea, but it is something you’ll have to pay the piper for using at
some point in the future.

depends on my goals, or not?

bye blackdrag

On 3/29/07, Jochen T. [email protected] wrote:

Austin Z. schrieb:
[…]

Please, please, please read more about relational theory before you
make statements like this, because it’s technical nonsense. There is
no “object model.”
of course there is none as you define it. Who said I am using the same
definition? Is your definition a common definition for “model” in
general? If so please point me to a reference. I don’t know all the
correct UK/US terms used for this.

Like I said, “model” is a vague word. When you say “relational model”,
the meaning is the “Relational Model of Data” (e.g., the theory). At
this point, there’s nothing related for an “Object Model of Data”.

When one says “object model”, one usually means “the hierarchy or
graph of objects that I am using to represent the data and operations
in my implementation.” In relational terms, that is a schema.

So, “relational model” and “object model” are two totally different
things as they are typically understood as one deals with a concept
and the other deals with a single implementation.

That’s an important point, too:
object orientation is about programming. It is not about data and
the storage of data.
I agree partially. It is a data structure, it is not more about
programming as a binary tree is. So it is about structuring your data to
fit your needs of computation… but that fits so much that is a useless
statement

The classic definition of an object is data and the operations that
apply to that data encapsulated in one. I am sure that there are
definitions of OO out there where encapsulation isn’t part of it, but
I consider encapsulation probably the defining feature of OO (even
more than inheritance, because there are strong arguments for
composition instead). That’s a whole different argument, though, and
most OO systems these days accept encapsulation, inheritance,
polymorphism, and (often) access control (information hiding).

  1. When implementing something, you will model the data. This can be
    your data model that can be extended into an object model for
    programming purposes. These “models” are better considered “schema”;
    they describe the layout of the data.
    What you want to say is, that a schema is no model? Or at last not all
    schemata are models. I think… I am not sure yet :wink:

Just the opposite. An object model is closely related to a data model
(or a database schema, if you prefer). There’s no overarching theory
of object modelling (at least not yet, as Ed pointed out), whereas
there is an overarching theory of data and relations.

Just because one can create something that works without a
mathematical theory behind it does not mean that one should do so.
or should not do so.

Fair enough, but if one chooses to step away from something that has
theoretical underpinnings, one should at least be prepared to make a
coherent explanation as to why it’s better. Otherwise, you’re not
doing much better than selling snake oil. I’m sure you’ve seen
programs by vendors that claim to have better-than-AES encryption
available that absolutely no one in the security industry has
reviewed. Why do we as technical people scoff at them yet swallow the
claims of other vendors (like the OODB or “Post-Relational” folks)
without even thinking?

One
certainly shouldn’t claim that the thing without a mathematical theory
behind it is superior to the thing with – because that’s something you
should be able to demonstrate with, well, another theory. Performance
metrics are not evidence of superiority of concept; just of
implementation.
I have never done that. So I guess you don’t mean me, because I am well
aware of the problems of OODBs

I wasn’t referring to you specifically; I was more referring to the
OODB vendors, who have no excuse for their specious claims.

And of course you can apply the theories of that area for that part of
the implementation.
Why not consider OODB mathematics as part of graph theory and others?
There are no OODB mathematics, and that’s part of the point that I’ve
been trying to make.
ah, yes, ok.

If you can point to OODB mathematics papers and
theories, I’ll retract or clarify that statement, but I have a
reasonably high level of confidence that object orientation isn’t
expressed in terms of mathematics or theory the way that the relational
model is.
ok, see “A Query Algebra for Object-Oriented Databases (1989)” on
citeseer http://citeseer.ist.psu.edu/shaw89query.html

I skimmed through this; reading it, it’s an attempt to return some
level of relational algebra to object databases … all the way back
in 1989. Sadly, the authors still think that first normal form is an
unnecessary restriction on the logical formation of the data – and
they have to synthesize first normal form tuples to obtain relational
algebra capabilities in object databases.

I haven’t looked further, but it’s not quite a positive refutation of
my statement.

Sure, an object store can be set up to allow for smart loading and such,
but that doesn’t mean that it’s a good idea. It might be the “right
now” idea, but it is something you’ll have to pay the piper for using at
some point in the future.
depends on my goals, or not?

I’ve said as much. Right now solutions usually meet one’s immediate
goals, but rarely meet long-term goals and often result in increased
costs in the long-term.

-austin

On 3/29/07, M. Edward (Ed) Borasky [email protected] wrote:

Austin Z. wrote:

Please, please, please read more about relational theory before you
make statements like this, because it’s technical nonsense. There is
no “object model.”
Yet. That you know of. Yet. :slight_smile:

Fair enough.

Seriously, the folks in the UK that developed the PI-Calculus have done
some work in computer-science models of objects, but I don’t know enough
about them to know if they’re relevant to this discussion. The one
reference I have is on the edge of my readability scale – if I sat down
with the book and the right programming language, I might be able to
learn it, but there are other things I’m more interested in doing.

Do you have a pointer to an abstract?

-austin

On Fri, Mar 30, 2007 at 05:13:35AM +0900, M. Edward (Ed) Borasky wrote:

with the book and the right programming language, I might be able to
learn it, but there are other things I’m more interested in doing.

Are you referring to Abadi and Cardelli’s object calculi? They don’t
seem any
more related to OODBs than say lambda calculus to the relational model,
but
you can indeed consider them “object models”, that term being as
ambiguous as
it is :slight_smile:

FWIW, A Theory of Objects
http://citeseer.ist.psu.edu/abadi94theory.html

Austin Z. schrieb:

Like I said, “model” is a vague word. When you say “relational model”,
the meaning is the “Relational Model of Data” (e.g., the theory). At
this point, there’s nothing related for an “Object Model of Data”.

but the relational algebra is about queries not data in the first place.

When one says “object model”, one usually means “the hierarchy or
graph of objects that I am using to represent the data and operations
in my implementation.” In relational terms, that is a schema.

the operations are part of the schema?

So, “relational model” and “object model” are two totally different
things as they are typically understood as one deals with a concept
and the other deals with a single implementation.

sorry I don’t agree with you here. not with the word implementation. I
see them as orthogonal.

definitions of OO out there where encapsulation isn’t part of it,
from the view of data the operations are not relevant, or not? I mean
unless you make them part of the algebra… I think I have seen that
somewhere… ah, not sure where, sorry

but
I consider encapsulation probably the defining feature of OO (even
more than inheritance, because there are strong arguments for
composition instead).

encapsulation in terms of grouping data together? hat is not more a
definition as a table is.

That’s a whole different argument, though, and
most OO systems these days accept encapsulation, inheritance,
polymorphism, and (often) access control (information hiding).

right.

there is an overarching theory of data and relations.
data and relations, yes. A theory about data only would be useless, or
not?

Just because one can create something that works without a
mathematical theory behind it does not mean that one should do so.
or should not do so.

Fair enough, but if one chooses to step away from something that has
theoretical underpinnings, one should at least be prepared to make a
coherent explanation as to why it’s better.

coherent? “My tests are showing my application is faster with it” or “I
am faster in prototyping” is for some cases coherent enough.

[…]

OODB vendors, who have no excuse for their specious claims.
and you are not referring to a specific OODB vendor either… just to a
blurred mass of unknown people. Don’t mix the vendor with salesman. Some
are, but not all.

[…]

ok, see “A Query Algebra for Object-Oriented Databases (1989)” on
citeseer http://citeseer.ist.psu.edu/shaw89query.html

I skimmed through this; reading it, it’s an attempt to return some
level of relational algebra to object databases … all the way back
in 1989.

please read it again. there is no such thing as “returning” there is
only a thing of mapping one concept to another. Something like a
morphism.

Sadly, the authors still think that first normal form is an
unnecessary restriction on the logical formation of the data – and
they have to synthesize first normal form tuples to obtain relational
algebra capabilities in object databases.

where?

I have read: "One research direction in the modeling of object-oriented
is the extension of the relational model to build complex types. Early
extensions relaxed the first normal form requirement of the relational
model to allow set valued attributes.

I haven’t looked further, but it’s not quite a positive refutation of
my statement.

you claimed there is no algebra, I proved you wrong. I myself said there
is much space for nonsense and that without constraints there will never
be a “solution”. So either we talk about such constraints or we end the
topic. It makes no use to give more and more new papers just that you
can say that you don’t like the opinion of the author."

I guess you mean a different part?

costs in the long-term.
might be true, but if your boss says that he needs to save money in the
short term it is a different thing. For example for prototypes, for
example for small applications, for example for applications that don’t
share data, for example for applications without the need to do
reporting.

bye blackdrag

Mauricio F. wrote:

Seriously, the folks in the UK that developed the PI-Calculus have done
it is :slight_smile:

FWIW, A Theory of Objects
http://citeseer.ist.psu.edu/abadi94theory.html

I knew someone would send me into the library. :slight_smile:

Sangiorgi and Walker, The Pi-Calculus: A Theory of Mobile Processes,
Part VII (Objects and PI-Calculus)

It’s on my to-read list. Pity the Summer of Code deadline has passed,
eh? :slight_smile:


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On 3/29/07, Jochen T. [email protected] wrote:

Like I said, “model” is a vague word. When you say “relational
model”, the meaning is the “Relational Model of Data” (e.g., the
theory). At this point, there’s nothing related for an “Object Model
of Data”.
but the relational algebra is about queries not data in the first
place.

The Relational Model of Data is about how to organise the data in such a
way that relational algebra is able to work. So your statement isn’t
really correct. Relational algebra doesn’t work without the organisation
of the data into sets of tuples and attributes.

When one says “object model”, one usually means “the hierarchy or
graph of objects that I am using to represent the data and operations
in my implementation.” In relational terms, that is a schema.
the operations are part of the schema?

Are you not understanding what I’m saying? I’m making an analogy here,
not a direct correspondence. What people call an “object model” is
similar to a relational schema. When I do my object models, I start
with how I need to model my data; then and only then do I start
considering my operations. (I will, of course, have considered the
“pipeline” for processing the data related to the purpose of the program
I’m working on.)

So, “relational model” and “object model” are two totally different
things as they are typically understood as one deals with a concept
and the other deals with a single implementation.
sorry I don’t agree with you here. not with the word implementation. I
see them as orthogonal.

They’re not orthogonal, really. A database schema and an object model
are orthogonal, but one deals with a higher level concept than the
other.

unless you make them part of the algebra… I think I have seen that
somewhere… ah, not sure where, sorry

I’d be considered an object apostate by some of the more vehement OOists
out there, mostly because I think that data is far more important than
operations involved and that I consider it a refinement of procedural
programming. Encapsulation is the only thing that seems to be common
among the various OO systems I’ve seen, but I’ve seen C code that I
would consider programmed in an OO-style even though there’s no
encapsulation (as such) in C.

but I consider encapsulation probably the defining feature of OO
(even more than inheritance, because there are strong arguments for
composition instead).
encapsulation in terms of grouping data together? hat is not more a
definition as a table is.

I can’t parse this; encapsulation is, as I understand it, combining data
and operations.

  1. When implementing something, you will model the data. This can
    be your data model that can be extended into an object model for
    programming purposes. These “models” are better considered
    “schema”; they describe the layout of the data.
    What you want to say is, that a schema is no model? Or at last not
    all schemata are models. I think… I am not sure yet :wink:

Not at all. I think I’ve explained it above, but if you still don’t
understand, please ask.

Just the opposite. An object model is closely related to a data model
(or a database schema, if you prefer). There’s no overarching theory
of object modelling (at least not yet, as Ed pointed out), whereas
there is an overarching theory of data and relations.
data and relations, yes. A theory about data only would be useless,
or not?

This is basic relational theory; please read more on it.

Just because one can create something that works without a
mathematical theory behind it does not mean that one should do so.
or should not do so.
Fair enough, but if one chooses to step away from something that has
theoretical underpinnings, one should at least be prepared to make a
coherent explanation as to why it’s better.
coherent? “My tests are showing my application is faster with it” or “I
am faster in prototyping” is for some cases coherent enough.

Not at all. Performance is about implementations, not about concepts.

and you are not referring to a specific OODB vendor either… just to a
blurred mass of unknown people. Don’t mix the vendor with salesman. Some
are, but not all.

OO database vendors as a class make specious claims, usually about
being “post-relational” and not having coherent explanations for why
abandoning first normal form is a good idea. They can’t explain it, so
they have to hype up things to distract others.

[…]

ok, see “A Query Algebra for Object-Oriented Databases (1989)” on
citeseer http://citeseer.ist.psu.edu/shaw89query.html
I skimmed through this; reading it, it’s an attempt to return some
level of relational algebra to object databases … all the way back
in 1989.
please read it again. there is no such thing as “returning” there is
only a thing of mapping one concept to another. Something like a
morphism.

No, it’s “returning.” I read it thoroughly enough to see that they were
trying to add some level of relational algebra back to object
databases because what was happening in object databases was simply not
good enough.

The authors weren’t quite clear enough on the concepts (despite having
clearly read C.J. Date, as referenced in the paper) to admit this,
though.

Sadly, the authors still think that first normal form is an
unnecessary restriction on the logical formation of the data – and
they have to synthesize first normal form tuples to obtain relational
algebra capabilities in object databases.
where?

I have read: "One research direction in the modeling of
object-oriented is the extension of the relational model to build
complex types. Early extensions relaxed the first normal form
requirement of the relational model to allow set valued attributes.

They don’t condemn this; first normal form is something that really
makes a lot of sense in data and object modelling. They have to
synthesize a first-normal form for their relational algebra to even
work!

I haven’t looked further, but it’s not quite a positive refutation of
my statement.
you claimed there is no algebra, I proved you wrong. I myself said
there is much space for nonsense and that without constraints there
will never be a “solution”. So either we talk about such constraints
or we end the topic. It makes no use to give more and more new papers
just that you can say that you don’t like the opinion of the author."

I guess you mean a different part?

They added relational algebra to an object database model by
synthesizing a tuple for relational operations. That’s an utter failure
to provide an object algebra. Read the paper again: they clearly say
they synthesize tuples to layer relational algebra on top of object
databases.

It’s not a matter of disagreeing with the authors, it’s a matter of
recognising that the paper doesn’t really do what you think it does.

for example for small applications, for example for applications that
don’t share data, for example for applications without the need to do
reporting.

All of these will benefit more from relational databases than object
databases. If they’re that small, just use a plain-old object store
(like PStore or Madeleine, if you must); don’t bother with an object
database – because you’ll spend almost as much time in the short term,
and much more time in the long term, with that as you would with a good
ORM and a good SQL database.

-austin

Austin Z. schrieb:

really correct. Relational algebra doesn’t work without the organisation
of the data into sets of tuples and attributes.

very right, it is not only the data, it is its organization and the
relations between them too. Might be that data is king, but only after
it is transformed with respect to the relational model.

When one says “object model”, one usually means “the hierarchy or
graph of objects that I am using to represent the data and operations
in my implementation.” In relational terms, that is a schema.
the operations are part of the schema?

Are you not understanding what I’m saying? I’m making an analogy here,
not a direct correspondence.

then why did you mention the operations at all?

What people call an “object model” is similar to a relational schema.

ah, well I used the term different. I used it in the term of… how
objects are related, behave and what operations can be done with them.

[…]

but I consider encapsulation probably the defining feature of OO
(even more than inheritance, because there are strong arguments for
composition instead).
encapsulation in terms of grouping data together? hat is not more a
definition as a table is.

I can’t parse this; encapsulation is, as I understand it, combining data
and operations.

that’s how OO defines encapsulation, that is not how encapsulation
defines OO. At last that is my view on this.

[…]

Just the opposite. An object model is closely related to a data model
(or a database schema, if you prefer). There’s no overarching theory
of object modelling (at least not yet, as Ed pointed out), whereas
there is an overarching theory of data and relations.
data and relations, yes. A theory about data only would be useless,
or not?

This is basic relational theory; please read more on it.

that misses the point. I wanted to say, if you look at the OO world
without the same relations you use in the relational world, then what is
it worth? I mean if you take an object and rip off the methods, what is
left then? A mere data holder, a abstract type. Or not?

Just because one can create something that works without a
mathematical theory behind it does not mean that one should do so.
or should not do so.
Fair enough, but if one chooses to step away from something that has
theoretical underpinnings, one should at least be prepared to make a
coherent explanation as to why it’s better.
coherent? “My tests are showing my application is faster with it” or “I
am faster in prototyping” is for some cases coherent enough.

Not at all. Performance is about implementations, not about concepts.

If something proves to be better for a certain situation in a pragmatic
way, then I should really consider to use that.

[…]

OO database vendors as a class make specious claims,

“as a class”… a class without instances? A singleton then maybe.
Maybe even a non existing. Sorry, I am no friend of putting a vague
group people together and claiming that they are doing something bad.

[…]

ok, see “A Query Algebra for Object-Oriented Databases (1989)” on
citeseer http://citeseer.ist.psu.edu/shaw89query.html
I skimmed through this; reading it, it’s an attempt to return some
level of relational algebra to object databases … all the way back
in 1989.
please read it again. there is no such thing as “returning” there is
only a thing of mapping one concept to another. Something like a
morphism.

No, it’s “returning.”

that’s no base for discussion. returning or not does not matter.

I read it thoroughly enough to see that they were
trying to add some level of relational algebra back to object
databases because what was happening in object databases was simply not
good enough.

your view.

The authors weren’t quite clear enough on the concepts (despite having
clearly read C.J. Date, as referenced in the paper) to admit this,
though.

what concepts? You are not very clear yourself. Basically you are saying
they have not understood the relational model and OO altogether. I guess
they are also of your class of OO database vendors.

They don’t condemn this; first normal form is something that really
makes a lot of sense in data and object modelling. They have to
synthesize a first-normal form for their relational algebra to even
work!

extend is not really synthesize. And what exactly is so bad about that?
It is a common thing in mathematics.

They added relational algebra to an object database model by
synthesizing a tuple for relational operations. That’s an utter failure
to provide an object algebra.

why? A detailed explanation please.

Read the paper again: they clearly say
they synthesize tuples to layer relational algebra on top of object
databases.

It’s not a matter of disagreeing with the authors, it’s a matter of
recognising that the paper doesn’t really do what you think it does.

and what do you think that I think it does? That I can’t use the
relational algebra as it is for an object algebra was clear from the
beginning. But that is not important here. The important thing is how a
modification I make affects the system as a whole. If it does not
violate other mathematic axioms then it is normally a valid model.

for example for small applications, for example for applications that
don’t share data, for example for applications without the need to do
reporting.

All of these will benefit more from relational databases than object
databases.

In what way? Don’t come with “in the long term”, mantras don’t make up
for reasons.

If they’re that small, just use a plain-old object store
(like PStore or Madeleine, if you must);

small in lines of code possibly yes, that does not mean it does not have
to query or has to handle data bigger than the available memory

don’t bother with an object database

what bother? Depends on the database, or not?

– because you’ll spend almost as much time in the short term,
and much more time in the long term, with that as you would with a good
ORM and a good SQL database.

at the moment I can’t say that this is true. Maybe the solutions of ORM
are quite good, but if you take a look in the Java world… I really
prefer db4o over Hibernate+HSQLDB or even postgres/mysql/oracle/xy if my
application is “small”.

bye blackdrag

Jochen T. [email protected] writes:

as with normal tables.
The point is not that a view simplifies a query over a given inheritance
relation, a view is the table model implementation of ER-inheritance.

In general - and I have sometimes learned it the hard way - you have to
be very careful about what model one is talking: usually the highest
level is the ER model which will be implemented as a relational model
that will be (or can be) normalised and at last this relational model
will be implemented as a table model.

As Austin already has mentioned, object modeling can be seen as a
special form of ER modeling - which explains the plethora of
dysfunctional and outright ugly object hierarchies one encounters in
software engineering because those people do not understand the
fundamental mathematics.

I don’t agree with austin and the resulting ugly class hierarchy is
prove enough for me. Not in all cases of course :wink:

Ah, I think I have been misunderstood: ugly object models are mostly
produced by »software engineers« who have no knowledge about the
fundamentals of ER modeling.

Why not consider OODB mathematics as part of graph theory and others?

There is no such thing as OODB mathematics in a usable, formal sense.

Bye!

Sebastian

Sebastian Hanigk schrieb:
[…]

fundamentals of ER modeling.
ER modeling is good when you want to store your objects in a database in
the end, but that’s all. Nearly any other more formal design method is
as good as ER.

Why not consider OODB mathematics as part of graph theory and others?

There is no such thing as OODB mathematics in a usable, formal sense.

If I extend the relational algebra for the OO world and if I define all
the basic functions the relational algebra does have, then I get a
usable and formal expression. But not all that is usable for a
mathematician is usable for real life.

bye blackdrag

Austin Z. wrote:

some work in computer-science models of objects, but I don’t know enough
about them to know if they’re relevant to this discussion. The one
reference I have is on the edge of my readability scale – if I sat down
with the book and the right programming language, I might be able to
learn it, but there are other things I’m more interested in doing.

Do you have a pointer to an abstract?

-austin
Sangiorgi and Walker, The Pi-Calculus: A Theory of Mobile Processes,
Part VII (Objects and PI-Calculus)

This is a book … a big book with lots of abstract computer science in
it. The stuff I read for relaxation, because, well, mysteries and
Westerns bore me. :slight_smile:


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

“Austin Z.” [email protected] writes:

They don’t condemn this; first normal form is something that really
makes a lot of sense in data and object modelling. They have to
synthesize a first-normal form for their relational algebra to even
work!

Interestingly, it can be shown that the Relational Model still is
perfectly sound even if you remove the first normal-form (as opposed
to all higher normal forms).

All of these will benefit more from relational databases than object
databases. If they’re that small, just use a plain-old object store
(like PStore or Madeleine, if you must); don’t bother with an object
database – because you’ll spend almost as much time in the short term,
and much more time in the long term, with that as you would with a good
ORM and a good SQL database.

The real problem IMO is not that we need a “OODB” or an object
calculus (which would not be very hard to construct, there are lots of
them out there; but they are hardly useful for expressing database
operations). It’s clear to me that a good datastore will be based on
the relational model.

The real problem is it’s implementation at the moment, which
constrains the developers a lot. I argue that the following features
would take a big deal of the pain usually connected with ORM without
changing the validity of the Relational Model.

  • Dynamically, strongly typed values. (Types can be enforced (or even
    ducktyped!) by help of constraints.)

  • Dynamically defined relvars.

  • Dynamic fields. (This is, in the end, dynamic relvars and DKNF).

The problem is not the Relational Model, but the current
implementations of it: they live in a world that’s very different from
the one of a Ruby program. Still, I argue that all three above
features are consistent with the Relational Model.

That said, I honestly have no idea how to implement all this
efficiently. :frowning:

On 3/29/07, [email protected] [email protected] wrote:

[1] I’d love it if there were knowledge consultants in the world. Just
like I can go to a shop and have someone assist me in buying clothes,
I’d like to be able to go to someone and say “I’d like to know about x”,
and they would say “ah perhaps you’d like this, this and this, then”,
and I’d say “yes, those sound good, but this isn’t quite right”, etc. x
could be music, or part of biology, or international relations. And then
I could just drink things up and appreciate everything out there that
interests me.

They exists, though they have a different title: Librarians.

And yes, I’m fairly much serious.

Eivind.

Christian N. wrote:

Interestingly, it can be shown that the Relational Model still is
perfectly sound even if you remove the first normal-form (as opposed
to all higher normal forms).

Yes. You just allow relation-valued attributes, and un/nest operators,
and you can easily define !1NF SQL. I have a paper somewhere which
studies this, and I believe it worked quite well. It also happens not
to break relational algebra or calculus at all. But that’s not the
problem that needs solving, in fact it makes it slightly worse.

The real problem IMO is not that we need a “OODB”…
but they are hardly useful for expressing database
operations). It’s clear to me that a good datastore will be based on
the relational model.
The real problem is its implementation at the moment, which
constrains the developers a lot.

Yes. Relations are the right way to store data, objects are the
right way to manipulate them, but facts are the right way to conceive
of them, and hence to query them. Both ER and OO schemata are
absorptions
of fact-based schemata to suit the physical characteristics of disk
storage and RAM storage/allocation respectively. IOW they’re both
derived, to some extent contrived, for different purposes. Neither
can ever be the “one true way”.

I argue that the following features
would take a big deal of the pain usually connected with ORM without
changing the validity of the Relational Model.

  • Dynamically, strongly typed values. (Types can be enforced (or even
    ducktyped!) by help of constraints.)
  • Dynamically defined relvars.
  • Dynamic fields. (This is, in the end, dynamic relvars and DKNF).

What you are describing is a conceptual query language. Look at
ConQuer - not a lot of information about it is available, and
Microsoft owns (but appears not to be progressing) the only
implementation.

The problem is not the Relational Model, but the current
implementations of it: they live in a world that’s very different from
the one of a Ruby program. Still, I argue that all three above
features are consistent with the Relational Model.

Any absorption (clumping) of a fact-based schema obfuscates the
original intent. Each of the common types of absorption (ER and OO)
has its advocates, as we’ve seen in this thread. Can you please both
stop throwing rocks at each other and figure out how to get the best
of both worlds?

That said, I honestly have no idea how to implement all this
efficiently. :frowning:

I do, and I’m working on it. Anyone want to help? Or are you happy
just throwing rocks?

Clifford H…