The Mathematical Foundation of OODBs (XDb)

From: James <jraustin1_at_hotmail.com>
Date: 9 Jun 2002 16:20:16 -0700
Message-ID: <a6e74506.0206091520.53a1e416_at_posting.google.com>



If a RDB can be defined as follows:

A RDB represents data as values in relations. A relation is approximately equivalent to the mathematical concept of relation. 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 where each tuple dimension value corresponds to the appropriate named, typed attribute.

One can represent a relation as a table of values where each row corresponds to a tuple, each column corresponds to a named attribute and each cell contains some value stored in the relation.

For example

Relation: Person
  Id Name Age

  • ---- --- 1 John 32 2 Mary 22

Then an OODB can be "ROUGHLY" defined as follows:



An OODB represents data as values in single-column relations. A single-column relation is approximately equivalent to the mathematical concept of relation. A single-column relation has a header consisting of ONE named, VARIANT type attribute and a body consisting of a set of tuples where each tuple's value corresponds to the named, variant type attribute.

One can represent a single-column relation as a single column of values where each row corresponds to a tuple, the column corresponds to the named attribute
and each cell contains some value stored in the relation.

For example, data viewed in XDb's Class/Instance Hierarchy (www.xdb1.com/Basics/ObjHierarchy.asp) appears as below:

Relation: Person
  1
  2

Relation: Name
  John
  Mary

Relation: Age
  32
  22

The same data viewed in XDb's Parent/Child Hierarchy appears as shown below:

Person[id=1]
.Name=John
.Age=32

Person[id=2]
.Name=Mary
.Age=22

An OODB can be defined more precisely as follows:



OODB represents data as instances of classes. Each instance can store a value of variant type. Class and instances are approximately equivalent to the mathematical concept of single-column relation.

But unlike RDB where each tuple in the relation is typically a simple value,
in OODB each instance is actually an object which allows it to have its own instances.

For example:

  Person
    John
    Mary
    Doctor

      Jim
      Jerry

  Age
    22
    32

Or more generically, where [] indicates objects class:  

Root
  Obj1 [Root]
    Inst11 [Obj1]
    Inst12 [Obj1]
  Obj2 [Root]
    Inst21 [Obj2]
    Inst22 [Obj2]
  Obj3 [Root]
    Inst31 [Obj3]
    Inst32 [Obj3]



Summary:
Pure OODB and RDB are fundamentally based on the same mathematical concept of relations. In RDB, it is relation/values.
In OODB, the equivalent is class/instances.

In RDBs, the relation (box) and values (marbles) are of different type.
The box and the marbles it holds are of different type. It isn't practical for a marble to act as box, although it is not impossible.

In OODBs, the class (obj) and its instances (obj) are of the same type.
Both are objects.
This orthogonality allows an instance to have its own instances and so on.

Orthogonality makes it is possible to create algorithms that are more generic and more resilient to schema-evolutions.

Put simply:
1. Pure OODBs are based on the same mathematical foundation as RDBs. 2. Pure OODBs are more orthogonal then RDBs.

For further details see www.xdb1.com


Received on Mon Jun 10 2002 - 01:20:16 CEST

Original text of this message