next up previous
Next: Persistent C++ Systems Up: Persistent Programming Languages Previous: Object Identity and Pointers

Storage and Access of Persistent Objects

  1. How are objects stored in a database?

    Code (that implements methods) should be stored in the database as part of the schema, along with type definitions, but many implementations store them outside of the database, to avoid having to integrate system software such as compilers with the database system.

    Data: stored individually for each object.

  2. How to find the objects?
    1. Give names to objects like we give names to files: works only for small sets of objects.
    2. Expose object identifiers or persistent pointers to the objects:
    3. Store the collections of object and allow programs to iterate over the collections to find required objects. The collections can be modeled as objects of a collection type. A special case of a collection is a class extent, which is a collection of all objects belonging to the class.
    Most OODB systems support all three ways of accessing persistent objects. All objects have object identifiers. Names are typically given only to class extents and other collection objects, and perhaps to other selected objects, but most objects are not given names. Class extents are usually maintained for all classed that can have persistent objects, but in many implementations, they contain only persistent objects of the class.

  figure287
Figure 8.7:   Example of ODMG C++ Object Definition Language



Osmar Zaiane
Mon Jun 29 17:30:13 PDT 1998