Relational databases are the core of most enterprise applications. However, when you map a relational database to objects, it becomes a challenge. Object relational mapping (ORM) is a programming framework that allows you to define a mapping between an application object model and the relational database.
In an object model, the application objects are not aware of the database structure. Objects have properties and references to other objects. Databases consist of tables with columns that may be related to other tables. ORM provides a bridge between the relational database and the object model.
By using ORM, you can access and update data entirely using the object model of an application. ORM provides features such as:
- Database vendor independence
- Performance optimization