Chat Zalo Chat Messenger Phone Number Đăng nhập
Types of Databases - GeeksforGeeks

Types of Databases – GeeksforGeeks

A quick review of the current need to store massive chunks of relevant data for multiple related or unrelated categories reveals that databases must be highly effective at what they are designed to do.

This is not only due to the amount of data that is continuously reviewed or modified with which we are dealing; the dynamics of it is no longer of exclusive interest. It’s because of the social value each individual has assigned to them: databases are the literal backbone of a customer’s lifestyle or the value of a business.

The design of different types of databases is at the core of the functionality they provide to users. Since data is a dynamic entity, the way it is stored varies greatly. It is also the reason behind companies designing their own types of databases that meet their needs.

In this article, we will look at the most commonly used databases. They are to know:

  • Hierarchical
  • databases Network databases

  • Object-oriented
  • databases

  • Relational databases
  • NoSQL
  • databases

1. Hierarchical databases: As in any hierarchy, this database follows the progression of data that is classified into ranges or levels, in which the data is classified based on a common point of linkage. As a result, two data entities would rank lower and the community would assume a higher rank. Refer to the following diagram:

Hierarchical-DB.png

Note how departments and administration are completely different from each other and yet fall under the domain of a university. They are elements that form this hierarchy.

Another perspective advises visualizing data that is organized in a parent-child relationship, which when adding multiple data elements would resemble a tree. Child records are linked to the parent record by a field, so the parent record is allowed multiple child records. However, vice versa is not possible.

Note that because of such structure, hierarchical databases are not easily saleable; adding data elements requires a long journey through the database.

2. Network databases

: In simple terms, a network database is a hierarchical database, but with an important setting. Child registries have the freedom to be associated with multiple parent registries. As a result, you see a network or network of database files linked with multiple threads. Notice how the Student, Faculty, and Resources items have records from two parents, which are Departments and Clubs.

Network-DB.png

Certainly, a complex framework, network databases are better able to represent bidirectional relationships. In addition, conceptual simplicity favors the use of a simpler database administration language.

The disadvantage lies in the inability to alter the structure due to its complexity and also in that it is highly dependent structurally

.

3.Object-oriented databases : Those familiar with the object-oriented programming paradigm could easily relate to this database model. . Information stored in a database can be represented as a responding object as an instance of the database model. Thus, the object can be referenced and called without any difficulty. As a result, the workload on the database is substantially reduced.

Object-Oriented-DB.png

In the graph above, we have different objects linked together using methods; the address of the person (represented by the person object) can be obtained using the livesAt() method. In addition, these objects have attributes that are, in fact, the data elements that must be defined in the database.

An example of such a model is the Berkeley DB software library that uses the same conceptual background to provide fast and highly efficient responses to database queries from the integrated database

.

4. Relational databases: Considered the most mature of all databases, these databases lead the production line along with their management systems. In this database, each piece of information has a relationship to any other piece of information. This is because each data value in the database has a unique identity in the form of a record.

Note that all data is tabulated in this model. Therefore, each row of data in the database is linked to another row by using a primary key. Similarly, each table is linked to another table by using a foreign key.

See the diagram below and notice how the concept of “keys” is used to link two

tables.

Capture3231

Due to this introduction of tables to organize data, it has become extremely popular. Consequently, they are widely integrated into Web-Ap interfaces to serve as ideal repositories for user data. What makes it even more interesting is the ease of mastering it, since the language used to interact with the database is simple (SQL in this case) and easy to understand.

It’s also worth being aware of the fact that in relational databases, scaling and traversing data is a fairly light task compared to hierarchical databases.

5. NoSQL Databases

: A NoSQL that originally refers to non-SQL or non-relational is a database that provides a mechanism for data storage and retrieval. These data are modeled in media other than the tabular relationships used in relational databases.

A NoSQL database includes simplicity of design, simpler scale-out to clusters of machines, and finer control over availability. The data structures used by NoSQL databases are different from those used by default in relational databases, which makes some operations faster in NoSQL. The suitability of a given NoSQL database depends on the problem it needs to solve. The data structures used by NoSQL databases are also sometimes considered more flexible than relational database tables.

MongoDB falls into the category of NoSQL document-based database.

Advantages of NoSQL

– There are many advantages of working with NoSQL databases such as MongoDB and Cassandra. The main advantages are high scalability and high availability.

Disadvantages of NoSQL – NoSQL has the following disadvantages

.

  • NoSQL is an open source database.
  • GUI is not available
  • Backup is a weak point for some NoSQL databases such as MongoDB
  • .

  • Large document size.

These are just a few types of database structures that represent the fundamental concepts widely used in the industry. However, as mentioned above, customers tend to focus on creating databases that suit their own needs; to store data in a schema that displays variable functionality based on your blueprint. Therefore, the scope for development in reference to databases and database management systems is brilliant.

Contact US