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, roughgly 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 loaded.
We have still included the repetitive code structures (called boilerplate code) in the model layer per class and
per property for constraint validation (checks and setters) and per class for the data storage
destroy. 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 Part 6, we will
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.