User Avatar

Defi Darko

Web3.0 General

4y ago

Welcome to my social blog about DeFi and Web3 development

Blockchain is to a database as the Internet is to LANs
Defi Darko

We've all seen the analogies comparing blockchain with traditional databases because they're both used for storing data. But in my opinion, that is the one and only commonality. I love databases and they will always have their place, even in the Web3.0 world, but we must stop comparing them to blockchains.

Blockchains are only powerful if they are shared

Blockchains are the most useful when there are multiple apps connected to them and they can all interact with each other. Just like the Web we all know and love. There's only one and all apps are there.

In the Web 3.0 world there is space for multiple blockchains, and many bridges between them. But in order for a general blockchain to survive, it must have multiple apps built on top of it.

Any distributed network will have hardware limitations

No matter the consensus algorithm, blockchains are worldwide distributed databases (pun intended).

Everything you store must be replicated across thousands of servers online which makes it inherently expensive because of the bandwidth and hdd storage requirements.

Data structure

Relational databases store tables.

NoSQL databases store Documents or Json data. Other DBs store key-value pairs.

The most popular Blockchains that are based on Ethereum usually store snapshots of its state. Smart Contracts can be considered as simple objects from OO programming, and their state can be updated with every transaction on the blockchain.

Within Smart contracts you can store structs, mapping, arrays and primitive types. But you can do a lot with these.

What to store on blockchains

We want to store only information that needs to be easily verifiable by the public and useful for to prove something.

  • Balance of tokens

  • Ownership of NFTs

  • Records of payments made

  • Records of any important action, like token deposits and withdrawals.