ORM in .NET
What is ORM?
ORM stands for Object Relational Mapping. ORM is used to transparently relate objects to Backend data store.
Let us consider the primary decisions that needs to taken for object population.
Represents internal class data as Dataset
Create all the properties with their appropriate types
Perform all translations within properties
Represents collections as specialized classes
Techniques involved in Object Population
Built-in features of ADO.NET Dataset /DataAdapter / Command Builder are used
ADO.NET handles the persistence behind the scenes.
Issues and Limitations
Database Tables would be retrieved individually
1. No joins should be used
2. May degrade retrieval performance
3. Datarelations may need to be created
Properties returning collections need to be aware of the table relations
Data source transparency is hard to achieve
Specialized collection classes may cause maintenance and support issues
May choose to flatten the database Increases performance / Eliminates the needs for joins