There are four
levels defined for ORM quality.
- Pure relational
- Light object mapping
- Medium object mapping
- Full object mapping
Pure relational:
The entire
application, including the user interface, is designed around the relational model and
SQL-based relational operations.
Light object mapping :
The entities
are represented as classes that are mapped manually to the relational tables.The code is
hidden from the business logic using specific design patterns. This approach is successful
for applications with a less number of entities, or applications with common, metadata-driven
data models. This approach is most known to all.
Medium object mapping:
The
application is designed around an object model. The SQL code is generated at
build time. And the
associations between objects are supported by the persistence mechanism, and queries
are specified using an object-oriented expression language. This is best suited for
medium-sized applications with some complex transactions. Used when the mapping
exceeds 25
different database products at a time.
Full object mapping:
Full object
mapping supports sophisticated object modeling: composition, inheritance, polymorphism
and persistence. The persistence layer implements transparent persistence. Persistent
classes do not inherit any special base class or have to implement a special interface.
Efficient fetching strategies and caching strategies are implemented transparently
to the application.
Posted in: