Blockchain is simply a new type of database. Rather than traditional databases (SQL or NoSQL) that are controlled by single entities, blockchain can be shared by a group of non-trusting parties without requiring a central administrator.
Michael and I get asked the same question all the time:
“Can I use a blockchain for this?”
We typically respond with:
“Can you do that with a regular database?”
And, in more cases than not, the answer is “Yes”.
This is because if trust and robustness aren’t an issue, there’s nothing a blockchain can do that a regular database cannot. Remember, blockchains are useful for sharing data with a group of non-trusting parties.
“The blockchain has the ability to enhance reliability in business processes by eliminating political and economic risks associated with trusting a centralized system." – Vitalik Buterin
For this reason, the United States is the toughest country in the world to understand blockchain.
In the U.S., the financial system works, the government works, our currency works… money has always worked for Americans. We have used the same currency for nearly 250 years.
In places like Argentina, it’s different. In Argentina, each generation has used at least one different currency. Imagine that after a big crisis, we stopped using the dollar and moved to a different currency.
The world is filled with organizations that have earned our trust—governments, banks, universities, and corporations. In most cases, these organizations work extremely well. Aside from a couple of well-known hacks like Equifax, Sony, Yahoo, etc., Americans trust the organizations.
But, in other places of the world, this isn’t the case. The centralized organization that controls your data doesn’t properly count the vote or protect your money.
Blockchains offer a way to replace these organizations and their centralized databases with a distributed database that is secured by cryptography and consensus mechanisms. This distributed database eliminates the single point of failure—also called the honey pot problem—characteristic of centralized databases.
Traditional databases are prone to attacks because the attackers only have to target a central server.
Overview of Public vs. Private Blockchains
When most people think of blockchain, they think of blockchains like Bitcoin and Ethereum. Anyone can participate in these blockchains, which are not as public blockchains.
However, these public blockchains and are not the blockchains that most companies will utilize.
Rather, companies, and specifically, groups of non-trust parties, will utilize what are called private blockchains. In private blockchains, there is a control layer built into the protocol, which allows for network participants to have control over who can join the network and participate in the consensus process (hence why it’s called private not public). Rather than allowing everyone and anyone to become a node and verify transactions, private blockchains have a select group of companies/organizations that can become nodes.
Private blockchains, therefore have a very different level of security than public blockchains like Bitcoin.
For example, think about a consortium of banks that need a shared ledger but that don’t trust each other so that one bank can host the entire ledger. Currently, the consortium of banks would find a trusted 3rd party to host the ledger. However, with private blockchains, this can be avoided.
Traditional Databases vs. Blockchains
Traditional Databases use client-server network architecture where a user can modify data that is stored on a centralized server. Irrespective of their structure (SQL or NoSQL), a single authority controls the database and authenticates a client’s credentials if they want to access it.
This means that read and write access is only possible via applications that are controlled by the entity.
If the security of the single authority is compromised, the data can be altered, deleted, or leaked to the public.
Blockchains consist of dozens, hundreds, and thousands of nodes. At the time of this writing, the Ethereum blockchain has over 15,000 nodes (shown in the image below).
Each node is essentially another admin; every node verifies new additions to the blockchain and can enter new data into the database. For data to be added to the blockchain, the majority of nodes must reach consensus. We’ll get into the benefits of this later but to summarize, this consensus mechanism guarantees the security of the network, but really slows down performance.
With blockchain read and write access involves multiple parties, rather than just one who gives access via applications.
On a public blockchain, all past transactions stay on the blockchain, rather than updating and erasing past entries, as is the case with traditional databases. This is why blockchains are referred to as immutable and distributed ledgers.
Advantages of Blockchain
Blockchain is decentralized and trustless. Remember the example of the consortium of banks?
Data can be shared across a network of trustless parties without needing an intermediary to validate or authorize it.
You now have a database that can be shared across boundaries of trust, without requiring a central admin. Instead of a central admin, transactions are process by a network of users who act as a consensus mechanism so that everyone is creating the same shared system of record simultaneously.
This is valuable because centralized systems become “honey pots” for hackers; anybody with access to the database can destroy, steal, leak, or corrupt the data within. As a result, the moment you entrust your data to a regular database, you become dependant on the organization where the data resides.
The value of decentralized control is that it eliminates the risks of centralized control.
Blockchain is similar to the internet in that it has a built-in robustness. By storing blocks of information that are identical across its network, the blockchain cannot be controlled by a single entity and has no single point of failure.
Because every node process every transaction, no individual node is crucial to the database as a whole. This makes the blockchain very durable.
It doesn’t matter if many nodes go down because the blockchain can catch them up on transactions they missed.
Although regular databases offer techniques for replication, blockchains take it to another level.
For example, simply connect a couple blockchain nodes together and they will automatically keep themselves in sync. Additionally, nodes can be freely added or removed from a network without any preparation or consequences.
Many financial institutions spend millions every year on the reconciliation of data. This is often times the case with financial institutions that trade with one another.
With a private blockchain, these financial institutions could maintain a shared database of transactions, gives each of the participating institutions the ability to read data from the distributed ledger and be guaranteed that it is valid and reconciled against the data held by the other participants.
Audit Trail of Everything
In a traditional database, a user can perform four functions on data: Create, Read, Update, and Delete (known as the CRUD commands).
A blockchain though, is an append only system. This means that a user can only add more data and all previous data is permanently stored. Rather than traditional databases where users can perform the CRUD commands, in a blockchain, users can only perform two operations:
- Create Operations: these add more data onto the blockchain
- Read Operations: these query and retrieve data from the blockchain
When you write data to a blockchain, it’s like etching the data into stone. This is useful for education credentials, property and land registries, and more.
Most centralized databases keep information this is up-to-date as of the most recent changes to the master copy. They are essentially a snapshot of a recent moment in time.
Blockchains are able to keep the information that is relevant now, like a traditional database, but they can also keep all of the information that has come before.
Relating data to news, you can think of traditional databases as CNN or Fox, representing the most recent and up-to-date data. In this scenario, blockchain databases would be like Wikipedia, showing you the recent insights into a story but also showing you the entire history from the very beginning of the story to the recent news updates.
Unlike traditional databases, blockchains grow like ever-expanding archives of their own history while also providing a real-time portrait.
This is why people refer to blockchains as perfect systems of record.
Advantages of Traditional Databases
Blockchains are very slow. People like to compare blockchains of today to the internet of the ‘90s, saying that blockchain technology is new and unoptimized and will speed up just like the internet sped up.
While this has merit, unfortunately blockchains are slow because when processing transactions, blockchains have to do everything that a regular database does, but with three additional burdens:
1. Signature Verification: Every blockchain must be digitally signed using a public and private keys. As MultiChain, an open-source, private blockchain solution, states, “the generation and verification of these signatures is computationally complex, and constitutes the primary bottleneck in products like ours...By contrast, in centralized databases, once a connection has been established, there is no need to individually verify every request that comes over it.”
2. Consensus Mechanisms: In blockchains, effort must be expended to ensure that the nodes in the network reach consensus. This takes energy and time.
3. Redundancy: Whereas centralized databases process transactions once, in a blockchain they must be processed independently by every node in the network. Essentially, lots more work has to be done for the same end result.
If you’ve ever heard the popular statement that Visa can handle 1,700 transactions per second while Bitcoin can only handle 7 TPS, now you know why.
This makes it very tough to use public blockchains like Bitcoin for everyday transactions. Although projects like the Lightning Network are working to solve this, the nature of blockchain technology requires that some speed be sacrificed.
In terms of speed and performance, blockchains just can’t compete with centralized databases, which have been around for decade and have seen their performance increase due to Moore’s Law.
In blockchains, every node must have full visibility into the database’s current state, the modification requested by a transaction, and the digital signature the proves the transaction’s origin. This genius new way to architect a database is also a deal-breaker for many firms.
Think about Wells Fargo, which has 70 million customers worldwide. They can’t just let other nodes have access into their data.
In traditional databases, only one central location has full visibility into a database’s contents and all requests to read data go through that central authority.
While there are ways to hide dig information on a blockchain, they require lots of cryptography and can’t be done more effectively than simply hiding the data completely in a private database.
Usually, Blockchains Are Not Better
Like most technology decisions, the choice between a blockchain and a traditional database comes down to a series of trade-offs.
Most of the time it makes more sense to just use a traditional, centralized, SQL or NoSQL database.
Before determining whether or not you should use a blockchain or a traditional database, you need to understand what you want from that database.
What’s more important for you?
Disintermediation, robustness, and a fault-tolerant way to store critical data?
Or, performance and confidentiality?
As most enterprises prefer privacy and high performance, the latter will usually make more sense.
For those working with groups who don’t trust each other, have different economic incentives, or are even competitors, a private blockchain may be the best option. Even this is challenging though. As discussed, private blockchains require different entities to come together and agree to a common set of stands by which it will operate. As you’re well aware, getting dozens of participants who are used to operating on legacy systems to come together and agree on anything is very difficult.
TL;DR If trust is not an issue, blockchain databases pose no advantage over a centralized database.