How is Blockchain a distributed database

+4 votes

In most places blockchain is cited as a distributed database. Does it mean we can store any type of data in blockchain like audio, video, pdf?

Mar 26, 2018 in Blockchain by Perry
• 17,100 points

edited Mar 26, 2018 by Perry 1,555 views

5 answers to this question.

+2 votes
Best answer

Think of blockchain as a relatively slow, very expensive database that provides excellent resistance to hacking and corruption. It's a Write-Once, Read Mostly (WORM) system.

You absolutely could store any data you want in a hypothetical blockchain. The practical limits are, you don't want to store very large chunks of data (so, not video); you probably don't want to store frequently changing data (so, not a thesis paper you're revising) -- unless it's important somehow to record every single change forever.

Because, its other feature is, once something is written to a blockchain, it's there forever.

Need to fix a typo? Then you add a new record with a correction.

Need to delete a record? Too bad, you can't. Best you can do is enter a new record saying that the record you wish to delete is "obsolete" or "repudiated" or "no longer valid" or "should be considered as deleted."

In short, it's wise to treat your blockchain as a permanent record.

  1. Slow: the Bitcoin blockchain runs about 3 transactions per second (tps) and the Ethereum blockchain runs about 30 tps.
  2. Expensive: the Bitcoin blockchain cost an average of US$ 8.22 per transaction in November 2017
To learn more about the blockchain, join Blockchain Course today.
answered Mar 26, 2018 by Christine
• 15,790 points

selected Aug 3, 2018 by Omkar
+1 vote

Yes, it is possible. The simplest way would be to define a contract with two attributes, an address used for access control (so that only an account that you control can write to the contract) and a byte array for the actual storage container:

contract Storage {

   address owner = 0xdeadbeef...; // <= define the address you control (have the private key to)

   bytes32[] storageContainer;

   function pushByte(bytes32 b) {
      storageContainer.push(b);
   }

}

You don't really need a getter method as it is sufficient to synchronize with the block chain in order to retrieve the data stored in the contract.

answered Oct 11, 2018 by Sabina
+1 vote
Systems like Storj, Sia, Filecoin, and Bittorrent break files up into little pieces and store them in computers all over the Internet. They all use technologies commonly used in blockchain systems (merkle trees, hashes, digital signatures). None of them are actually blockchains.
answered Oct 11, 2018 by Suraj
+1 vote

You can’t store digital documents on the blockchain per-se. If you mean to store in the sense of Dropbox then no, but there are a few companies who use the blockchain in order to support file storage.

answered Oct 11, 2018 by Donut
+1 vote

What you can do though is store a file and hash it. That hash is what is saved in the blockchain. You upload a file, the blockchain takes that file and uses a unique algorithm to generate a hash. Although you can’t retrieve the file because of the nature of hashes, which is a one way encryption, it can only be used as a digital stamp as to say “This file was uploaded”.

answered Oct 11, 2018 by Firoz

Related Questions In Blockchain

0 votes
0 answers

Is Blockchain a distributed database?

I have noticed that most of the ...READ MORE

Apr 4, 2022 in Blockchain by Soham
• 9,710 points
393 views
0 votes
1 answer

How secure is to implement blockchain at a smaller scale??

Blockchain relies on the number of nodes ...READ MORE

answered Apr 18, 2018 in Blockchain by Perry
• 17,100 points
784 views
0 votes
1 answer

In a Blockchain, how difficult is it to modify the third to last block?

Technically, it's not difficult at all, all ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,790 points
1,020 views
+1 vote
1 answer

Is it possible to store blockchain in a sql or no-sql database?

Currently, following are the options to store ...READ MORE

answered Apr 21, 2018 in Blockchain by Perry
• 17,100 points

edited Aug 9, 2018 by Omkar 1,126 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,916 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,445 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,417 views
+1 vote
1 answer

How is a smart contract stored on a Blockchain?

Smart contract template and transaction events are ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
1,085 views
+1 vote
8 answers

How is Blockchain a linked list?

Blockchain is similar to Single Linked List ...READ MORE

answered Aug 3, 2018 in Blockchain by Omkar
• 69,220 points
13,566 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP