BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Is blockchain a database?

stakefish
特邀专栏作者
2019-12-21 11:17
This article is about 3329 words, reading the full article takes about 5 minutes
Is a distributed, redundant database equivalent to a blockchain?
AI Summary
Expand
Is a distributed, redundant database equivalent to a blockchain?

"Distributed database" and "distributed ledger" are often understood by many people as another name for blockchain. Many times, they "look the same" or even "work the same".

So can blockchain be equated with database?

An article from the Cardano community explores this topic with data as the keyword. stakefish extracts the main viewpoints in the article and shares them with the community for everyone to find their own answers.

People often say that the blockchain is a slow and expensive database, and the scalability is not good. Is that true?

Indeed, blockchains will never be as fast as traditional databases. However, blockchains have advantages over databases, and it is important to understand these advantages.

secondary title

"blockchain" to "blockchain"

image description

linked list structure

Blockchain adds a feature to prevent historical data from being tampered with.

In 1991, two authors, Stuart Haber and W. Scott Stornetta, conducted research on the "chain of blocks" based on cryptography for the first time, and wanted to build a timestamp system that could not tamper with documents.

image description

Cryptography-based "block chain" structure

It should be noted that the word "blockchain" was not used at that time, but "chain of blocks", which was also used by Satoshi Nakamoto in the Bitcoin white paper.

secondary title

text

text

Common databases don't use "blocks" but "tables". A table is a collection of related data stored in a table format in a database, consisting of columns and rows.

image description

data sheet

There are four basic operations one can use on data in a database: create, read, update, and delete (CRUD).

However, the blockchain only allows two operations: creation and reading. Blockchains can only append a full block (which contains transactions) at the end of the blockchain, after which data cannot be updated or deleted.

secondary title

Difference 2: Data Permissions

"A group of administrators" ≠ blockchain nodes

In addition to "what operations are allowed", "who will operate" is another important aspect to look at the difference between blockchain and database.

A database is maintained by one or a group of administrators. The administrator has the right to do whatever he wants with the data (CRUD four operations). Managers are usually employees of large corporations who must follow rules set by the company owners, granting users limited rights to create, read, modify, or delete data.

However, even if the user has entered the correct data, the administrator can modify or delete it. If there is a dispute about the correctness of the data, the user has no or only limited modification rights, and the administrator always has more rights than the user.

Administrators who modify and delete permission data do not exist in the blockchain. Nodes in the network must agree on any data to be added. Once a block is added and confirmed, no one can easily change historical data, and people can always verify what happened in the past through the blockchain.

The blockchain replaces a single server maintained by an administrator with a set of independent nodes that agree on what is added.

secondary title

Difference 3: Data backup

"Redundant database" ≠ blockchain

image description

data replication

image description

Data is written to all disks after all nodes reach a consensus

Multiple backup databases are also not as secure as a blockchain.

"Data replication" means that one server sends data to other servers for backup. Before storing data, there is no consensus among servers to store a certain version of data. If one server sends invalid or wrong data, the other servers just blindly receive and store it (with some sort of data validation still in play).

secondary title

Difference 4: Data Transfer

Distributed system ≠ decentralized solution

Traditional databases adopt a client-server architecture, which is a software structure model consisting of two parts, the client system and the server system. They communicate over a computer network or on the same computer. The application program of the master-slave architecture is a distributed system composed of client and server software, but it is still a centralized solution with the server as the center.

The database is built on the server. Therefore, if there is only one server, it may create a so-called single point of failure. Once the server is down, none of the clients can communicate with the server, nor with each other.

From a data point of view, all clients must rely on the server as being honest and secure.

Nowadays, it is rare to see a network with only one server. In most cases, there are more redundant servers in the network. If one server crashes or is temporarily unavailable, another server will handle all requests instead, but this is only possible if data has been replicated between the servers.

secondary title

Difference 5: Data Storage

Immutable and Proof of Value

Databases can be used in scenarios such as security monitoring, signaling, information collection, and authorization. Many databases provide efficient database features in the form of database triggers. When using a cloud database, the data is usually only important to a few people, and it is sufficient to implement security in the database system. Users can trust the database owner because there are other mechanisms such as laws to resolve problems that may arise.

secondary title

Differences and Tradeoffs

The database is very powerful, and people can use it to achieve almost all the functions they want, but the unique functions of the blockchain cannot be achieved by the database.

Let’s step back and see what blockchain has to offer that traditional databases cannot achieve:

Data cannot be changed. The blockchain is essentially a decentralized distributed network. Data is written to many disks at the same time after reaching a consensus. It is very difficult, almost impossible, to change historical data. The main difference is whether or not a database is implemented in a decentralized manner.

Additional safety data. As mentioned in the previous point, new blocks are only added if a majority of entities agree. Therefore, it is impossible to insert some data that is considered invalid. Participants must strictly abide by the rules, and more mutually independent entities focus on the implementation of the rules.

There are no administrators. There is no such role as an administrator on the blockchain with the power to change anything. Nodes negotiate with each other and share responsibilities. Blockchain has the characteristics of trust-free and anti-deletion.

There is no single point of failure. This mainly applies to PoS and PoW consensus mechanisms. For DPoS consensus, problems may arise when several nodes are unavailable at the same time.

People can choose to use traditional database or blockchain technology according to different needs. When adopting the blockchain, different degrees of decentralized data management can be achieved by choosing a private chain or a public chain.

It is difficult to achieve high scalability and maintain a high degree of decentralization. Data must be distributed all over the world, so network latency must be considered. It will take some time to reach a global consensus. Blockchain will never be as effective as a database, but it can provide protection in terms of trustlessness, decentralization and preventing tampering of historical data.

The decentralized approach also has the potential to replace traditional Internet giants, allowing more people to control and benefit from data.

Original title: A Database is not a Blockchain

By: cardanians.io

Compile: stakefish

开发者
Welcome to Join Odaily Official Community