Object–relational mapping

As well, objects are managed on-heap and are under full control of a single process, while database tuples are shared and must incorporate locking, merging, and retry.

Compared to traditional techniques of exchange between an object-oriented language and a relational database, ORM often reduces the amount of code that needs to be written.

[2] Disadvantages of ORM tools generally stem from the high level of abstraction obscuring what is actually happening in the implementation code.

Also, heavy reliance on ORM software has been cited as a major factor in producing poorly designed databases.

[citation needed] For this reason, many programmers find themselves more at home with an object-SQL mapping system, even though most object-oriented databases are able to process SQL queries to a limited extent.

[citation needed] A variety of difficulties arise when considering how to match an object system to a relational database.

The Data Access Object (DAO) design pattern is used to abstract these statements and offer a lightweight object-oriented interface to the rest of the application.

They usually mitigate this limitation by providing users with an interface to write raw queries, such as Django ORM.