About ORM

When we work with object-oriented system, will encounter incompatibility issues between the type of object and relational databases. The management system database relations (RDBMSs) shows data in tabular format, whereas the language object-oriented programming such as Java, C #, C ++ representation of data in graphs link Subjects. ORM is the solution to solve the problem of incompatibility hinders on.

ORM is the acronym for the phrase Object Relational Mapping, is a programming technique for mapping data between relational databases and object in the language object-oriented programming such as Java, C #, ... In particular, the object mapped to the table, the object relational mapping with relevant constraints between tables.

Pros and cons of ORM


Independence: Can be used with many different RDBMS. When change management system database just change drivers interact without having to change any line of code.

Simplicity, ease of use: Compared with the normal way to use SQL to query and process data directly to the database, ORM provides APIs simple and very easy to use.

Save time programming, source code concise, easy to understand, easy to maintain


Due to a genetic auto-ORM SQL statements should be hardly possible to optimize the impact on the statement.

The session management is complicated