Comparing Conventional Databases and Blockchain

A database is a group of organized data that are stored and can be accessed anytime. Databases usually have a client/server structure. With this structure, the database is usually set on a central system…

Comparing Conventional Databases and Blockchain
Comparing Conventional Databases and Blockchain


A database is a group of organized data that are stored and can be accessed anytime. Databases usually have a client/server structure. With this structure, the database is usually set on a central system, and a group of clients use its services. Accessing database is possible via using a module software called a database management system (DBMS). Implementing database is in a way that prior to getting access to it, the process of authentication takes place. If the identity of the client is authenticated, according to the access control list, permission will be issued for the request of the client, or it will be rejected. The requests are divided into four parts of adding a new record, deleting a record, updating a record or calling up a record. Any defect in the access control process prepares the basis for conducting cyber-attacks and tampering with the database. Database management is done in a centralized way, and users do not play a role in it. In general, databases are divided into two main categories of relational and non-relational. Relational databases are made up of tables, and the columns of each table are called fields. Data are put in the rows of the table, and each row is called a record. Records connect with each other via the relations between tables. In non-relational databases, the data are usually stored with the key/value structure, and there is no need for defining tables with specific columns.


As it is clear from the name of the Blockchain, this structure is made up of a chain of blocks. Each block is made up of two parts of header and body. The body includes the stored data in the block and header is made up of a group of fields. For instance, Bitcoin header fields and the purpose of each one is explained in the following parts.
-    Version: this fields specifies the version of the Blockchain.
-    Previous block header’s hash: this field is the hash value of the previous block header.
-    Merkle Root: this field of the result of the implementing Merkle root algorithm on all the stores data in the block body. These data in Bitcoin are transactions. By using the Merkle root, the integrity of the stored data in the block can be evaluated.
-    Timestamp: this field specifies the time the block was generated.
-    Difficulty target: this field specifies the difficulty target of each block. The difficulty target is a parameter that makes it possible to adjust the problem difficulty in the PoW algorithm.
-    Nonce: this field specifies the number of attempts made by miners to solve the PoW problem.
-    Hash Block: each block has a hash value. This hash is generated via the Merkle root and the hash value of the previous block in addition to the other number of header fields. The use of the previous block’s hash value in generating the new hack block makes possible for blocks to connect with each other. In fact, in this method of calculation, hash indicates the same concept of the chain in Blockchain.
Other common Blockchains use a similar structure to that of Bitcoin that was just introduced. The common aspect among all these Blockchain structures is the storing of data in body and connecting blocks using the hash value of the previous block in generating the hash of the new block. Unlike the common method of implementing conventional databases, the Blockchain data are not kept in a central system and are not managed centrally. Their management and maintenance are done in a distributed way with a collaboration of a group of nodes, and this is why it is called distributed. The adding of a new block to the Blockchain requires consensus, and when a new block is added to the chain, tampering with it and deleting it will become impossible. Coming to the consensus to add the new block is done in different ways that are called consensus protocols. The PoW and PoS protocols are two well-known consensus protocols in the Blockchain structure. Making sure of not tampering with blocks is done using the hash algorithm. Any tampering with the data of a block is done via recalculating the Merkle root. The difference in the new Merkle root with the previous Merkle root specifies the tampering with the data of that block. From the other hand, deletion of a block will change the hash of all the blocks after it. Not keeping the chain of blocks in a centralized way in a trustless space between users makes the deletion or tampering with a block to be easily noticed.
Any of the two methods of a conventional database storing and Blockchain have features that gain importance depending on their application. In the following parts, we will compare conventional databases with Blockchain from different perspectives.

Central Control

Blockchain makes possible the sharing of data between users who do not trust each other, but in the conventional database, users need to trust the entity who manages and controls it. In the conventional databases, there is always the risk of data being tampered with by the person who has the necessary permissions, but in Blockchain, there is no central control and adding of new data takes place through consensus protocols. Central control can be considered a disadvantage for a system. In case this center comes under attack for any reason, or a problem occurs to it, the entire system will have a problem and this, in turn, will affect all the users. However, in Blockchain, the problem that is created for a node will not affect the other nodes in the network.


The data stored on the conventional database may be deleted or updated. While in Blockchain, the stored data are kept from the beginning and are immutable and cannot be deleted.


The process of creating a new block in the Blockchain has some limitations that reduces the speed of data being stored compared to conventional databases. The limited volume of the block and the fixed rate of new block generation are among the limitations that reduce the performance of Blockchain with respect to its speed. For instance, the block generation rate in Bitcoin is one block in each ten minutes. From the other hand, the size of each Bitcoin block is at most 1MB. Given the average size of Bitcoin transactions, each block holds about two to three thousand transactions in itself. Given these numbers, the speed of Bitcoin transactions is a one-digit number, while existing non-Blockchain solutions process much much more rate of transactions and store them.


Controlling access to records in the conventional database is easily implemented. In the database, implementing access permission for each user is easily possible, and on the other hand, the database does not allow any user to access the information of the database without confirmation, but in Blockchain all users have access to information from the beginning. As such, in applications that have a high degree of confidentiality and secrecy, Blockchain will probably not be a good solution. However, currently, there are ideas implemented in the Blockchain to provide confidentiality and are being used. Among the most well-known Blockchains that have been able to provide the confidentiality of data against illegal users is Monero. In the Blockchain of Monero, the amount, receiver, and sender of a transaction are kept hidden from others. The availability of information to all the Blockchain users can also be analyzed from another point of view. All users having access to Blockchain can provide transparency in the system, and this can be considered an advantage in some applications.