I started to code a smart contract which was supposed to store some datas from corporations. These datas (mostly names and dates) were organized like that :
├── Client1(Contract)
│ ├── Year2018 (Struct containing string,uint and struct)
│ │ ├── Case 1 (Struct containing string)
│ │ └── Case 2 (Struct containing string)
│ └── Year2017
│ └── Case 1 (Struct containing string)
├── Client 2
│ └── Year2018
│ ├──Case1 (Struct containing string)
│ └──Case2 (You got it)
I managed to make a contract to fill these structs. Therefore , I realized that this process was way too heavy and costly. It won't be a problem if my project interact with a centralized database , the blockchain is used for verifications purpose only.
Few people on this forum suggested me to "hash the datas and store them on a DB". I think that would be a great solution but I can't get how to setup this ...
How would I store the above structure of data on a DB ? How would I upload the datas first (Is it from DB to smart contract or the contrary ? ) ? Would it be possible to visualize the datas on a block eplorer ?
Please ask if you didn't get something in what I said :) Thank you very much and have a good day
- I gather the informations of my clients in a json format ( and I store it in a DB ).
- My smart contract parse the JSON , hash each of the case ( struct of datas ) , and store the hash.
- On my website , I display the datas from my DB , and provide the associated hash for each cases ( with web3 from my contract )
– Lucas Lareginie Oct 22 '18 at 10:22