Notice that in this tutorial, we have made the assumption that all application data can be
loaded into main memory (like all book data is loaded into the map
This approach only works in the case of local data storage of smaller databases, say, with not
more than 2 MB of data, roughly corresponding to 10 tables with an average population of 1000
rows, each having an average size of 200 Bytes. When larger databases are to be managed, or when
data is stored remotely, it's no longer possible to load the entire population of all tables
into main memory, but we have to use a technique where only parts of the table contents are
Another issue with the do-it-yourself code of this example app is the boilerplate code needed
per model class for the storage management methods
per model class and property for getters, setters and validation checks.
While it is good to write this code a few times for learning app development, you
don't want to write it again and again later when you work on real projects. In another tutorial, we present an
approach how to put these methods in a generic form in a meta-class called
mODELcLASS, such that they can be reused in all model classes of an app.