Re: Relations contain Objects

From: James <jraustin1_at_hotmail.com>
Date: 14 Jun 2002 20:52:18 -0700
Message-ID: <a6e74506.0206141952.1ad530c7_at_posting.google.com>


> > > Silly, you already know that objects equals domains.
> >
> > An object isn't equivalent to the domain or range.
> > An object is equivalent to an element in either domain or range.
>
> Object class equals domain.
> Object value equals element in domain.

I think part of the problem is that our words have different meanings:

Assuming
Domain = {M1, M2}
Range = {Marble}

then in XDb and in my terminology
Marble, M1, M2 are objects with their data set to "Marble", "M1" and "M2"
In this relation, Marble is the class of M1 and M2. In XDb, M1 and M2 have the capacity to become classes themselve by intantiating M1a and M2a. How does this synch with your interpretation?
Where is the "type" you are referring to in the scenario?

> > > Unfortunately, that does not resemble a relational definition of the
> term.
> >
> > Although my definition was rather simple it does state the essense of
> > what a relation is: a set of related things.
>
> Unfortunately, it oversimplifies.

I now agree, that definition was too simple.

> > > Specifically, a relation has a header consisting of a set of N named,
> typed
> > > attributes and a body consisting of a set of N-dimensional tuples with a
> > > value corresponding to each of the named, typed attributes.
> >
> > Let N = 1
>
> If I have a relation variable of 1 dimension, I can quickly and easily
> derive a 2 dimensional relation using cartesion product.
> What is your product's equivalent operation?

XDb also implements a 2-dimensional relation but it is extremely flexible.

For example:

In rdbs, T_Person would be limited to a rectangular format: ID First Last
1 John Smith
2 Mary Brown

In XDb, allows tree structures:
  1
    .First = John
    .Last = Smith
  2
    .First = Mary
    .Last = Brown
  3

    .First = Joe
    .Last = Petzold
    .FavoriteColors
       ->Red
       ->Green
       ->Blue
    Airplane
      FirstClass
        Passengers
          4
            .First = Martha
            .Last = Stewart
          5
            .First = Elvis
            .Last = Presly
            .Age
                ->160
                   .uom = yr

What would a 3 or 4 dimensional relation represent? Space and Time?

> > Although each element has a type, there is no need to consider it at
> > the logical level. Is there?
>
> Type is logically very important!

What is your definition of a type? It important for what reason? In XDb, each element in both domain and range is equivalent to an object with corresponding data. Each object can hold data of various data types.
I think the type you are referring to equals an object's class in XDb.

> > > They are the same as mathematical relations.
> > > Each of the values in every tuple is an object in an OO sense.

In XDb, one tuple is not equal to one object. In XDb, each value in a tuple is an object with corresponding data!!!

For example:

T_Person
ID First last
1 John Smith

In XDb,
1 is an object with the data 1.
John is an object with the data "John".
Simith is an object with the data "Smith".

> > Although a tuple has a type, is there is no need to consider it at the
> > logical level?
>
> Type is logically very important! For instance, two values of different type
> cannot be equal and equality is an important logical concept.

Can you define a type precisely? Received on Sat Jun 15 2002 - 05:52:18 CEST

Original text of this message