Table of Contents
What exactly is blockchain?
A blockchain is a decentralised database that everyone can access. In other words, it is referred to as "distributed ledger technology" since there is no centralized authority or regulator that may dispose of the blockchain at its discretion. To learn more about blockchain technology, you can check Getting started with Blockchain - Tutorial
Open and Private blockchain
An open blockchain is accessible to everyone, whereas a private blockchain is only accessible to a chosen few. There can be several blockchains, some of which are open and others of which are closed. They can't communicate since each blockchain has its own set of laws, and the rules of one blockchain may directly contradict the regulations of another.
What distinguishes blockchain from traditional databases?
A traditional database is stored on dedicated servers that are managed by the database's owner. The blockchain is not controlled by a single individual or entity, and its security is maintained by its distributed architecture. If one of the machines on which the blockchain is kept is hacked, it has no effect on the overall operation of the system, which is unimaginable for a traditional database.
The left side shows a traditional application, with its conventional data stores. The right side of the figure shows the same system enhanced by blockchain recording of on-chain data. Thus, a blockchain-based system is a part of a larger system, which may be an enterprise system or a web-based system that stores data in a conventional database or on a local filesystem
Where is the blockchain located?
The blockchain is stored everywhere and may be kept anywhere. There are network nodes that hold the whole current version of the blockchain, while the rest of the nodes just refer to them if something has to be checked. The whole version of the blockchain may be downloaded from free sources and kept on your computer.
What exactly is a database?
Blockchain is a public database technology. As a result, you should begin by determining why you are utilizing the database. I'm referring to structured data storage here. A standard relational database with one or more spreadsheets might be used. It might also be the more fashionable NoSQL databases, which operate more like file systems or dictionaries.
The ledger for financial assets is often described as a database table, with each row reflecting a different type of asset belonging to a different business. Each line has three columns:
- an owner identification, such as an account number;
- an asset type identifier, such as "USD" or "EUR"
- the quantity of units of the asset in the account of a certain owner.
Databases are altered through the use of transactions, which are a collection of modifications to the database that must be approved or denied. A payment from one user to another, for example, is represented in asset accounting by a transaction that subtracts the equivalent amount of funds from one line and adds it to another.
What is the distinction between blockchains and databases?
The distinction between a regular database and a blockchain begins with architecture. Here are some of the key differences:
- Blockchain technology enables two parties that do not "trust" one another to share information without the need for an intermediary, such as a central administrator. A network of users acts as a consensus mechanism, or a general consent mechanism, to execute transactions.
- In the event of a centralized database, anybody with access to the system can destroy or harm the data. Users become reliant on administrators as a result of this. Banks must invest billions of dollars to protect their consolidated bases against losses.
- The majority of centralized databases include information that is only useful at a certain point in time. They are similar to snapshots that record a single moment. To obtain the prior "snapshots," make a backup. This technique is carried out on a regular basis in order to recover data (albeit with some loss of relevance). The downsides of this strategy are that you must make a complete duplicate of your database every time, which might be pretty huge.
- Databases on the blockchain may hold current as well as previous information. Databases with a history can be created via technology. This allows you to keep track of any point in time.
- While there will be performance enhancements in the future, the sheer nature of blockchain technology necessitates some degree of speed compromise. Because of the way the network is dispersed on the blockchain, processing power is not pooled or merged; instead, each node serves the network independently and then compares the outcomes of its work with the rest of the network until an agreement (consensus) is achieved that something happened.
- Centralized databases, on the other hand, have been around for decades. They greatly enhanced their production by employing a formula that has come to characterize digital-age innovation.
- For example, Bitcoin,is an unregulated record, a database that is uncontrolled. This means that anybody may add a new block to the chain and anyone can read a block in the chain despite the fact that the network or protocol can be designed such that only registered participants can write to or read from the database.
- Hiding data on the blockchain necessitates advanced encryption and the related computing strain on network nodes. However, it is still more efficient than a private database based on the traditional rights structure.
- It can be concluded that if secrecy is the main aim, trust between the parties is established, and there is no difficulty storing vast volumes of data, the blockchain database will be of little use to you.
- When utilizing a normal database, a user with an account and password can alter the records stored on the centralized server. Whenever he connects to the server using his computer, he sends an updated version of the data. The system's very control is in the hands of administrators who oversee its operation.
- Everything is different on the blockchain. After updating the network's data, one of the participants engages all of its nodes to validate the modifications. All information is saved on the computers of all users, rather than on a single server, which secures the system against hacking and cyber assaults.
- As a result, blockchain is a great storage solution for specific situations in a variety of applications where traditional databases are not the best option.
Blockchain vs Relational Database
- Essentially legacy architectures are databases. Common ones that you'll run into would be of course SQL or NoSql which Could be centralized or distributed.
- Traditional databases use client-server network architectures. Database processing is quicker.
- Traditional databases use that client-server network architecture and essentially of course that control of the database remains with that designated authority.
- In other words, you have a database administrator that is essentially controlling the access and can modify or delete that database.
- Essentially, in a legacy database, you have what is called create, read, update, and delete. It's much more flexible than a blockchain.
- When it comes to databases, they typically maintain what's called disintermediation, centralization, performance, agility, privacy as well.
- Now, the blockchain allows for two specific functions, validation of a transaction and writing of a new transaction
- Trustlessness - Network participants help secure the network so there is no need for a centralized third party to be employed
- Replication - Blockchain stores a copy on every computer in the network
- Immutable - Once a piece of information is appended to the blockchain, it can never be edited
- Timestamp - A timestamp is a sequence of character or encoded information identifying when a certain event occurs
- Atomicity - Either all of the operations in a transaction execute successfully and take the system to a different consistent state or nothing happens at all
- Consistent - Integrity constraints must be maintained so that the database is consistent before and after the transaction
- Isolation - Multiple transactions can occur concurrently without leading to inconsistence of database state
- Durability - Once the transaction has completed execution and modifications to the database are written to disk
A typical database is kept on dedicated servers controlled by the database's owner. The blockchain is not controlled by a single person or institution, and its security is guaranteed by its distributed architecture. If a portion of the machines on which the blockchain is stored is hacked, the whole operation of the system is unaffected, which is unthinkable for a regular database.