Database Caching and Invalidation using Database Provided Facilities for Query Dependency Analysis

a database and dependency analysis technology, applied in the field of database caching and invalidation, can solve the problems of increasing performance, affecting the ultimate purpose of the application, and increasing the complexity of the operations performed by and submitted to databases, so as to achieve the effect of preparing to determine dependency information

Inactive Publication Date: 2006-11-30
TERRACOTTA
View PDF20 Cites 209 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Benefits of technology

[0016] A database caching system and related techniques are provided that can reliably maintain and invalidate database data based on actual changes to data in the database. Updates or changes to data at the database are detected without parsing queries submitted to the database. The dependencies of a received query can be determined by submitting a version of the received query to the database through a native facility provided by the database itself to analyze how query structures are processed at the database. The caching system can access the results of the facility to determine the tables or rows (or other data partition) a received query is dependent upon or modifies. In addition to the results of a query that can be cached with an indication of the query itself, an abstracted form of the query can be cached with an indication of the tables, rows, etc. that queries of that structure access or modify. The tables a write or update query modifies can be cached with a time of their last modification. When a query is received for which the results are cached, the system can readily determine dependency information for the query, the last time the dependencies were modified, and compare this time with the time indicated for when the cached results were retrieved. By passing versions of write queries to the database, updates to the database can be detected. In one embodiment, a component is implemented at or on the system of the database to directly detect changes to the database data. This component can monitor transactional information maintained by the database itself to determine when changes to the database occur. This component can communicate with the cache to provide notification of changes to the database.

Problems solved by technology

Without database storage in many of these environments, the task of methodically sorting through the amount of information necessary to access that which is needed would likely frustrate the ultimate purpose of the application to the point of ending many operations.
Of course, the complexity of operations performed by and submitted to databases continues to expand.
This will not only increase the performance as seen by requesting applications or entities, but also decrease the amount of load placed on the database.
An inherent difficulty with database caching is the structured nature of both the data storage and retrieval.
The cache simply looks for an update to the location on the memory volume corresponding to the cached data and when the data at that location changes, the cache can simply invalidate or discard its cached results.
These systems do not cache results based on an actual query.
Because queries may combine or access data from various locations in the database, and request data based on logic that is dependent upon the data stored therein, it is difficult to accurately determine when the previously retrieved results for a query are no longer valid because of changes to data in the database.
While in theory such a technique is useful, in practice it presents obstacles.
Because an intimate knowledge of the database's internal operations and code can not be had, parsing the queries is in many instances deficient or even wrong.
Moreover, individual database providers frequently alter their databases, requiring these parsing techniques to continually be updated as the database is updated.
However, the entries are automatically invalidated after a specified amount of time without any regard to actual changes at the database.
If changes to the database are made between invalidation periods and a request is received, the cache may return invalid results.
Additionally, this technique can degrade performance and efficiency by needlessly invalidating accurate query results.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database Caching and Invalidation using Database Provided Facilities for Query Dependency Analysis
  • Database Caching and Invalidation using Database Provided Facilities for Query Dependency Analysis
  • Database Caching and Invalidation using Database Provided Facilities for Query Dependency Analysis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

Database Caching Intermediary

[0030]FIG. 1 is a block diagram depicting one embodiment of the technology described herein executing in an application server—database server environment. FIG. 1 depicts an application server 102 and database server 122. A variety of applications 104 can be hosted and executed upon application server 102. Applications 104 can be implemented in any suitable language, including but not limited to the Java™ programming language, C++, etc. The application servers on which applications 104 are executed will vary by embodiment, but can support such platforms as the Java™ 2 Platform, Enterprise Edition (J2EE) Platform.

[0031] In one embodiment, servers, processing systems, and other processor based devices as described can include, by way of non-limiting example, one or more processors capable of executing instructions provided on processor-readable media to perform the methods and tasks described herein. The processing system may include a volatile memory, ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

Database data is maintained reliably and invalidated based on actual changes to data in the database. Updates or changes to data are detected without parsing queries submitted to the database. The dependencies of a query can be determined by submitting a version of the received query to the database through a native facility provided by the database to analyze how query structures are processed. The caching system can access the results of the facility to determine the tables, rows, or other partitions of data a received query is dependent upon or modifies. An abstracted form of the query can be cached with an indication of the tables, rows, etc. that queries of that structure access or modify. The tables a write or update query modifies can be cached with a time of last modification. When a query is received for which the results are cached, the system can readily determine dependency information for the query, the last time the dependencies were modified, and compare this time with the time indicated for when the cached results were retrieved. By passing versions of write queries to the database, updates to the database can be detected.

Description

PRIORITY CLAIM [0001] This application claims the benefit of U.S. Provisional Patent Application No. 60 / 684,610, filed May 25, 2005, entitled “Terracotta Virtualization Server”, and incorporated by reference herein in its entirety. CROSS-REFERENCE TO RELATED APPLICATIONS [0002] The following applications are cross-referenced and incorporated by reference herein in their entirety: [0003] U.S. patent application Ser. No. ______, filed concurrently, entitled “Database Caching and Invalidation Based on Detected Database Updates,” by Harward et al., filed concurrently (Attorney Docket No. TERA-01008US0); and [0004] U.S. patent application Ser. No. ______, filed concurrently, entitled “Database Caching and Invalidation for Stored Procedures,” by Harward et al., filed concurrently (Attorney Docket No. TERA-01009US0).BACKGROUND OF THE INVENTION [0005] 1. Field of the Invention [0006] The present invention relates generally to databases and caching systems for databases. [0007] 2. Descriptio...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(United States)
IPC IPC(8): G06F17/30
CPCG06F9/445G06F9/52G06F9/526G06F9/544G06F2209/522G06F11/203G06F17/30306G06F17/3048G06F9/45504G06F11/1479G06F16/217G06F16/24552
Inventor HARWARD, NATHANIEL D.GEWEKE, ANDREW R.VOSKOBOYNIK, ALEXANDER
Owner TERRACOTTA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products