Persistence mappers

Background

Persistence mapping, also known as object-relational mapping (ORM), is a technique used in MDriven to map objects in an object-oriented programming language to relational database tables. The goal of persistence mapping is to make it easier for programmers to work with data stored in databases by allowing them to use familiar object-oriented programming concepts to access and manipulate that data.

Persistence mapping works by creating a mapping between each class in the programming language and a corresponding table in the database. The attributes of each class are mapped to columns in the table, and the methods of the class are mapped to the SQL statements used to manipulate the data in the table.

MDriven provide an abstraction layer between the application and the database, allowing programmers to work with the database using familiar object-oriented programming concepts like classes, objects, and inheritance. The MDriven framework takes care of translating the object-oriented programming constructs into SQL statements that are be executed by the database.

Persistence mapping provides several benefits, including:

  1. Simplified data access: By providing a simpler and more intuitive interface for accessing and manipulating data in databases, persistence mapping can make it easier for developers to work with databases and reduce the amount of boilerplate code required to interact with them.
  2. Abstraction from database implementation details: Persistence mapping provides an abstraction layer between the application and the database, allowing developers to work with data using object-oriented programming concepts, without having to worry about the underlying implementation details of the database.
  3. Improved portability: By abstracting away the implementation details of the database, persistence mapping can make it easier to switch between different database platforms or even different data storage mechanisms, without having to change the application code.

Overall, persistence mapping is a powerful technique that can simplify data access and make it easier to work with databases in object-oriented programming languages. By providing an abstraction layer between the application and the database, persistence mapping can help developers write more maintainable, portable, and scalable code.

MDriven build in peristence mappers

As XML file

Saves all of the objects in the database by serializing the objects to XML

SQL Server

MySQL

This page was edited 1 days ago on 05/03/2024. What links here