Introducing entity modeling
Entity modeling is not a new concept. It is an age-old practice employed whenever large amounts of data are stored in any system. Entity modeling is used for data stores, such as SQL Server and Oracle. Entity modeling is required for two reasons:
- Increase the performance of an application while reading and writing data to a data store.
- Optimize storage to reduce the cost of storage.
Data stores such as SQL Server or Oracle do not have a cost associated with them while reading and writing data. However, Ethereum has a cost of 5,000 gwei for reading and 20,000 gwei for writing data. There is a recurring cost every time data is accessed.
Entity modeling refers to determining the global storage for smart contracts that serve a particular use case.
Ethereum storage
Ethereum provides multiple types of storage:
- Global storage: This is permanent storage in Ethereum and the data is persisted permanently. This data can be read in...