Blockchain or relational database? How to choose the right technology for your application

Без кейворда

Suppose you've determined that you want to use blockchain distributed database technology in your business rather than a relational database. For what project or application would you be considering its use?

Because the term “blockchain” is not clearly defined, you could argue that almost any IT project could be described as using a blockchain. But assuming that you're not attempting to arch the truth too much, you most likely have an application that can make use of a distributed database to store information that will support some critical business process, and updates to that database must be cryptographically protected against tampering.

The blockchain that the Bitcoin digital currency uses is designed for use by a group of non-trusting parties, and requires no central administration. Those may be reasonable design goals if you need a method for transferring value peer-to-peer in a way that cannot be shut down by the efforts of one or more governments. But it's less reasonable for a database that supports critical business processes.

Because the requirements for the database that supports the operation of Bitcoin are very likely very different from the requirements for a database that supports a typical business process, a solution that works well for Bitcoin may not be the best solution in other cases.

So in what areas is a Bitcoin-like blockchain clearly better that just using a relational database?

Does blockchain's disintermediation matter?

The aim of disintermediating any third-parties may be a good one for a cryptocurrency, particularly if you are worried about avoiding interference from government agencies, but that's not necessarily a good purpose for enterprise software. The potential cost savings from using blockchains derive from the fact that a running blockchain application doesn't require much support because you can rely on other organizations, rather than in-house administrators, to keep the distributed database running.

But if you are developing a blockchain-based application yourself, you'll most likely need to provide support and maintenance for it. Research shows that the cost of support and maintenance for software is at least as good as the cost of developing it. This explains why software vendors charge so much for product support and maintenance. A good rule of thumb: If you develop an application that uses blockchains yourself, expect to pay at least as much via the application lifecycle as you do during development.

Considered from this point of view, the costs of using in-house database administrators may not be so bad after all. The disintermediation that using blockchains permits may provide significant cost savings in the long run—or not. That is, it may not always be the case that gains from disintermediation will be a significant advantage.

Spectacle penalty

While other features, such as the capability to catch double-spending and the capability to withstand interference from malicious actors, are more significant than spectacle for a cryptocurrency, very high spectacle is often the aim for databases that support critical business processes. Unluckily, the features that give Bitcoin-like uses of blockchains these features also significantly degrade spectacle.

Specifically, while writing to a relational database is fairly prompt, writing to Bitcoin’s blockchain is intentionally hard (necessary to prevent Sybil attacks on it). As a result, it's relatively slow. A blockchain requires the use of so many resources that you need to pay people to do it.

Bitcoin miners, the people who write updates to bitcoin’s blockchain, are presently paid the equivalent of over $7,000 (in Bitcoins) for each update that they make. Without this incentive, they would almost certainly not make any updates at all. There are also spectacle penalties for other approaches to mediating who can write to a blockchain. Not all are as expensive as the treatment followed by Bitcoin, but they all involve some sort of spectacle penalty.

The key takeaway: If high spectacle is necessary for your application, a relational database, not blockchain, may be the better choice. In fact, it's difficult to think of realistic examples where the spectacle of a system that uses a blockchain would have better spectacle than one based on a relational database. A Bitcoin-like blockchain might also end up being significant obstacle to scaling the spectacle of your application beyond petite test cases.

The fault-tolerance factor

The Bitcoin network has many users, each of which does some of the processing needed for Bitcoin transactions. A useful consequence of this massive level of redundancy is Bitcoin's high level of fault tolerance. It is hard to think of a script in which either a disaster of some kind or an attack by hackers incapacitates enough of the Bitcoin network to prevent it from processing transactions.

And it is utterly difficult to get the same level of robustness in a relational database, or at least to do so at a reasonable cost. In the absence of an intelligent virus from a science-fiction story that targets the Bitcoin network, it seems likely that even the most sturdy implementation of a relational database will attain the same level of robustness as the massively-parallel Bitcoin network. So if the capability to get through anything up to and including a zombie apocalypse is significant to you, a Bitcoin-like blockchain may be useful, providing you a level of fault-tolerance that may be hard to achieve using other methods.

Data security

A Bitcoin-like blockchain is viewable by absolutely anyone, which means that the confidentiality of any data stored in one is essentially zero. In the business world, however, there are lots of good reasons to not make data public. Regulated data certainly can't be public. And many businesses do not want to expose data that could be valuable to their competitors, including many transactions in which they are involved.

Therefore, a public Bitcoin-like blockchain may seem to be not very useful in many business applications. But is not necessary to store a total record of a transaction in a blockchain. Instead, you can include just a cryptographic hash of the record of a transaction. In that case, verifying that the record of a particular transaction hashes to the value that is stored in the blockchain may be enough to resolve any disputes that arise.

It's possible to get a reasonable level of data confidentiality with a blockchain.

Bitcoin’s blockchain cryptographically links each block added to it, so that a modification of any one of the blocks will lightly be caught. And while blockchain logs each transaction involving Bitcoins, it is effortless for a relational database to log each SQL guideline that it receives from clients. Because it is effortless to digitally sign data written to a relational database, it is also effortless to get cryptographic assurance that the data written to that database has not been altered.

So there's no clear advantage for either blockchains or relational databases when it comes to providing data integrity.

Blockchain vs. relational database: The bottom line

While blockchains and relational databases are both useful implements for storing information that supports critical business processes, each technology excels in different areas.

  • Blockchains have a decisive advantage when it comes to providing a sturdy, fault-tolerant way to store critical data.
  • Relational databases seem to have a decisive advantage when it comes to spectacle.

It seems unlikely that relational databases will ever provide the level of robustness that the massively parallel blockchains do, and it's unlikely that blockchains will ever provide the level of spectacle of relational databases.

In other areas, neither technology has a clear advantage. For example, it is not clear that the gains from disintermediation, often cited as a key advantage of blockchain technology, will ever be realized once the costs to support and maintain a blockchain-based application are taken into account.

But brainy contracts also exist in the world of relational databases, where they’re known as stored procedures. Anything that can be accomplished with one technology can also be accomplished with the other, so the right question to ask is whether a particular use of one of a technology is right for your application.

So how should you go about choosing inbetween a blockchain and a relational database? When considering what technology to use to support your next-generation application, do a careful analysis of your requirements and how they may or may not be met by each type of database. Don't let the arguments of proponents of either technology woo you that their treatment is better. Instead, let a careful analysis of your requirements guide your decision.

Related video:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *