Object-relational mapping is the automatic persistence of objects in object-oriented language programs into relational databases by using metadata that describes the mapping between objects and databases. Essentially converting data from one form to another.
Definition:
Object Relational Mapping (ORM for short) describes the mapping between objects and databases by using Metadata to automatically persist objects in object-oriented language programs into relational databases.
Essentially, it is to convert data from one form to another.
Object/Relation Mapping (ORM) was developed with the development of object-oriented software development methods.
Objects and relational data are two forms of expression of business entities. Business entities are represented as objects in memory and as relational data in the database. There are associations and inheritance relationships between objects in memory, but in the database, relational data cannot directly express many-to-many associations and inheritance relationships.
Therefore, object-relational mapping (ORM) systems generally exist in the form of middleware, which mainly implements the mapping of program objects to relational database data.
For more related knowledge, please visit php Chinese website.
The above is the detailed content of What is object relational mapping. For more information, please follow other related articles on the PHP Chinese website!