In this chapter, we analyzed basic aspects of an O/R mapping library implementation. Based on this analysis, we can summarise the requirements on the library. Some of the requirements are required while some are optional. We list them for further reference.
Common O/R mapping requirements
Ability to associate persistent classes with database tables
Ability to map attributes of persistent classes to database columns or attributes in instances of user-defined types
Ability to use at least one type of O/R mapping (better all of them):
Horizontal
Vertical
Filtered
Object
Combination of the mapping types
Ability to persist references between objects
Ability to persist collections of objects
Ability to generate required database schema or ability to work with an existing unmodifiable database schema
Querying in the object model context.
Object caching.
Reflection
Modular library architecture