3.5.1.6 Data Representation

For internal data representation of inheritance two approaches are possible: In the first approach the whole base section and its hierarchy is copied to its derived section. New items are appended and existing items are modified overwriting the copied ones. At any time for each item a corresponding data representation exists. This approach is called static approach. The second approach is that data is not copied and only the inheritance is registered. Therefore, not the whole hierarchy is copied but only new and locally modified items are stored. This approach is called dynamic approach.

The advantage of the static approach is the simplicity of data storage. Finding an arbitrary item is very easy and fast. On the other hand, the same information has to be stored several times when items are inherited to sections, thus consuming memory. Furthermore, this approach is not suitable when a base section gets changed. For instance, when an item in the base section is deleted it has to be deleted in all sections inherited from it but only in case it has not been locally modified in this section. So after each modification the database has to check the consistency of its data. Thus, an inherited section has to know all its parents and each section must know all its successors.

The advantage of the dynamic approach is its self-consistency. Modifications of items become automatically visible in the derived sections too. For instance, if an item is deleted in a base section, no corrections have to be done. The disadvantage is that finding of items is more complex and more time consuming since the items may be stored in one of the base sections. For the Input Deck database the dynamic approach has been chosen since it is more flexible.

Robert Klima 2003-02-06