DApp storage for data other than tranactions

by ethtrader   Last Updated August 28, 2017 18:28 PM

For the purpose of illustration, say I would like to create a decentralized version of Yelp.

A centralized approach would be to have a restaurants table and a reviews table in an Mysql database. In the case of a DApp, what is the best practice for storing non-transactional data?

My current thinking to have a Restaurant.sol contract and a Review.sol contract, each having a mapping from the record ID as key, to the record object as value. Every time a restaurant is added, we invoke a addRecord() method in Restaurant, which adds the new restaurant data to its current mapping. (Similar flow for Review)

Is this approach of treating a contract like a RDBMS table robust? Or am I missing something?

What's the limit to the amount of data that can be stored in the mapping of a contract?

Please advise.



Related Questions




I want to create a Dapp, but I'm not a programmer

Updated March 26, 2018 20:28 PM

Checking if Contract Withdrawal Is Allowed

Updated July 14, 2018 22:28 PM