Handout 15

Network and Hierarchical Database Models*


What is the scheme of a DBTG Model?

The DBTG model uses the standard three-level database architecture. The external level is specified in the subschema, a description written in the subschema data description language (subschema DDL). The conceptual level is specified in the schema, whose description is written in the schema data description language (schema DDL). The data storage language (DSDL) specifies the internal model and physical details of storage. The figure below gives the architecture of a DBTG database system. The User Work Area (UWA) that appears at the top level is a buffer through which the programmer or user communicates with the database.

Describe the Network Model Structure?

The network model uses the network or plex structure as its basic data structure. A network is a directed graph consisting of nodes connected by links or directed arcs. The nodes correspond to record types and the links to pointers. The DBTG network model uses records to represent entities and links or pointers between records to represent relationships. Only binary one-to-one or one-to-many relationships can be represented directly by links. The dependent node, called a child or member, may have more than one parent or owner node.

What are data aggregates and give the two different types aggregations of elementary data items?

A record may consists of elementary data items, which are single-valued fields, and/or data aggregates, which are named groups of elementary data items. There are two special types of data aggregates: vector data aggregates, which are composed of several related elementary data items all of the same type and referenced by a common name, and repeating group data aggregates, which are named groups of related data items that may be of different types.

Bachman Diagram


Give Bachman Diagrams for each of the given E-R Diagrams?


Describe the Hierarchical database model?

In the hierarchical database model, a database consists of a collection of occurrences of a single type of tree. The tree need not be either binary or balanced. In this model, each named node or segment contains one or mode named fields or data items that represent attributes describing an entity. The entire tree may be a description of a single entity, or different segments within a tree may be used to represent different, but related, entities.

Explain the Hierarchical Sequence (Preorder traversal)?

A tree can be represented in a flat or tape-like form by showing dependent node data after the parent node data. The method used for visiting all nodes of the tree is called the preorder traversal which can be summarized by the following rules, starting with the root:

  1. Visit the node if it has not already been visited,
  2. Else visit the leftmost child that has not been already been visited;
  3. Else, if no descendants remain to be visited, return to the parent node and repeat this procedure on it.

Thus we start at the root and traverse its subtrees from left to right, recursively. Starting at the root, we visit the leftmost child, then its leftmost child, and continue in this fashion until we reach a leaf on the leftmost branch. We then move up one level to that leaf's parent, and from there proceed to its leftmost unvisited child. We continue until we have visited every node. When we visit a node for the first time, we print its name.

Given the ER Diagrams produce the hierarchical model?


* portions from here and here.