Why not use a database? Jan 19, 2024
Is this topic incorrect or incomplete? Please open an issue with your suggestions.
- data
- database
- distributed
- decentralized
TL;DR
Blockchains are themselves public access databases but with one very important distinction, no single entity owns that database. This means that there is no single point of failure, no single point of control, and no single point of access. This is a very important distinction because it means that the data in the database is not visible or controlled by any one person, corporation, or entity, and it is not possible for any one person or entity to secretly change the data in the database. This suggests that the integrity of the data can be trusted, but even more importantly the blockchain data can be independently verified.
ELI5
A database is a storage for data, this data could be something like the the purchase price of a video game from your local game store and the copies of the game available in store. If the store controls the database they can adjust the number of copies to be zero and make it look like they are sold out to make more money by tricking the buyer into thinking the game is in high demand. Without a blockchain, we have no way of knowing if the number of copies is accurate and related to actual purchases of the game. With a blockchain, we can see the public history of the database changes and verify that the number of copies in store is related to the number of sales made for that game, every change must come as the result of an explicit request to make that change. It would not be possible for a store owner to secretly change the number of copies in store without it being visible to everyone.
As a beginner
Given blockchains operate as a public database, the primary difference is that changes to the data within the database are the result of a public request to make that change. This means that there is an implicit public audit trail of all changes to the database, and that the data in the database can be trusted to be accurate (as the result of all requested changes). Change request made to a blockchain occur through either a native token transaction or a smart contract transaction. Token transactions are the result of a wallet sending tokens to another wallet, meaning that a single wallet can only decrement the token balance of their own wallet through a token transaction. A smart contract transaction is the result of executing a function on a publicly deployed smart contract, meaning that the operation and its input parameters are publicly visible and the resulting state change to the database is also publicly visible. These 2 concepts are the core of how blockchains produce public audit trails, and why the data can be trusted and more importantly independently verified.
Implicit data sharing
Blockchains through their public transactions implicitly share the data contained within them. This means that data generated by one entity can be used by any other entity. This level of data sharing has no existing precedent and is a very powerful new construct for generating business value.
A loyalty discount example
Imagine if a sports team was tracking ticket sales on a blockchain. Local restaurants could entitle loyalty discounts to those who purchased 10 tickets or more throughout the season. This would normally require a very complicated contractual agreement between the sports franchise, the league the franchise operates in, and the restaurant in order to share the data necessary to build this loyalty program, something that could be very costly and not worthwhile for the gained business at the restaurant. With a blockchain, a restaurant simply needs to query the blockchain daily (or even hourly) to get a list of all wallets that have purchased 10 or more tickets, and then entitle those wallets to a loyalty discount. This is a very simple example of how a blockchain can enable new business models that were previously not possible, and best of all this has nearly zero cost to the restaurant to implement.
Can I trust blockchain data?
This topic has talked a lot about how blockchain data can be trusted. While this is generally true, it is part of a larger understanding that while blockchain data CAN be trusted, it CAN ALSO be verified. This means that if you do NOT trust the data, you can at least VERIFY that the data is correct yourself.
Generally it is not the data itself that would be considered unstrustworthy, but rather the source of the data. Most data that is consumed from a blockchain source is provided through an intermediary, an entity whose role is to simplify access to blockchain data for a price. While economically it would not be prudent for such an entity to provide incorrect data, it is still possible that the data could be incorrect (whether malicious or not). This is why it is important to verify the data that you are consuming from a blockchain source if there is any doubt or if data integrity is of the utmost importance.
How can I verify blockchain data?
The most direct method of verifing blockchain data is to connect directly to the blockchain network, and process the historical transactions yourself. This is not a trivial task, and requires a lot of technical knowledge and infrastructure to accomplish. This is why most people rely on intermediaries to provide them with blockchain data, as it is much easier to consume and process. This is also why it is important to understand the source of the data you are consuming, and to understand the risks associated with that source. In general, it is considered safe to consume blockchain data from a reputable intermediary.
Another option for data verification is to supersample the same data from multiple sources. The likelihood of multiple blockchain data sources all consipring to provide the same incorrect data is so extremely low that it is considered de-facto impossible. This means that if you consume the same data from multiple sources, and the data is the same, then you can be reasonably sure that the data is valid.