Database Models: Hierarchical and Network Structures
Logical Design in Database Management
The goal of logical design is to translate the conceptual design, which represents the requirements, into a logical design that can be implemented on a Database Management System (DBMS).
There are several representations for the logical model of a database, including:
- Hierarchical model
- Network model
- Relational model
- Object-oriented model
Hierarchical Models
Hierarchical models and the concept of databases were developed between 1960 and 1970. An example of a hierarchical database is IBM’s IMS, developed in the late 1960s. This model introduced concepts like data independence and security. In 1975, the ANSI/SPARC committee was created and worked on defining a three-level DBMS architecture. Until 1980, advanced hierarchical and network systems were developed.
In the hierarchical model, elements have a parent/child relationship where a child has only one parent, while a parent may have several children. This model represents a set of associations among entities in a 1:1 and 1:M fashion, forming a hierarchy of entities (or a tree). In this hierarchy, a parent (owner record, one) can have many children (many subordinate records), but a child may have only one parent.
The tree that forms can have multiple levels, meaning that a child at a certain level can, in turn, be a parent to other children at a lower level. However, at all levels, each parent may have several children, but each child can have only one parent.
All data relationships are based on hierarchies. Files are connected by physical pointers (indicating the physical address where a record can be found on the disk) or fields added to individual records. Hierarchical organizations make it difficult to express relationships in which a child deals with many parents. It is, however, easy to implement, change, and maintain the database.
A major constraint of this model is the existence of a single parent for each entity. Another limitation is that not all relationships can be represented in a hierarchical structure. Attempts were made to develop network database systems to solve these issues.
Network Models
This model represents data as a set of record types and associations between them. It uses a graph data structure, so that a record type can have many associations with other types of records in a 1:1, 1:M, and M:N fashion. It is more flexible than the hierarchical model and is an extension of it, in which a child can have more than one parent. This model is less restrictive than the hierarchical one, and database systems also use physical pointers.
The disadvantage is that in this type of data model, the structure begins to take on the appearance of a “spider web,” with pointers going in all directions. In the early 1970s, several network DBMS data models were developed and marketed. The network data model was standardized as the CODASYL model. Examples of network databases are: ADABAS, TOTAL, and IMAGE.
In the network model, M:N relationships can be represented. This requires transforming them into two associations linked through an intersection record type called a link. This eliminates the redundancy problems generated in the hierarchical model. Inserting, deleting, and modifying the database, as raised in the hierarchical model, is greatly simplified. Care must be taken when deleting records involved in M:N associations, as it is possible to create inconsistencies if the link records involved are not deleted.