Blockchain is a decentralized peer-to-peer network. A blockchain network consists of nodes, a distributed ledger, and a
The traditional database is a relational database consisting of tables and their relations. All the data is stored in rows and columns against a specific entity. They're mainly used to store information having logical relations between them.
Ledger and state databases are used in a blockchain to store information about the transactions and the network. However, the ledger is still considered the primary storage space for the blockchain because the state database ultimately relies on the ledger to be calculated.
A ledger is a sequential structure of blocks containing chronologically arranged transactions. It's made up of sequentially linked blocks using the previous block’s hash, as shown below:
The differences between a ledger against a traditional database are as follows:
Ledger | Traditional | |
Centralized | No | Yes |
Fault-tolerance | Yes | No |
Storage space | Low | High |
Immutable | Yes | No |
Transparency | High | Low |
Speed | Low | High |
Access | Anyone in the network | Database administrator |
Centralized refers to a situation where only a single entity (person) is in the database. Centralized is the opposite of decentralized, where multiple entities are in charge of the database.
In traditional databases, the central authority in control of the database is the database administrator. However, in the case of the ledger, the whole network is in control and has a copy of the ledger. The nodes on the network can see the ledger and add to the ledger by performing a transaction.
Fault tolerance is the ability of a system/network to stay online after some servers/nodes crash. Systems that are not fault-tolerant risk losing the data stored in the servers.
The traditional databases are not fault-tolerant as most of the time they rely on a single server which, when it crashes, leaves the system unusable and loses the data. However, the ledger is replicated on all the nodes of the network, so even if some nodes go offline, the network as a whole still stays online, and the data in the ledger is accessible via the online nodes. This makes it fault-tolerant.
Traditional databases use dedicated servers with high storage capacity to store databases on, so they have a lot of storage space. However, the ledger runs on normal computers with little storage space. Therefore, the storage space in the ledger is limited compared to traditional databases.
Data is considered immutable if it cannot be modified once it is added to the database.
Ledger is immutable as it doesn't allow modifying the data of the previously stored transactions as it can lead to serious repercussions for the whole network like double-spending. However, the traditional databases are not immutable as the data, once added, can be modified by the entities with access, like a database administrator.
Transparency is the ability of entities to see all the data in the database. It's highly useful to create trust in an untrustworthy environment.
Ledger is highly transparent as everyone on the network can see the details of all the transactions from the most recent transaction leading back to the
The speed with which each transaction/query is executed varies significantly as blockchains assume every node to be untrustworthy and uses a consensus algorithm to ensure that the transaction is valid, thus taking more time.
However, in traditional databases, this problem is not as persistent as the entities with access to modify the database are assumed to be trustworthy, so they do not require a consensus algorithm to ensure that the query is valid. This leads to an increase in the query execution speed, thus making the traditional databases faster than the ledger.
Every node in the network can access the ledger to view and add transactions. However, traditional databases give access to a limited number of trustworthy entities to execute queries on the database, meaning database administrators, managers, and so on.
Ledger, although considered to be a database, has a very specific use case as compared to traditional databases. Ledger offers some advantages over the traditional bases. However, the traditional databases still serve as a good option for applications today because the ledger only stands out as a good option in an untrustworthy environment.
Free Resources