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
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?