Definition “Hierarchical database” What is a hierarchical database?
Hierarchically structured information is found practically everywhere in everyday life. Hierarchical databases are a concept that can display this information together with its structuring in a computer system.
As the name suggests, the hierarchical database is structured in a ranking order.
The hierarchical database is one of the oldest database models in the world. The model is able to map real hierarchies in the computer system in a hierarchical tree structure. In this way, an attempt is made to firmly map the real relationships between the information.
The hierarchical database model emerged in the 1960s to 1970s and was, among other things, the basis from which net-like databases developed. Today, the model is used quite rarely.
Advantages of hierarchical databases
Hierarchical databases are well suited for data that not only exists in a hierarchical structure, but is also used almost exclusively in this form. In other words, if the leaves and child nodes of the tree are rarely or never specifically filtered, but the use case provides a path from the root to the leaf, a hierarchical database can be very efficient.
Such structured data allows fast access even with large amounts of data. A further advantage results from the strict formal requirements of the database model. For example, it is not possible to insert information without formally correct relationships. Among other things, this can help to maintain data integrity.
Disadvantages of hierarchical databases
- Dealing with hierarchical data requires that you know the structures exactly. With extensive structures, this can mean that the interwoven relations of the hierarchical database can only be understood by newcomers with a lot of effort and time. Rough specialist knowledge of the subject matter depicted is often absolutely necessary.
- Everyday handling of the database can be inconvenient for developers compared to more modern technologies. The access to the data is always via the root of the respective structure and thus becomes cumbersome.
- All relations must be defined exactly and unambiguously in a system based on hierarchies.
- Each set has a fixed number of relationships. For example, a node or leaf always has exactly one predecessor. This limits the possibilities of data modeling.
- Changes to the structure are hardly practical and only possible with very high effort; in the worst case, the entire structure of the database would have to be changed.
Hierarchical databases in practice
Hierarchical data still plays an important role. After all, in reality, such structures occur on a daily basis, which it is necessary to depict in software. Today, however, hierarchical databases are rarely found in practical use. Classic hierarchical databases are often only found in legacy systems. An example of such a database technology is IMS DB from IBM.
A far more common example of hierarchical data storage is XML. The format was first published in 1998 and is still in use today for a wide variety of purposes. However, in many scenarios, attempts are now being made, if possible, to replace the rigid technology with more modern, more flexible options. This makes it easier for developers to handle the data.
One advantage of XML is that the format is readable by both machines and humans. Another advantage is the uncomplicated storage as a text file. There are many possible applications where these factors are still desirable.