Definition “Object database” What is an object-oriented database?
An object-oriented database manages data in the form of objects. In this way, related information is grouped in a logically encapsulated manner already when it is stored in the database.
The entities of an object database can be stored including their attributes, methods, relationships to other objects and information about inheritance.
(Picture: canjoena – stock.adobe.com)
The object-oriented database or object database is a concept that is based on the programming paradigm of object-oriented programming and, more generally, on the principle of object orientation. Object orientation breaks down complex facts into individual objects and their interaction. An object is a concrete instance of an abstract template (class).
The first object-oriented database models emerged in the 1980s and followed the trend towards object-oriented programming languages such as C++. Although they offer many useful aspects, object databases are rarely used – especially in comparison with the much more widespread technology of relational databases.
Relational Database vs. Object-oriented database
Relational databases are part of everyday life for most developers. Here, information is roughly grouped, for example, by categories. Tables are then created from these categories. A table contains row by row all records that can be assigned to the corresponding category, e.g. all customers, all orders or all products.
The tables can be linked to each other, e.g. by each order containing references to the ordering customer and to the ordered products. In this way, the complex interaction of the individual data sets can be mapped. If a programmer wants to store the objects from his program in this kind of database, he has to take an intermediate step.
The information from the software must be broken down for the respective database schema. This is called object-relational mapping or object-relational mapping (ORM). Conversely, when the information is retrieved from the database, it must also be broken down to the structures present in the program code so that they can be used correctly.
The object database, on the other hand, is explicitly designed so that developers can map the relationships from their software bundled in the database. An object can be saved with all relevant attributes. This means that all information is immediately available and does not have to be reconstructed from various tables.
A major difference is that object-oriented databases can store not only attributes, but also methods, relationships between objects and information about inheritance. Each individual object is stored with its own unique ID. If the object is retrieved from the object database via this ID, all attributes, methods, relationships and information about higher-level classes are immediately available.
Advantages of object-oriented databases
The great advantage of object databases is that they can store and reproduce even highly complex facts quickly and cleanly in an encapsulated form. Information does not have to be restructured according to a given database schema (e.g. in tables), but can be used in the same way as it occurs in the program code.
In addition, object-oriented databases use the same principles that developers already know from object-oriented programming languages, making them ideal for joint use.
Disadvantages of object-oriented databases
Object databases are not particularly widespread, although the technology was developed back in the eighties. As a result, there are few database management systems for object databases, while there are many options, especially for relational databases. The community around object-oriented databases is also relatively small.
On the one hand, this means that it is not always so easy to find hints for solving questions and problems. On the other hand, there is less interest and manpower overall to advance the development of the database model in the speed and direction(s) that would be attractive for modern scenarios.
In addition, in certain situations, the performance of the database may be comparatively weak. This can happen, for example, when less complex queries collide with the highly complex structures of the object database. If speed plays a major role and at the same time simple queries often have to take place, the object-oriented database can become an obstacle.