As we all know that blockchain is going to be a profound technology in the future. It’s a technology on which we can rely on without interruption of third parties. One question always comes to our mind that, “What is the difference between Blockchain and Database ?” or “Is Blockchain a database?” Well, yes Blockchain is a decentralized ledger (database) containing records of transactions. First of all, there is no central authority which controls the blockchain database. Everyone accessing the blockchain is accountable for the data in it. While storing data in the blockchain you should always remember that there is no ‘D’ in ‘CRUD’ operations. In short, whatever data you put into blockchain, it will stay in the blockchain forever. You cannot tamper that data once it is added.
Data stored in the blockchain is not controlled by any central entity, because of which we can get higher security and reliability. Data stored is not limited up to the transaction details only, we can see that a huge data will be stored on its nodes in future including texts, images, videos, infographics and so on. As we all know that with an increase in storage of data, smart contracts will also keep on increasing eventually and as a result, its deployment price will increase.All the transactions which we run on ethereum blockchain require gas. A suitable amount of gas has to be paid to the miners as compensation, for securing our transactions. This gas relies on the complexity and size of the contract, which means if data size increases so do gas. There are certainly other alternatives which we can opt to store data for our systems which we will discuss one by one.
IPFS stands for Interplanetary File System. It was invented by Juan Benet. IPFS is a peer-to-peer distributed file system. It relies on a Distributed Hash Table and the BitTorrent protocol. To understand IPFS in a simple manner lets consider an example, suppose there are 100 people sitting in a hall and they are given a task for finding the meaning of a particular word from Google. Now everybody in the hall is accessing google server. Each person is sending a request to Google’s server individually. This is what the existing system does, but if we consider IPFS, then only one person will access the google server, others will simply access google server from that particular person. In short, we can access the server from a nearby node instead of sending a request to a remote server. But there are certain flaws in this system like, if people want to access your system as a server then its necessary for you to be online till the process gets completed.
Decentralized cloud-based storage
You must have heard about Dropbox, it’s simply cloud-based storage. As it is a distributed storage, your data will be stored on the user’s system who gave out their hard drive space for usage unlike centralized servers for cloud services. This does overcome the flaw of IPFS of being online if someone is accessing your data. We can completely rely on this type of storage whereas there are certain flaws associated with this type of storage also like, only static files can be used for storage and as the space for storage is rented, it’s not free of cost.
Structured data is stored in a Distributed database. This kind of database is quick and fault tolerant. But a flaw is associated with this system also. Distributes database faces the Byzantine problem. In this, all the nodes in the database should run the genuine code, if anyone node runs malicious code then there is no central server present here to discard the node or to modify it. Hence the entire database existence will come at stake.
Bigchain DB uses RethinkDB. It is a NoSQL database so it can store huge amount of data and its transaction speed is also very fast. The bigchain team promises to solve the Byzantine problem but it is not achieved because for that we have to modify the basic architecture of the blockchain. In the case of private Blockchain, this is the best-suited option to opt for, but for public blockchain, it is a good option.
Ties DB is the best database system to avail today. It is based on NoSQL, but it gives us some more feature including incentives and responsibility of blocks. In Ties DB, the database will recall the inventor and modifier that block and make them the new owner. So that the owner will be accountable for further processing. Now everyone on the network can read all the records because it is public. This will completely eliminate the Byzantine problem.