38.5. Key Ideas
The following key ideas will be explored in subsequent sections:
- Mapping
There must be some mapping between a class and its persistent store (for example, a table in a database), and between object attributes and the fields (columns) in a record. That is, there must be a schema mapping between the two schemas. - Object identity
To easily relate records to objects, and to ensure there are no inappropriate duplicates, records and objects have a unique object identifier. - Database mapper
A Pure Fabrication database mapper is responsible for materialization and dematerialization. - Materialization and dematerialization
Materialization is the act of transforming a non-object representation of data (for example, records) from a persistent store into objects. Dematerialization is the opposite activity (also known as passivation). - Caches
Persistence services cache materialized objects for performance. - Transaction state of object
It is useful to know the state of objects in terms of their relationship to the current transaction. For example, it is useful to know which objects have been modified (are dirty) so that it is possible to determine if they need to be saved back to their persistent store. - Transaction operations
Commit and rollback operations. - Lazy materialization
Not all objects are materialized at once; a particular instance is only materialized on-demand, when needed. - Virtual proxies
Lazy materialization can be implemented using a smart reference known as a virtual proxy.