Decentralized Database

What is a decentralized database?

In our last article we looked at the basic idea behind databases. We saw how Twitter stores tweets and millions of people access them. While Twitter's database is an incredibly useful service for the world, let's explore why Twitter's use of a centralized database has some downsides, and then see how a decentralized database may offer some fixes to these issues.

Centralized database downsides

Twitter has lots of data which they store in their centralized database. This includes tweets, users, and more. Since Twitter controls their own database, they get to decide who can read from it and who can write to it. This is true for all companies that control their own database (Facebook, Google, etc). They have sole discretion over its uses.

Single point of failure

Running a centralized database that millions of people use is not easy. In the early days of Twitter it often went down. The fact is, all services go down from time to time. When we rely on a centralized database we have a single point of failure. If the database goes down, the service will not work.

Censorship

The Internet may be global but it still runs on physical computers, wires, and airwaves that exist inside sovereign entitites. These countries can make rules that govern how services such as Twitter are allowed to operate. Since Twitter is a company that controls a centralized database, it is relatively easy for a government to block access to it. This is what has happened in China. Twitter is officially blocked there. If someone tries to open the Twitter app inside of China, it will not work.

Banning users

Let's say Twitter decides that they do not want someone writing to their database. Since they are in control, they can ban anyone they please. This is not a hypothetical concept. In January 2021, Twitter banned the President of the United States from using their service. We can all agree or disagree about the merits of this ban. But what we cannot disagree on is that it happened. When a company controls a centralized database, they get to decide who can and cannot access it.

Hacking

A centralized database is a prime target for hackers. Billions of tweets exist inside of Twitter's database. Facebook's database has personal information on billions of people. Our bank's database holds all of our personal assets. Every day bad actors attempt to steal data from these centralized databases.

What is a decentralized database?

A decentralized database exists across multiple computers and is not controlled by a single entity. This makes it somewhat immune to the problems listed above. Let's take a look at how this works.

Multiple computers

Instead of one database running on one computer, a decentralized database runs on multiple computers. These databases all communicate with each other and make sure that the data they hold is synchronized.

When another computer (such as an app running on a phone) wants to access this data, they have a choice of which database they "talk" to. Let's see how this solves some of the problems listed above.

Problem solver

Since a decentralized database runs on multiple computers, there is no single point of failure. If a computer goes down, there are still many others that are up and can be accessed.

When a country

Last updated