I am presently working on a project involving read and write operations on a huge database. The database is structured in such a way that there is a key, and for the key there is a corresponding set of data. Now, I would like to consider each of these operations as transactions in a smart contract. There are two ways of doing this:

  1. Construct a struct that would contain the key as well as the set of data corresponding to the key.

  2. Simply store the keys and a pointer to the set of data stored in an external database. I was thinking of using Oraclize for accessing the database.

If the first option is considered, it is definitely not a practical choice as storing such large data directly on a blockchain is not possible. But if the second option is considered, then isn't the external database prone to tampering, thus having no point to build it on a blockchain.

Effectively, I am looking for building a blockchain based application that deals with Big data keeping the security of the data in mind.

1 Answer 1


Indeed - if the data is not stored and structured properly - it is prone to tampering.

One of the solutions is to store a cryptographic hash in the blockchain and structure your data in such a way that it is possible to reliably calculate the hash to verify it has not been tampered.

You can do it in many different ways - in the end it is going to be something resembling a Merkele tree. IPFS is the most straightforward option - the data is kept in such a way that it is identified by its cryptographic hash that you store in the Ethereum contract.

  • Thank you for the suggestion....but what if the data is still too large considering I store only the key and the hash of the corresponding data?
    – yobro97
    Jul 11, 2017 at 12:36
  • I am not sure I understand what you mean. You can calculate a single hash of a very large dataset. Jul 11, 2017 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.