2

I'm getting my feet wet in this blockchain world and looking to build a dapp based on Ethereum for maintaining an inventory of products. About 400,000 items that can be updated, removed or added to by anyone on who connects. My initial idea is to store product images and details in swarm (the detail would be a json object with about 100 nodes) and then store the swarm hashes in blocks instead of transactions (or something like that)

My question is, is there any way to query for products that match certain things? For instance, "location" and "type" are examples of some of the things stored in the json hash. If I were to put some of the "searchable" fields into the blockchain, would that be something I could query? (ie: I want to end up with all of the swarm hashes that represent items matching my simple query.

2 Answers 2

1

For performing complex query searches on Ethereum or Swarm/IPFS, you'd need to set up a centralized database to index the content. Swarm/IPFS contain a distributed hash table (DHT) that in simple terms just maps the content identifier (CID) to the content which isn't enough to perform the type of queries you require. You'll need an additional layer for indexing properties of the content to their IPFS location.

1

And, by the way, that is a typical application better implemented by relational databases... do not use worldwide diffused blockchain, hundred of computers collaborating, web3 and developers on work everywhere, documents and data which shall be available “for ever”.. to maintain your shop or shop club inventory!

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.