This video builds on the prior video to complete the blockchain components.
- A blockchain is a database, but it's unlike most databases that have come before it in that it has two specific core qualities that make it unique and powerful. It's a distributed database and its entries are immutable. In other words, it doesn't sit on one all powerful server and the data stored in it cannot be deleted or edited. But before I go too deeply into this, let's quickly recap traditional databases.
In a traditional structured database, data is stored in columns and rows in multiple tables. Usually a table stores related data. For example, a table might contain a person's name and address. It will also contain a unique key called a primary key for each row that can be used to connect one table to another. In a billing system for example, another table might contain invoice information for a purchase. The address of the buyer will likely be referenced via a primary key.
Databases have become very sophisticated and can have complex logic built into them. In a client/server architecture, the database lives on a single logical server. Data is queried from the client presented as a request to the server which then runs the query and produces a result for the client. In web-based architectures, there are often at least three tiers, the web client, the web server, and the database. Much like client/server, both the web server and database server are centralized.
Often workload is distributed among many physical servers. In this way, they can be said to be distributed, but logically they are governed by central rules. This physical distribution design helps with redundancy and increased performance. As a result of social media and massive disparate data sources, databases are increasingly unstructured. While techniques such as natural language processing and text analytics help to manage the data, the overall physical database architecture is largely the same.
Somewhere in the environment is a set of rules on who can use the database and what rights each user has. It served the world well and continues to be the dominant model for data management. What makes this database architecture useful and powerful also makes it vulnerable. Anyone with the right credentials can access and there are too many ways to hack the system as many high-profile cases have demonstrated over the past few years.
Massive credit card thefts from well-known retailers have all been too common. A blockchain database is structured in the sense that it contains specific blocks of data organized in a particular way. However, there is a big difference in how the database is hosted. Unlike in a traditional database environment, a copy of the blockchain database resides on every computer that participates in a given blockchain. For example, all Bitcoin users will have a full copy of the Bitcoin blockchain database on their computing device.
There is no central server. It is not hierarchical. In fact, we call it peer to peer since the architecture is flat. In a simplified description, when a person first joins a blockchain-based environment, the full database is downloaded to their device. Next, as each transaction takes place in the blockchain, say Bitcoin currency is sent from one person to another, each transaction is recorded in every instance of the blockchain database.
In this way, it is said to be a distributed database. In fact, there is an industry preference to refer to the database as a Distributed Ledger or DLT, Distributed Ledger Technology. Unlike a traditional database, for a transaction to be processed and inserted into the blockchain ledger, consensus must be reached by all participating devices. In addition, minors who we discussed earlier create the necessary hash signatures that allow new blocks to be appended to the database.
Since minors conduct significant work in terms of processing power and electricity, their successful effort in finding the NNS that created the winning hash, called proof of work, provides integrity because we don't want it to be too easy to add blocks. Without proof of work, adding blocks to the block chain would be too easy and could make it vulnerable to robust hacking attempts. Finally, a blockchain distributed ledger is immutable.
This means that entries made can never be edited or deleted. That's really different from a traditional database. It also means that once a transaction takes place, there is no recourse. If a mistake is made, it's permanent. For example, if you make the wrong payment amount or send money to the wrong person, assuming it's a valid transaction, it cannot be reversed. Outside of the good nature of the person with whom the mistake was made to return the money or correct the amount, you're out of luck.
When we dive even a little deeper, particularly when we discuss Bitcoin and Ethereum, we'll see that these design choices for the blockchain make a lot of sense.
- Blockchain basics
- Public and private keys
- How blockchain enables bitcoin
- Blockchain and the electrical grid
- Blockchain and identity management
- Risks of blockchain