A hierarchical model represents the data in a tree-like structure in which there is a single parent for each record. To maintain order there is a sort field that keeps sibling nodes into a recorded manner. These types of models are designed basically for the early mainframe database management systems, like the Information Management System (IMS) by IBM.
This model structure allows the one-to-one and a one-to-many relationship between two/more types of data. This structure is very helpful in describing many relationships in the real world; table of contents, any nested and sorted information.
The hierarchical structure is used as the physical order of records in storage. One can access the records by navigating down through the data structure using pointers which are combined with sequential accessing. Therefore, the hierarchical structure is not suitable for certain database operations when a full path is not also included for each record.
Data in this type of database is structured hierarchically and is typically developed as an inverted tree. The "root" in the structure is a single table in the database and other tables act as the branches flowing from the root. The diagram below shows a typical hierarchical database structure.
A relationship in this database model is represented by the term parent/child. A parent table can be linked with one or more child tables in this type of relationship, but a single child table can be linked with only one parent table. The tables are explicitly linked via a pointer/index or by the physical arrangement of the records within the tables.
A user can access the data by starting at the root table and working down through the tree to the target data. the user must be familiar with the structure of the database to access the data without any complexity.
The IBM Information Management System (IMS) and the RDM Mobile are examples of a hierarchical database system with multiple hierarchies over the same data.
Advantages
Let's discuss some advantages of Hierarchical DBMS
- A user can retrieve data very quickly due to the presence of explicit links between the table structures.
- The referential integrity is built-in and automatically enforced due to which a record in a child table must be linked to an existing record in a parent table, along with that if a record deleted in the parent table then that will cause all associated records in the child table to be deleted as well.
Disadvantages
Let's discuss some disadvantages of Hierarchical DBMS
- When a user needs to store a record in a child table that is currently unrelated to any record in a parent table, it gets difficulty in recording and the user must record an additional entry in the parent table.
- This type of database cannot support complex relationships, and there is also a problem of redundancy, which can result in producing inaccurate information due to the inconsistent recording of data at various sites.
The network model is the extension of the hierarchical structure because it allows many-to-many relationships to be managed in a tree-like structure that allows multiple parents.
In other words, Network databases are hierarchical databases but unlike hierarchical databases where one node can have one parent only, a network node can have a relationship with multiple entities. A network database looks more like a cobweb or interconnected network of records.
In network databases, children are called members and parents are called occupiers. The difference between each child or member can have more than one parent.
There are two fundamental concepts of a network model:
- Records contain fields that need hierarchical organization.
- Sets are used to define one-to-many relationships between records that contain one owner, many members.
A record may act like an owner in any number of sets, and a member in any number of sets.
History of Network Model
The network database structure was invented by Charles Bachman. Some of the popular network databases are the Integrated Data Store (IDS), IDMS (Integrated Database Management System), Raima Database Manager, TurboIMAGE, and Univac DMS-1100.
Advantages
Let's discuss some advantages of Network DBMS
- Fast data access
- It also allows users to create queries that are more complex than those they created using a hierarchical database. So, a variety of queries can be run over this model.
Disadvantages
Let's discuss some disadvantages of Network DBMS
- A user must be very familiar with the structure of the database to work through the set structures.
- Updating inside this database is a tedious task. One cannot change a set structure without affecting the application programs that use this structure to navigate through the data. If you change a set structure, you must also modify all references made from within the application program to that structure.
Relational DBMS
RDBMS stands for Relational Database Management Systems.
All modern database management systems like SQL, MS SQL Server, IBM DB2, ORACLE, My-SQL, and Microsoft Access are based on RDBMS.
It is called Relational Database Management System (RDBMS) because it is based on the relational model introduced by E.F. Codd.
Standard relational databases enable users to manage predefined data relationships across multiple databases.
Popular examples of relational databases include Microsoft SQL Server, Oracle Database, MySQL, and IBM DB2.
Relational databases work on each table has a key field that uniquely indicates each row, and that these key fields can be used to connect one table of data to another.
The relational database has two major reasons
- Relational databases can be used with little or no training.
- Database entries can be modified without specifying the entire body.
Advantages
Let's discuss some advantages of Relational DBMS
- Simplicity
- Ease of Data Retrieval
- Data Integrity
- Flexibility
Disadvantages
Let's discuss some disadvantages of Relational DBMS
- They tend to be slow and not scalable. If you have more servers you can’t always do more work with them.
- They have a fixed schema which is a plus unless this hurts productivity too much.
- Tables don’t always map to objects in applications very well.
- They are not secure enough to expose to the internet and need a layer to be added to protect them.
- They are not good at modelling certain kinds of data such as graphs and geo-spatial queries.
- They are not at storing very large records.
Object-Oriented Model
An object-oriented database management system (OODBMS) is a database management system that supports the creation and modelling of data as objects. OODBMS also includes support for classes of objects and the inheritance of class properties and incorporates methods, subclasses, and objects. Most of the object databases also offer some kind of query language, permitting objects to be found through a declarative programming approach.
Also called an object database management system (ODMS).
In other words, An object-oriented database management system represents information in the form of objects as used in object-oriented programming. OODBMS allows object-oriented programmers to develop products, store them as objects and replicate or modify existing objects to produce new ones within OODBMS. OODBMS allows programmers to enjoy the consistency that comes with one programming environment because the database is integrated with the programming language and uses the same representation model.
Object-oriented databases use small, recyclable separated from software called objects. The objects themselves are stored in the object-oriented database. Each object contains two elements:
- Piece of data (e.g., sound, video, text, or graphics)
- Instructions, or software programs called methods, for what to do with the data
Object-oriented database management systems (OODBMs) were created in the early 1980s. Some OODBMs were designed to work with OOP languages such as Delphi, Ruby, C++, Java, and Python.
Some POPULAR EXAMPLES of OODBMs are TORNADO, Gemstone, ObjectStore, GBase, VBase, InterSystems Cache, Versant Object Database, ODABA, ZODB, Poet. JADE, and Informix.
Advantages of Object-Oriented databases
Let's discuss some advantages of Object-Oriented DBMS
- Enriched modelling capabilities
- Extensibility
- Capable of handling a large variety of data types
- Capable of handling a large variety of data types
- Support for schema evolution
- Improved performance
The disadvantages of Object-oriented databases
Let's discuss some disadvantages of Object-Oriented DBMS
- An object-oriented database is more expensive to develop
- Most organizations are unwilling to abandon and convert from those databases
Conclusion
In the above article, we studied databases, types of databases, advantages, and disadvantages of each type of database, history, and timeline of databases.