As we can store data in map, why we need to create table for it, and why we need to pay for the fee for create and modify records?

How much is the ram fee, how to avoid it?

If I use map, who will pay for ram fee, if I use multi_index, does user know they will pay for the ram?

1 Answer 1


The Database is just a data structure which resides in RAM. You don't have to use it but it has many convenient methods. It is not a standard relational database like MySQL.

No matter the data structure you choose, you have to allocate RAM for it. Who will pay for the RAM is a separate question, you can have the users pay or you can pay for it. It really depends on the business model you want for the app.

  • How should I allocate RAM directly, I found that each time when execute an action, it will renew a contract instance and all the variable in the class was lost!
    – Jimmy Guo
    Jun 14, 2018 at 11:04
  • Sorry for being unclear. To persist data between execution of actions, you need to use the multi index class. You can create your own data structure but you have to attach it to the (RAM) database system of eos. See this wiki page: github.com/EOSIO/eos/wiki/Persistence-API
    – Ami Heines
    Jun 14, 2018 at 11:13

Your Answer

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

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