Sunday, July 23, 2017

Ethereum a decentralized database

The database we know and used so far are centralized in nature. That is we have one big database server which stores data. SQL Server, Oracle, DB2 etc are some of the popular databases. This database technology has been evolving since 80s. Now with the advent of Blockchain, there is a significant shift in the database technology.

Ethereum, in general Blockchain, is the new kind of database. It is a distributed peer to peer replicated database. Each Ethereum node will have a copy of the database. Ethereum will make sure that the database is in sync across all node, that every transaction is replicated and synced across all participating nodes. Every Ethereum node will have the same exact copy and there is no need to cross check.

Below are typical characteristics of Ethereum decentralized database:
  • Decentralized control. There is no central authority to manage and maintain database
  • Immutable. Once the transaction is sealed inside a block and the block is added to the chain, the transaction cannot be modified
  • Scalability. Ethereum is a highly scalable architecture. It can be easily scaled by adding additional nodes
  • Fault Tolerant. As Ethereum is distributed in nature, if a node goes down, the other nodes in the network automatically picks up the transaction

Unlike central database technologies, Ethereum uses consensus approach for committing transactions. When the user performs a transaction, in the traditional way this transaction is sent to the database and the database commits this transaction. In the Ethereum way, this user transaction is sent to the connected node. The node then broadcasts the transaction across the network of distributed nodes. Each node that receives this transaction personally checks that the transaction is valid. So every node in the network comes to a consensus about the transaction. As you see Ethereum (or blockchain) changes the paradigm of transactions. It transfers the authority of transaction to the decentralized network. Due to this Ethereum is sometimes called as distributed ledger.

All centralized databases provide programming capabilities with stored procedures. Ethereum also have similar functionality. It is called as Smart Contract. A smart contract is class that can have multiple methods that interact on the data persisted by smart contract. These classes can resemble the package concept in Oracle and the methods in the smart contract are similar to the procedures within the package. So smart contracts in Ethereum resembles to packages in Oracle. These smart contracts can also be similar to the database constraints.
  • Ethereum promises to eventually change the database we know. But here the current limitations of this new technology:
  • Query capabilities: Databases are known for their querying capabilities. Ethereum lacks this basic capability.
  • Rich permissioning: Databases provide very granular permissions. By default Ethereum is designed to be public in nature, hence it provides basic permissions. There is a special fork by JP Morgan, Quorum, which provides permissioned Ethereum chain.
  • Low latency: Due to the distributed and decentralized in nature, Ethereum adds significant latency.

As you see with the current state of Ethereum, it has advantages and disadvantages. So we can pair up Ethereum with database and can reap the benefits of both the world.

No comments:

Post a Comment