关键词: 面向对象,关系数据库,持久化,对象关系映射
A Design and Implementation of ORM with .NET
Abstract
There is great difference between Object-Oriented Design and Database System Design, because of the Impedance Mismatch between Object Model and Relation Model. Object-oriented design theory includes packaging, relevance, polymerization, inheritance and polymorphism, while Relation Database System(RDBS) mainly focusing on data storage, based on a mathematical relation model. We hope to accomplish business processes through the design of object-oriented methods, this is available. However, it must be considered that how to storage the data. If the storage medium is relational database, the contradictions occur when save the object data as a relation model. This is the main reason we need O-R Mapping which is a bridge between object and relational database. ORM includes object level mapping, object relation mapping and object persistence. It tries to map the entities state to the RDBMS data, in order to support a series of transparent persistency operations.