To put it simply, you can use the blockchain as a distributed database, but it can also be used for other things.
This is like a laptop. You can use it as a USB flash drive to store various files and carry it around. But it can also be a computer for playing games and watching movies.
![There is a clear difference between the blockchain used for data storage and the actual distributed database.1 There is a clear difference between the blockchain used for data storage and the actual distributed database.](https://www.infocodecn.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
Distributed database, as the name suggests, is to deploy the database distributedly on different machines (also called “nodes”).
On the surface, this definition is indeed consistent with the “mode in which all nodes save all blocks” in the blockchain, and the effect it can achieve is consistent. This is also the reason why blockchain can be used for distributed data storage as mentioned earlier.
However, although the functions are similar, there are still some obvious differences between the blockchain used for data storage and the actual distributed database.
1. Original design intention:BothCompletely different
Distributed database is the practice of distributed computing on databases in order to reduce costs and improve efficiency at the same time, so there is mutual trust between nodes. The original intention of blockchain design is entirely to solve the problem of distrust. This design concept of blockchain also makes its efficiency much lower than that of conventional distributed databases.2. The amount of data stored in each node:Bothare different
The data on the full node in the blockchain must be a full backup of all data, but the nodes in the distributed database may not be. A typical example is HDFS in Hadoop, where each node only stores a part of the total data. This can not only fully and effectively utilize the performance of each distributed node, but also help improve the parallel efficiency of subsequent queries.
3.DataNumber of subjects maintained:BothAlsoDifferent
Unless it is a personal chain built by oneself, each node in the blockchain belongs to different entities, so the blockchain is a set of data records jointly maintained by multiple entities. In most actual distributed databases, there is only one subject, and the data is stored in a distributed manner for security or performance reasons.
Heshu Group believes that although blockchain has some similarities with distributed databases in terms of data storage function, and can also realize some basic functions of distributed databases, the underlying logic of the two is completely different, and even more so. There is no need to discuss the huge gap between the two in the core CAP rules in distributed systems.
Although treating the blockchain as a distributed database has its natural shortcomings, the blockchain has its unique advantages in terms of data calculation and processing functions.