Feature #1: Flexible object mapping - Everything in O/R mapping starts with mapping our objects to our relational tables.
Feature #2: Use your existing domain objects - the O/R mapping tool should let us use our existing domain objects and map and generate only the factory objects. It should use .NET Reflection to read our domain object definition and after we have done the mapping, it should generate the factory objects in such a way that these factory objects use our domain objects to hold all the data.
Feature #3: Transactional operations (CRUD) - A database transaction allows us to group multiple operations as one atomic operation so either all operations succeed or none of them succeed. Transactional operations include create, read, update, and delete (also called insert, update, load, and delete). Each transaction operation is performed only on one row of data in a table.
Feature #4: Relationships and life cycle management - when we map objects to these tables, our objects also need to establish the same relationships with other mapped objects. Therefore, our O/R mapping tool must support this very important feature by letting us determine which relationships we want to keep in our objects.
Feature #5: Object inheritance - Relational databases do not automatically provide inheritance in the relational model. But, there are a number of patterns on how to map object inheritance to a relational database. And, a good O/R mapping tool must provide this capability.
Feature #6: Static and dynamic queries - A database application does is to retrieve rows of data from one or more tables. The application does this done by using SQL queries (SELECT statements). However, an object-oriented application wants to fetch a collection of objects and not rows. So, the O/R mapping tool must provide a way for us to create queries that return collections of objects.
Feature #7: Stored procedure calls - Our SQL does not have to be compiled at runtime because that is a very expensive process. There are numerous situations that an O/R mapping tool must support when it comes to stored procedures
Feature #8: Object caching - Whichever caching product we use, we’ll have to make sure that our persistence objects are making caching calls from appropriate locations. And, our O/R mapping tool should provide the ability to generate code that makes caching calls to one or more leading products.
Feature #9: Customization of generated code - To prevent our code from being overwritten, the O/R mapping tool must allow us to mark our code as “Safe Code” which then does not get overwritten in future code regenerations.
Feature #10: Template customization - Good O/R mapping tool is very likely using code templates to determine how to generate the code. The O/R mapping tool combines the templates it has with a combination of our object mapping input and the database schema information to determine exactly how to generate the code.