当前位置:网站首页>What is data persistence?

What is data persistence?

2022-06-25 04:28:00 Life is sweet and good luck is good

1. What is persistence ?

   In a narrow sense :“ Persistence ” It only means to save the domain object permanently to the database ;

   In a broad sense ,“ Persistence ” Including various operations related to database .

    ● preservation : Permanently save the domain object to the database .

    ● to update : Update the status of domain objects in the database .

    ● Delete : Delete a domain object from the database .

    ● load : According to the specific OID, Load a domain object from the database into memory .

    ● Inquire about : According to specific query conditions , Load one or more domain objects that meet the query conditions from the database into the internal memory .

2. Why persistence ?

   Persistence technology encapsulates the details of data access , Provide object-oriented services for most business logic API.

    ● Through Persistence technology, you can reduce the number of times to access database data , Increase application execution speed ;

    ● High code reusability , Able to complete most database operations ;

    ● Loose coupling , Make persistence independent of the underlying database and the upper business logic implementation , When changing the database, you only need to modify the configuration file without modifying the code .

原网站

版权声明
本文为[Life is sweet and good luck is good]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250220555729.html