Blockchain technology, which joined the ranks of high-speed digital technologies in 2008 with the advent of bitcoin, soon made its way into the Internet and communications as a tool for storing and managing data. But what is the difference between storing data in a blockchain network and storing data in a traditional database? In an article published on the Medium website, Shaan Ray, a consultant and expert on blockchain, explores the fundamental differences between a blockchain and a traditional database, and explains how each of these databases is designed and works.
Traditional databases use a client-server network architecture. In this architecture, the user (known as the client) can modify and modify the data stored on a centralized server (computer) if licensed. In the meantime, database control remains in the hands of a designated authority that also verifies the customer's identity and credibility before accessing the database. This designated authority is responsible for managing the database. Therefore, if the security of the reference is compromised, there is a possibility of changing or even deleting the data.
To better understand this concept, we can use the Wikipedia website as an example. In Wikipedia, which is a comprehensive encyclopedia, anyone with an account can add new articles or edit an article for improvement. However, the ultimate control of Wikipedia data is in the hands of one centralized entity.
blockchain databases consist of several nodes or computers. Network nodes are computers that participate in the management of a blockchain database: all nodes check new data and can enter this data into a blockchain-based database. For new data to be added to the blockchain, the majority of nodes must be unanimous. This consensus mechanism ensures network security and makes data manipulation difficult.
In the Bitcoin blockchain, consensus and consensus are obtained using the Proof of Work method. This method involves solving complex hashing puzzles in which the data is encrypted and virtually impossible to change or delete. Other blockchains, such as Ethereum, also use the Proof of stake method as their consensus mechanism.
Integrity and transparency
The main thing that distinguishes Blockchain technology from traditional database technology is the general validation of data, which is made possible through the integrity and transparency of the network.
Integrity means that each user can be sure that the data they are retrieving has remained intact and unchanged since its inception. Block transparency also allows all users to monitor how blocks are joining the blockchain over time.
CRUD vs. reading and writing
In a traditional database, the client can perform four different functions on the data: create, read, update, and delete. These four basic functions are called CRUDs; A word that consists of the initials of the four English words Create, Read, Update, and Delete.
However, the blockchain structure is designed to allow only the user to add data. In fact, the blockchain user can only add more data in the form of blocks to the blockchain. All previous data is permanently stored and cannot be changed. Therefore, the only operations that can be performed on blockchain data are "read" and "write". The read operation means requesting and retrieving data from the blockchain, and the write operation means adding more data to the blockchain.
Validation and writing
Blockchain allows you to perform two basic operations related to transactions: validating a transaction and writing a new transaction. A transaction is an operation that changes the state of the data in a blockchain to a new state. In other words, transactions do not delete or change previous data; Rather, they change their situation. For example, a new transaction can change the status of an inbound transaction in the past from "unspent" to "spent".
To better understand this, imagine a practical transaction. For example, if it is recorded in the blockchain that Ali Bitcoin wallet contains 1 million bitcoins, this figure will be stored in the blockchain forever. When Ali spends 200,000 bitcoins, the transaction is recorded on the blockchain and brings his balance to 800,000 bitcoins. However, because the data is only added to the blockchain and the old data is not changed, the causal balance, which was previously 1 million bitcoins, remains permanently in the blockchain and anyone who wants to click on the data The old monitor will have access to these records. For this reason, the blockchain is an immutable and distributed general ledger.
Decentralized control eliminates the risks and harms of centralized control. Anyone who has sufficient access to a centralized database can corrupt or completely destroy the data in it. Therefore, centralized database users must have complete confidence in the security infrastructure of database management and governance.
Blockchain technology has institutionalized security in its structure by using decentralized data storage to solve this problem.
However, blockchain technology is suitable for recording certain types of data and traditional databases for other types of data. Before choosing a database, any organization should be fully aware of their needs and expectations and evaluate their desired goal according to the strengths and weaknesses of each type of database.