Method for managing database
Abstract
Disclosed is a computer program stored in a computer-readable medium according to an exemplary embodiment of the present disclosure. When the computer program is executed by one or more processors, the computer program allows the following operations for data caching to be performed and the operations may include an operation of generating a cache, an operation of caching at least some of the segments and at least one of records to the cache, an operation of reading the cache when receiving an inquiry request from a client, an operation of determining to read a cursor based on whether there is a segment or record corresponding to the inquiry request in the cache; and an operation of determining whether a query for at least one of a relational database and a hierarchical database is generated based on whether there is the segment or record in the cursor.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A non-transitory computer readable medium including a computer program, the computer program causing a computer to perform operations for data caching of a database when executed by one or more processors, the operations include:
reading a cache when receiving an inquiry request from a client;
determining to read a cursor when the cache does not include a segment or a record corresponding to the inquiry request;
determining not to generate a query when the segment or the record corresponding to the inquiry request exists in the cursor; and
determining to generate the query when at least one of the segments or the record corresponding to the inquiry request does not exist in the cursor.
2. The non-transitory computer readable medium according to claim 1 , wherein the cache is generated by allocating a cache space for storing at least a part of segments stored in a hierarchical database.
3. The non-transitory computer readable medium according to claim 2 , wherein the operations further include
caching at least a part of the segments stored in the hierarchical database and at least one of records in the cache.
4. The non-transitory computer readable medium according to claim 2 , wherein the segment is a node in a hierarchical database mapped to a table in a relational database.
5. The non-transitory computer readable medium according to claim 3 ,
wherein the caching at least a part of the segments and at least one of records in the cache includes:
storing the record corresponding to a key condition in the cache when the inquiry request that includes the key condition is received; and
storing at least a part of the segments in the cache when the inquiry request that does not include a key condition is received.
6. The non-transitory computer readable medium according to claim 5 ,
wherein the storing at least a part of the segments in the cache when the inquiry request that does not include a key condition is received includes:
storing a record contained in a parent segment and a child segment of a record included in the parent segment in the cache.
7. The non-transitory computer readable medium according to claim 1 , wherein the operations further include:
removing at least one of records stored in the cache from the cache based on a predetermined criterion.
8. The non-transitory computer readable medium according to claim 1 ,
wherein the reading the cache when receiving an inquiry request from a client includes:
reading a record corresponding to a key condition from the cache when the inquiry request includes the key condition; and
reading a segment corresponding to a parent record identified in the inquiry request from the cache when the inquiry request does not include a key condition.
9. The non-transitory computer readable medium according to claim 1 ,
wherein the determining to read a cursor based on whether a segment or a record corresponding to the inquiry request exists in the cache includes:
determining not to read the cursor and returning a segment or a record corresponding to the inquiry request, when there is a segment or a record corresponding to the inquiry request in the cache.
10. The non-transitory computer readable medium according to claim 1 , wherein the operations further include:
storing in the cache at least a part of the segments or the record, in response to the query or when obtaining a segment or a record from the cursor.
11. A method for data caching of a database, the method comprising:
reading a cache when receiving an inquiry request from a client;
determining to read a cursor when the cache does not include a segment or a record corresponding to the inquiry request;
determining not to generate a query when the segment or the record corresponding to the inquiry request exists in the cursor; and
determining to generate the query when at least one of the segments or the record corresponding to the inquiry request does not exist in the cursor, and
wherein the method is performed by one or more computing devices.
12. A computing device comprising:
a processor including one or more cores; and
a memory;
wherein the processor is configured to:
read a cache when receiving an inquiry request from a client;
determine to read a cursor when the cache does not include a segment or a record corresponding to the inquiry request;
determining not to generate a query when the segment or the record corresponding to the inquiry request exists in the cursor; and
determining to generate the query when at least one of the segments or the record corresponding to the inquiry request does not exist in the cursor.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.