Database Systems - clumsyspeedboat/Decision-Tree-Neo4j GitHub Wiki

Introduction

In the era of data analytics, big data, database management plays a crucial role in both the creation and management of data. Without it, running and managing data effectively is not practicable.

Types of Database

There are various types of databases used for storing different varieties of data. Few are: [1] JavaTPoint. Types of databases. 2018.

Centralized Database:

Centralized Database: It’s an easement to the users as they can access the stored data from different locations through several applications.

Relational Database:

It stores data in the form of rows(tuple) and columns(attributes), and together forms a table(relation). It uses SQL for storing, manipulating, as well as maintaining the data. Few examples are MySQL, Microsoft SQL Server, Oracle, etc.

NoSQL Database:

Non-SQL/Not Only SQL is a type of database that is used for storing a wide range of data sets. It is not a relational database as it stores data not only in tabular form but in several different ways. It could be further divided into four different categories:

  • Key-value Storage: A simplest type of database storage where every single item is stored as a key(or attribute name) holding its value, together.
  • Document-oriented Databases: Data is stored as JSON-like documents. Its advantage is that it helps developers in storing data by using the same document-model format as used in the application code.
  • Graph Databases: They are used for storing vast amounts of data in a graph-like structure. Social networking websites most commonly use graph databases.
  • Wide-column stores: It is similar to the data represented in relational databases. Instead of storing data in rows, they are stored in large columns together.

Performance Issues in Traditional RDBMS:

[2]Jamie Liu. A review of graph databases. 2020.

A relational database does work well if data is in codify paper forms and tabular structures. Although, if we want to model the ad hoc relationships, the RDBMS is poor at handling this. “The relational data model becomes a burden with a very large number of join tables, with sparsely populated rows where there are billions of different tables across databases. With the growth of such a dataset and the increased number of JOIN operations needed, the performance of existing RDBMS are no longer a fit for these business requirements. Dealing with recursive queries will perform badly due to the computational and space complexity of recursively joining tables and will also cause redundancy.” It has to be highly taken into consideration that “The graph databases do not necessarily provide good performance in comparison to the relational databases. While graph databases offer an intuitive representation of data, relational databases offer better results when set operations are needed.”

After going through different sources on types of databases, the conclusion can be found in the following comparison. Freecodecamp, geeksforgeeks

Centralized Database Relational Database NoSql Database
1. Storage
Data is stored in a single location. Data stored in a table form, rows, and columns. Stores data in tabular and other forms.
2. Accessibility
Data can be accessed from different applications from different locations. Uses SQL for CRUD operations
3. Time Efficiency
It takes the most time among the three to access the data. It takes less time than centralized DBs. These are faster for applications nowadays.
4. Modification
Modification and backup of data are easy. Modification and backup are not easy because of data being in different physical locations. Backups are hard as additional tools are needed.
5. Consistency
Centralized DBs have more data consistently. Relational DBs are less consistent due to the replication of data. Eventual consistency, the system becomes consistent with time.
6. Recovery
In case of a failure, the user cannot access the data. A failure won’t stop the user from accessing the data as there are multiple databases. If a failure occurs during some object trying to reach eventual consistency, that data will be lost.
7. Cost
It is a cheap database solution. It is a more expensive solution. It is an expensive solution but the scalability is cheaper as compared to relational DBs.
8. Examples
Microsoft SQL Server, Oracle DB, MySQL. Graph databases, key-value stores, document databases.