Chapter 1. Overview

Table of Contents
Representing data objects with Ada95
Relations between objects
Limitations

This directory contains a small technology domonstration for the following technical issues:

The data model used for the demonstration is quite simple. Each person identified by its name. Assigned to each person there are upto N accounts assgined. Each account includes a balance. Each person may be included into multiple groups, e.g. family group. A group again may be associated with accounts.

Datamodel of the demonstration

This demonstration addresses large information systems which are running algorithms on large databases on a datamodel similar to the one presented here. For such kind of systems the following issues have to be understood:

The expectation for data storage/retrieval system is that the data is always available for read/update/write. From a high level view there are instances to be stored and each instance has attributes, decribing the visible contents of an instance.

Retrival is done by queries which are based on the values of the attrbiutes and which may return sets of instances.

In the example presented here there are three clients which are intended to represent the typical access patterns to the underlying database.

Representing data objects with Ada95

Each object of the data model is represented by data type which is derived from the type Persistent.Object which implements the basic functionality to serialize/deserialize the data instance into a blob which is stored in a database record. In order to retrieve such an instance a so called object id is used as a retieval key. The key is defined when the objects is instanciated, e.g. in the example below:

Example 1-1. Life cycle of an persistent object

   procedure Demo is
   ...
      Father  : Person.Object;

   begin
      Get_Object( Father, ID => 12 );
      
      Father.Age := .... ;

      Put_Object( Father );
   end Demo;
   

The example above shows the lifecycle of an persistent object. During declaration of the object the object identifier 1 is assgined to the instance. The method Get_Object is used retrieve the latest version of the object from the data base. Put_Object writes back a new version of the instance Father. Between Get_Object and Put_Object any modification may be done to the object by means of Ada 95 constructs.

The objects package provides an versioning concept, which means after creating the first instance the operation Put_Object may create a new version of the instance in the database.