0

Is this possible to create a d-app for a supply chain management system in such a way that part of its data gets stored on the blockchain and part of it gets stored on a centralised database?

We can take an example of a product object, let's assume it has multiple attributes like its id, name, SKU, and tons of other attributes. Can we store some of its attributes on the blockchain and the rest of them on a database? This is because of the concern of not doing many writes on the blockchain storage because of the gas cost.

Do we have an application that is built around this combo or is this possible to execute?

This is just for a university project. Any research paper or pointer that you can share would be helpful.

1 Answer 1

0

Yes it's possible. Better yet if you select a subset of the fields to store on-chain, you can also store a Merkle hash of the remaining fields for making sure that those values stored in the database can be checked for authenticity.

For example, you can have a struct that has fields to store the name and SKU and a hash. This hash is the merkle root of all the values of remaining fields. You can now create a mapping from the ID to the struct. Using a mapping will help in better access and automatic storage of ID (you don't need a field for ID in the struct).

Your Answer

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

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