Object-Relational Mapping (ORM) consists of a framework that aims to shorten the distance between the object-oriented model and the entity-relational model, creating a bridge (mapping) between them. With the approach, it is possible to construct systems applying object-oriented, whose objects are persisted in a relational database.
An ORM has several basic methods that will perform the interaction between the application and the database, being responsible for some basic tasks, such as CRUD (Create, Read, Update and Delete), for example. In addition, ORM will manage the details of mapping a set of objects to a database.
ORM minimizes the need to write connection codes and SQL queries. In this way, it is possible to obtain a significant reduction in the application codes, generating a more elegant code and consequently increasing the ease of later maintenance in the application.
It is important to make it clear that using an ORM framework does not completely replace the need to use SQL in your application. Although the ORM satisfies most of the database interaction needs, in some cases there will be a need, for example, for more custom queries, which will have to be performed through SQL. by: Bárbara Ranieri
Features of ORMBr
• Clearer business logic when dealing with objects by hiding the entire access database layer
• Complete encapsulation of the persistence mechanism. Adding, changing, and selecting entities in an object-oriented fashion
• Tool for automatic generation of the object model based on the database schema
• Lazy loading of related entities.
• Support Nullable types
• Automatically generated property values
• Save and cascade operations
• Support One-to-one, one-to-many, and many-to-many
• Entity lifecycle management
• Integration with Native ClientDataset
• Data access components that we support:
dbExpress, FireDAC and ZeosLib