Database cache implementation method and system
An implementation method and database technology, applied in the field of database cache implementation methods and systems, can solve problems such as increasing software development costs, increasing system risks, dirty data, etc., to achieve intelligent data update, realize intelligent data caching, and solve dirty data. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0146] Embodiment 1 of the present invention is: a method for implementing database cache, which can be applied to all front-end and back-end application programs using database technology. Such as figure 2 shown, including the following steps:
[0147] S101: Create a listener at the transport layer; further, create a listener in a database operation interface or a database connection tool. details as follows:
[0148] a) The application program will have a framework layer, and the business logic will be developed on the basis of this framework layer. The framework layer will provide some common basic functions, including the encapsulation of all operations on the database; just make a hook in these interfaces , all database operations can be captured. The advantage of this method is that it is simple to implement, and because the framework layer has already differentiated the database operation, it saves the parsing operation of the SQL statement in the later stage.
[0...
Embodiment 2
[0163] This embodiment is a further extension of steps S203 and S204 in the first embodiment.
[0164] Such as Figure 4 As shown, "generate the cache corresponding to the SQL statement", that is, the step S203 includes the following steps:
[0165] S2031: Create the first record whose key is the table name, and assign a value; that is, create the first record whose key is "table name".
[0166] S2032: Create a second record whose key is the table name and the condition, and assign a value; that is, create a second record whose key is "table name+condition".
[0167] S2033: Create a third record whose key is the table name and Batch, and assign a value; that is, create a third record whose key is "table name+Batch".
[0168] S2034: Execute the SQL statement in the database server to obtain a corresponding result;
[0169] S2035: Using the SQL statement as a key, using the value of the first record, the value of the second record, the value of the third record, and the corre...
Embodiment 3
[0185] This embodiment is a further extension of step S103 and step S206 in the first embodiment.
[0186] Step S103 also includes, if it is an update operation (UPDATE), execute step S301, and if it is an insert operation (DELETE), execute step S401.
[0187] Such as Figure 6 As shown, if the operation type corresponding to the SQL statement is an update operation, perform the following steps:
[0188] S301: Determine whether the condition corresponding to the SQL statement involves only one piece of data, if not, execute step S302, and if yes, execute step S304; the judgment basis is the same as step S2044.
[0189] S302: Determine whether there is a first record whose key is the table name, if yes, execute step S303, if not, execute step S308.
[0190] S303: Update the value of the first record; execute step S308.
[0191] S304: Determine whether there is a second record whose key is the table name and the condition, if yes, perform step S305, and if not, perform step S...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com