| Now the software development usually uses object-oriented software development technology and relational database. However, object-oriented technology and relational database are based on the object model and the relational model respectively. There's a problem of "impedance mismatch" between the two models. To solve this problem, ORM (Object-Relational Mapping) technology emerges.This paper thoroughly studies the ORM technology, combines the technology with the actual demand of an office automation project in Yantai City, Shandong Province, designs and implements a lightweight ORM component—MYPL. The major focuses of this paper are as follows:1. Research on data persistence concept, the object model theory, and the . relational model theoryIt explains the concept of data persistence, studies the theories of the object model and the relational model, and analyzes the cause of the "impedance mismatch" problem between the two models.2. Further the study on the realization of NHibernate technologyIt studies deeply NHibernate, which is widely used as ORM component. It gives the solution to the problem of the "impedance mismatch", and analyzes the solution's strong and weak points.3. Design and implementation of a lightweight ORM component—MYPL on .NET platformFor the weak points of NHibernate, this paper explores an improved ORM model combined with a practical project. According to the model, it designs and implements a lightweight ORM component—MYPL on .NET platform. The component uses reflection mechanism to read entity class metadata expanded by self-defined attributes, without any mapping file. It has the functions that object relation mapping, basic data... |