| As the core technology and important support of computer-centered information system and application system,database technology has successfully solved the management of massive data information on the basis of the third industrial revolution represented by information technology and the domination of big data in the world.Accord:ingly,database is an indispensable part of current computer software development,that is,all kinds of application software interact with database according to user's requirements,so as to obtain the data needed by users,and how to interact with database by all kinds of computer application software becomes a new challenge.Because of the difference between object-oriented programming technology and the description of data in the underlying relational database,the industry calls it"impedance mismatch"between objects and relational models,and in order to solve the problem of mismatch,Object Relational/Mapping(ORM)came into being.With the standardization of ORM technology,ORM framework is becoming more and more mature.ORM framework provides two kinds of retrieval methods:OID and SQL conditional query.Generally speaking,caching is very important for software system performance optimization.ORM framework also configures the corresponding caching mechanism for both to improve system performance.This research is based on the shortcomings of the Query Cache mechanism of Hibernate ORM framework to optimize the system performance.According to the actual business requirements,the corresponding experiments are carried out,and the AQC data persistence framework is encapsulated for developers to use.In this paper,we propose the concept of "reference column(s)",which originates from "reference data"."Reference column(s)"are concepts based on a column(or some columns)level in a database table,referring to the unique index of non-primary keys that are not modified or rarely modified.In the actual business,there are many business based on "reference column(s)",such as personnel number-based retrieval requirements in personnel management system.The Query interface of the Hibernate ORM framework provides perfect support for the above businesses.However,the Query Cache mechanism of the Hibernate ORM framework has some drawbacks,that is,when the user queries the "reference column(s)",the Hibernate ORM framework stores the retrieved data in the Query Cache,but when any data in the Query Cache is updated,the data in the Cache that belongs to the same database table with the updated data will be invalid.Therefore,when querying other cached data,the Hibernate ORM framework can only retrieve data from the database,although the data in Cache has not been updated.Due to the inadequacy of the ORM framework Query Cache mechanism in conditional query based on "reference column(s)",this paper proposes a scheme to construct auxiliary tables at the database end by analyzing and studying the internal mechanism of Query Cache.By calculating the "reference column(s)",extracted:from the original table to get the unique value as the primary key,the auxiliary table is created.This scheme converts the "reference column(s)" condition query into two OID retrievals,thus avoiding the drawbacks of Query Cache for the "reference column(s)"condition query.In this paper,we use the commodity data set of e-commerce platform to carry out many related experiments on the retrieval methods of auxiliary table,and display the experimental results in various ways.The experimental results show that the method is feasible and can effectively improve the performance of the software system.In this paper,we build a non-intrusive Java persistence framework AQC based on the ORM framework which is the mainstream in the industry.The framework encapsulates the data persistence interface of ORM framework and implements a query scheme based on auxiliary tables.Developers can transparently persist data by configuring certain information without paying attention to Java transactions and specific data access processes. |