Database management method, database management system and database management program

In a database management method, a first database management apparatus comprises a list which holds storage location information indicating a write destination in a second database for data which is added to a first database, the method comprising a first step whereby, when optional data is added to the first database, the first database management apparatus appends the storage location information from the first list to the data, a second step whereby the first database management apparatus transmits the data to which location information has been appended to second database management apparatus and issues a request to add the data to the second database management apparatus, and a third step whereby the second database management apparatus adds the data to the location in the second database indicated by location information appended to the data in response to the data addition request.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application is a US national phase application of PCT Application PCT/JP2010/001527 filed Mar. 4, 2010 which claims priority from Japan Application 2009-263031, filed Nov. 11, 2009. All of the aforesaid applications are incorporated herein by reference in their entirety as if fully set forth herein.

TECHNICAL FIELD

The present invention relates to a database management method, a database management system and a database management program and, more particularly, to data replication between an in-memory database and an on-disk database.

BACKGROUND ART

Conventionally, in order to provide a high-speed response to an access request, an in-memory database (hereinafter called an “in-memory DB”) affords data residency in a volatile memory, for example, so that time-consuming I/Os to and from an external storage apparatus are not performed or are limited.

By the way, in a database management system, because data disappears from a memory when a system stops, the in-memory DB backs up data to an on-disk database (hereinafter called “on-disk DB”) which holds data in an external storage apparatus.

In order to back up data to the on-disk DB, data replication technology which matches the data of the in-memory DB with that of the on-disk DB is required.

In a technology of the data replication, Non-PTL4 discloses a technology which uniquely identifies a record which corresponds to each of the records in the data of the database from data of another database by using an unique index which are defined in tables of two databases to be replicated.

The unique index used in the above data replication technology may not exist in an user database design. In this case, there are problems such as an increase in a labor of the user adding the unique index to the database, an increase in the usage amount of the external storage apparatus due to storing the unique index, and an increase in processing overhead due to updating the unique index.

Against these problems PTL1 discloses a technology which obviates the need to define an unique index by creating a mapping table for physical storage location information between different databases.

Furthermore, when a record is added to the data replication source, not only the data replication source is accessed but also the data replication destination is accessed, physical storage location information, which the data replication destination acquires determined, so that the data replication of the record is completed.

As described in Non-PTL2 and 3 (Non-PTL3 is a translation of Non-PTL2 in Japanese), this is because unused area information is referenced to determine the physical storage location information which is the record addition destination in order to hold information of the unused area in the database.

CITATION LIST

Patent Literature

SUMMARY OF THE INVENTION

Technical Problem

However, with the technology of PTL1, it is not possible to delete information, which is used during the data replication such as SQL etc. executed in the data replication destination, by the data replication is completed, for preparing a re-execution when data replication is failed due to a fault etc. in the external storage apparatus of the data replication destination.

At this point, in order to use an in-memory DB in a system where a large amount of data is processed at high speed as described above, an addition of records may continuously be required. Accordingly, once data replication is delayed, information used during the data replication is accumulated without being deleted and, as a result of the capacity of the external storage apparatus being compressed, output of new information is no longer possible and a record cannot be added to the in-memory DB.

The present invention was conceived in view of the above points and proposes a database management method, a database management system and a database management program which enable to perform data replication at high speed during data replication when records are added to an in-memory DB and to continuously accept the addition of records to the in-memory DB.

Solution to Problem

In order to solve this problem, an aspect of the present invention provides a database management method for a system in which a first database management apparatus including a primary memory where a first database is disposed and a second database management apparatus including a secondary memory where a second database is disposed are connected via a network and the first and second database management apparatuses copy stored data to and from one another, the first database management apparatus including a first list which holds storage location information indicating a write destination in the second database for data which is added to the first database, the database management method comprising a first step whereby the first database management apparatus, when optional data is added to the first database, appends the storage location information from the first list to the data; a second step whereby the first database management apparatus transmits the data to which the storage location information has been appended to the second database management apparatus and issues a request to add the data to the second database management apparatus; and a third step whereby the second database management apparatus adds the data to the storage location in the second database indicated by the storage location information appended to the data in response to the data addition request from the second database management apparatus.

Furthermore, an aspect of the present invention provides a database management method for a system in which a first database management apparatus including a primary memory where a first database is disposed and a second database management apparatus including a secondary memory where a second database is disposed are connected via a network and the first and second database management apparatuses copy stored data to and from one another, wherein the first database management apparatus comprises a first list which holds storage location information indicating a write destination in the second database for data which is added to the first database, wherein the first database management apparatus, when optional data is added to the first database, appends the storage location information from the first list to the data, transmits the data to which the storage location information was appended to the second database management apparatus, and issues a request to add the data to the second database management apparatus, and wherein the second database management apparatus adds the data to the storage location in the second database indicated by the storage location information appended to the data in response to the data addition request from the first database management apparatus.

In addition, an aspect of the present invention provides a database management program causing a first database management apparatus, which is connected to a second database management apparatus including a secondary memory where a second database is disposed and which comprises a primary memory where a first database is disposed and comprises a first list holding storage location information indicating a write destination in the second database for data which is added to the first database, to execute a first step of, when optional data is added to the first database, appending the storage location information from the first list to the data; and a second step of transmitting the data to which the storage location information has been appended to the second database management apparatus and issuing a request to add the data to the second database management apparatus.

Advantageous Effects of Invention

With the present invention, it is possible to provide a database management method, a database management system and a database management program which enable to continuously accept the addition of a record to a first database.

DESCRIPTION OF EMBODIMENTS

An embodiment of the present invention will be described in detail hereinbelow with reference to the drawings.

(1) Hardware Configuration of Database Management System in the Present Embodiment

InFIG. 1,1generally refers to the database management system according to the present embodiment. The database management system1is coupled via a network5to an in-memory DB management apparatus2(equivalent to a “first database management apparatus”), an on-disk DB management apparatus3(equivalent to a “second database management apparatus”), and a terminal apparatus4. Furthermore, the on-disk DB management apparatus3is connected to an external storage apparatus6.

The in-memory DB management apparatus2performs management in a case where there is an access request to access the in-memory database236from the terminal apparatus4and performs copying to an on-disk DB63(equivalent to a second database) in a case where there is a change in the data of the in-memory database236, and so on.

The CPU21is a processor which governs operations control of the whole in-memory DB management apparatus2and executes the processing required on the basis of various control programs which are stored in the memory23. The interface22is connected to the network5and performs protocol control during communications between the on-disk DB management apparatus3or the terminal apparatus4and the in-memory DB management apparatus2.

The memory23is configured from a semiconductor memory or a hard disk or the like and, in addition to being used to save control programs such as the OS (Operating System), is also used as the working memory of the CPU21. Further, the memory23stores a DB access request unit231, a DB access processing unit232, a location information management unit233, a reserved list235(equivalent to “first list”), and an in-memory DB236(equivalent to “first database”).

The DB access request analysis unit231analyzes the request from the terminal apparatus4or the on-disk DB management apparatus3and, according to the analyzed request, issues a request for access to the in-memory DB236to the DB access processing unit232.

The DB access processing unit232accesses the in-memory DB236according to the request from the DB access request analysis unit231.

If the access request to the in-memory DB236is for the addition of a record, the location information management unit233acquires physical storage location information indicating the write destination in the on-disk DB63of the record added to the in-memory DB236from the reserved list235.

On an aside, in the present embodiment, although an example in which the physical storage location (for example, the physical address of the HDD or the like) is applied as data storage location information is described, logical storage location information (for example, the logical address of a logical volume configured from a HDD or the like) may also serve as the data storage location information.

If the in-memory DB236is subject to an update, addition, or deletion or the like, the data replication request unit234issues a request to the on-disk DB management apparatus3to copy the update, addition or deletion to the on-disk DB63(“equivalent to second database”).

The reserved list235stores physical storage location information which indicates the copy destination in the on-disk DB63of the record added to the in-memory DB236. Describing the explanation in detail, as shown inFIG. 2, the reserved list235is formed as a table format, and configured from a reserved physical storage location information field2351which shows the copy destination in the on-disk DB63of the record added to the in-memory DB236, a state field2352which shows the state thereof (in use or unused), a reserved physical storage location information count field2353, and an in-use physical storage location information count field2354. Furthermore, the reserved list235is created on the basis of the reserve instruction list61described later.

The in-memory DB236is a database formed in semiconductor memory and, as shown inFIGS. 5 and 6, comprises a table2361and an index2362.

The table2361is configured from data and information on the physical storage location of the data in the on-disk DB63corresponding to the data. The index2362is used to retrieve the data in the table2361and here information on the physical storage location of the data in the on-disk DB63is used.

The on-disk DB management apparatus3issues inquiries to the on-disk DB63where the external storage apparatus6is stored and performs management of the whole on-disk DB63such as resource management. Furthermore, the on-disk DB management apparatus3comprises a CPU31, an index32, a memory33, and an external storage apparatus I/O interface34.

The CPU31is a processor which governs operations control of the whole on-disk DB management apparatus3and executes the required processing on the basis of various control programs which are stored in the memory33. The interface32is connected to the network5and performs protocol control during communications between the in-memory DB management apparatus2or terminal apparatus4and the on-disk DB management apparatus3.

The memory33is configured from a semiconductor memory and hard disk or the like and, in addition to being used to hold a control program such as an OS (Operating System), is also used as the working memory of the CPU31. Further, the memory33stores a DB access request unit331, a DB access processing unit332, a location information management unit333, a data replication request unit334, a reserve instruction list buffer335, and a DB buffer336.

The DB access request analysis unit331analyzes requests from the terminal apparatus4or in-memory DB management apparatus2and requests access to the on-disk DB63to the DB access processing unit332.

The DB access processing unit332accesses the on-disk DB63via the DB buffer336according to the request from the DB access request analysis unit331.

If the access request to the on-disk DB63is for the addition of a record, the location information management unit333refers to the reserve instruction list61via the reserve instruction list buffer335and acquires physical storage location information which has not been registered in the reserve instruction list61(equivalent to “second list”).

If there is an update in the on-disk DB63, the data replication request unit334issues a request to the in-memory DB management apparatus2to copy the update to the in-memory DB236.

The on-disk DB management apparatus3is connected via the I/O interface250to the external storage apparatus6.

The external storage apparatus6stores the reserve instruction list61, the location information reserve parameter file62, and the on-disk DB63.

As shown inFIG. 3, the reserve instruction list61is configured from a physical storage location information field611which indicates the copy destination in the on-disk DB63of the record added to the in-memory DB236reserved by the user and a reserve unit field612which shows the units of this size. The on-disk DB management apparatus3refers to the reserve instruction list61via the reserve instruction list buffer335. The reserve units are the units with which the user reserves the physical storage location and are any of files, extents, pages, and records. At this point, files are units for storing data in the database as a single cluster in the external storage apparatus6. Extents are units which for allocating area in the files and are configured from one or more pages. The page is an I/O unit of the external storage apparatus and is configured from one or more records.

The location information reserve parameter file62is a file created in advance in order for the user to reserve physical storage location information. The reserve instruction list61is created by reading a plurality of location information reserve parameter files62. In the location information reserve parameter file62, reserved physical storage location information is registered at each table. In addition to record units, reserve units may be designated as units which bundle a plurality of records such as a file, extent and page. For example, in the example shown inFIG. 4, in the location information reserve parameter file62with the name “Table 1”, “#3-1”, #3-2”, and #3-3” are reserved at a record unit, “#5” and “#6” are reserved as a page unit, “EXT3” is reserved as an extent unit, and “FILE2” is reserved as a file unit.

The on-disk DB63is formed in a hard disk device and comprises a table631as shown inFIGS. 5 and 6. The table631holds each of the data in each of the storage locations indicated by the physical storage location632. On an aside, in the present invention, an example is explained in the present embodiment in which the on-disk DB63is formed in a hard disk device, however, a variety of storage devices can be applied as long as same function as storage areas of secondary storage memory, if the memory23of the in-memory DB management apparatus2is placed as a primary storage memory. For example, an optical disk or nonvolatile semiconductor device (an SSD (Solid state disk), for example) or the like may also be used. In the present embodiment, “disk” is regarded to include a rotating magnetic disk (HDD or the like), an optical disk, and a nonvolatile semiconductor device.

(2) Outline of Operation of Database Management System

Next, the outline of an operation of the database management system1will be described referring toFIGS. 5 and 6.

If an addition request to add a record (“CCC” in the example inFIG. 5) is received, the in-memory DB236adds the record “CCC” to the table2361together with reserved physical storage location information “#3-1” which is acquired by referencing the index2362and the reserved list235.

Thereafter, the in-memory DB236appends the physical storage location information “#3-1” to the record “CCC” and transmits same to the on-disk DB63, and issues an addition request to add the record to the on-disk DB63.

The on-disk DB63receives the record addition request and adds the record “CCC” to the location indicated by the physical storage location information “#3-1” in table112.

As mentioned above, the database management system1refers to the reserved list235when adding the record to the in-memory DB236and determines the physical storage location information632of the on-disk DB63which is the data replication destination. As a result, the replication destination can be discriminated by the in-memory DB management apparatus236which is the data replication source even without referring to the table631of the on-disk DB63, and the data replication performance can be improved.

Also, if an addition request to add a record (“DDD” in the example ofFIG. 6) is received, the on-disk DB63adds the record “DDD” to the table631. At this time, the on-disk DB63refers to the reserve instruction list61via the reserve instruction list buffer335so that the record is not stored in a physical storage location (“#3-1”, “#3-2” and “#3-3” in the example ofFIG. 6) registered in the reserve instruction list61.

Afterward, the on-disk DB63appends physical storage location information113(“#4-1” in the example ofFIG. 6) which indicates the location where the record “DDD” is stored to the record “DDD” and transmits same to the in-memory DB236and issues a request to add the record “DDD” to the in-memory DB236.

The in-memory DB236receives the addition request to add the record “DDD” and adds the record “DDD” and the physical storage location information “#4-1” to an unused area of the table2361. Furthermore, the in-memory DB236adds the physical storage location information “#4-1” to the index2362.

As mentioned above, if a record is added to the on-disk DB63, the database management system1configures the physical storage location information632of the on-disk DB63, which is the addition destination of the record, in the table2361of the in-memory DB236. The record added to the in-memory DB236does not utilize the reserved physical storage location information and there is no need to change the reserved list235.

(3) Specific Processing of Database Management system1

(3-1) In-Memory Database Update Processing

At this point, update processing to update the in-memory DB236if there is an update request to update the in-memory DB236from the terminal apparatus4will be described with reference toFIG. 7.

Initially, when the in-memory DB management apparatus2receives an update request SQL from the terminal apparatus4, the DB access request analysis unit231of the in-memory DB management apparatus2performs an analysis of the update request SQL for the in-memory DB236from the terminal apparatus4and determines the SQL type (SP101), and discriminates whether the SQL type is Addition, Update or Deletion (SP102).

If the SQL type is Addition in Step SP102, the DB access processing unit232determines the record addition destination (SP103). The location information management unit233refers to the reserved list235and acquires one reserved physical storage location information item from the top of the reserved list104(SP104) and the DB access processing unit232adds the acquired reserved physical storage location information and the record to the table2361(SP105), and advances to Step SP114.

If the SQL type is Update in Step SP102, the DB access processing unit232selects a record to update (SP106) and discriminates whether the selected record exists (SP107). If a negative result is obtained in Step SP107(SP107: NO), [the DB access processing unit232] ends the processing. If an affirmative result is obtained in Step SP107(SP107: YES), the location information management unit233refers to the index2362and acquires physical storage location information (SP108) and the DB access processing unit232updates the record in the table2361(SP109) and advances to Step SP114.

In a case where the SQL type is Deletion in Step SP102, the DB access processing unit262selects the record to delete (SP110) and discriminates whether the selected record exists (SP111). If a negative result is obtained in Step SP111(SP111: NO), the DB access processing unit262ends the processing. If an affirmative result is obtained in Step SP111(SP111: YES), the location information management unit263refers to the index2362and acquires physical storage location information (SP112) and the DB access processing unit262deletes the record in the table2361(SP113) and advances to Step SP114.

After the record has been added, updated or deleted in Steps SP105, SP109, and SP113, the data replication request unit234generates a data replication SQL for performing data replication on the on-disk DB111(SP114). However, the data replication SQL contains records to which the acquired physical storage location information has been appended. Further, the data replication request unit234transmits the data replication SQL to the on-disk DB management apparatus3and requests execution thereof (SP115).

Thereafter, the in-memory DB management apparatus2discriminates whether the processing of all the records in the SQL is complete (SP116). If an affirmative result is obtained in Step SP116(SP116: YES) and ends the processing. If a negative result is obtained in Step SP116(SP116: NO), and repeats the processing starting with Step SP102.

Next, processing to copy to the on-disk DB63when the in-memory DB236is updated will be explained referringFIG. 8.

If the DB access request analysis unit331of the on-disk DB management apparatus3receives the data replication SQL which the in-memory DB management apparatus2transmits in Step SP115(SP201), the DB access request analysis unit331performs analysis of the data replication SQL for the on-disk DB63and determines the SQL type (SP202) and discriminates whether the SQL type is Addition, Update or Deletion (SP203).

If the type of the data replication SQL is Addition in Step SP203, the DB access processing unit332discriminates the addition destination of the record contained in the data replication SQL from the physical storage location information contained in the data replication SQL (SP204). Further, the DB access processing unit332adds a record to the addition destination determined in Step SP204in table631(SP205) and advances to Step SP212.

If the SQL type is Update in Step SP203, the DB access processing unit332selects the record to be updated (SP206), and discriminates whether the selected record exists (SP207). If a negative result is obtained in Step SP207(SP207: NO) and ends the processing. If an affirmative result is obtained in Step SP207(SP207: YES), the DB access processing unit332updates the records stored in the storage location indicated by the physical storage location information contained in the data replication SQL in table631(SP208) and advances to Step SP212.

If the SQL type is Deletion in Step SP203, the DB access processing unit332selects the record to delete (SP209) and discriminates whether the selected record exists (SP210). If a negative result is obtained in Step SP210, the DB access processing unit332ends the processing (SP210: NO). If an affirmative result is obtained in Step SP210(SP210: YES), the DB access processing unit332deletes the record stored in the storage location indicated by the physical storage location information contained in the data replication SQL in the table631(SP211) and advances to Step SP212.

After the record is added, updated, or deleted in Step SP205, SP208, and SP211, the on-disk DB management apparatus3discriminates whether the processing is complete for all the records in the SQL (SP212). If an affirmative result is obtained in Step SP212(SP212: YES), the on-disk DB management apparatus3ends the processing. If a negative result is obtained in Step SP212(SP212: NO), the on-disk DB management apparatus3repeats the processing starting with Step SP203. The update of the in-memory DB236is replicated to the on-disk DB63as above mentioned.

(3-3) On-Disk Database Update Processing

Next, processing to update the on-disk DB63if there is an update request to update the on-disk DB63from the terminal apparatus4will be described later referringFIG. 9.

Initially, when the on-disk DB management apparatus3receives an update-system SQL for the on-disk DB63from the terminal apparatus4, the DB access request analysis unit331of the on-disk DB management apparatus3performs an analysis of the received update request SQL, determines the SQL type (SP301), and discriminates whether the SQL type is Addition, Update or Deletion (SP302).

If the SQL type is Addition in Step SP302, the DB access processing unit332determines an addition destination of the record (SP303). The location information management unit263refers to the reserve instruction list61and discriminates whether the addition destination matches the physical storage location information with the reserve instruction (SP304). If an affirmative result is obtained in Step SP304(SP304: YES), and returns to Step SP303. If a negative result is obtained in Step SP304(SP304: NO), the location information management unit263adds the record to the addition destination determined in Step SP303(SP305) and advances to Step SP314.

If the SQL type is Update in Step SP302, the DB access processing unit332selects the record to update (SP306) and discriminates whether the selected record exists or not (SP307). If a negative result is obtained in Step SP307(SP307: NO), the DB access processing unit332terminates the processing. If an affirmative result is obtained in Step SP307(SP307: YES), the location information management unit333acquires the physical storage location information (SP308) and the DB access processing unit332performs a record update (SP309).

If the SQL type is Deletion in Step SP302, the DB access processing unit332selects a record to delete (SP310) and discriminates whether the selected record exists or not (SP311). If a negative result is obtained in Step SP311(SP311: NO), the DB access processing unit332ends the processing. If an affirmative result is obtained in Step SP311(SP311: YES), the location information management unit333acquires physical storage location information (SP312) and the DB access processing unit332deletes the record (SP313).

After the record has been added, updated or deleted in Steps SP305and SP309, and SP313, the data replication request unit334generates a data replication SQL for performing data replication on the in-memory DB236(SP314). However, the data replication SQL contains records to which the addition destination physical storage information or the acquired physical storage location information has been appended. Further, the data replication request unit334transmits the data replication SQL to the in-memory DB management apparatus2and requests the execution above (SP315).

Thereafter, the on-disk DB management apparatus3discriminates whether the processing is complete for all the records in the SQL (SP316). If an affirmative result is obtained in Step SP316(SP316: YES), the on-disk DB management apparatus3ends the processing. If a negative result is obtained in Step SP316(SP316: NO), the on-disk DB management apparatus3repeats the processing starting with Step SP302.

Next, Committing processing to the in-memory DB236if there is an update to the on-disk DB63will be described later referringFIG. 10.

If the DB access request analysis unit231of the in-memory DB management apparatus2receives the data replication SQL transmitted by the on-disk DB management apparatus3in Step SP315(SP401), the DB access request analysis unit231performs analysis of the data replication SQL for the in-memory DB236, determines the SQL type (SP402), and discriminates whether the SQL type is Addition, Update or Deletion (SP403).

If the data replication SQL type is Addition in Step SP403, the DB access processing unit232discriminates the record addition destination contained in the data replication SQL from the physical storage location information contained in the data replication SQL (SP404). Furthermore, the DB access processing unit232adds the record to the addition destination discriminated in Step SP404in the table2361(SP405), and advances to Step SP412.

If the SQL type is Update in Step SP403, the DB access processing unit232selects a record to update (SP406) and discriminates whether the selected record exists or not (SP407). If a negative result is obtained in Step SP407(SP407: NO), [the DB access processing unit232] ends the processing. If an affirmative result is obtained in Step SP407(SP407: YES), the DB access processing unit232updates the record stored in the storage location indicated by the physical storage location information contained in the data replication SQL in the table2361(SP408), and advances to Step SP412.

In a case where the SQL type is Deletion in Step SP403, the DB access processing unit232selects the record to delete (SP409) and discriminates whether the selected record exists or not (SP410). If a negative result is obtained in Step SP410(SP410: NO), the processing is terminated. If an affirmative result is obtained in Step SP410(SP410: YES), the DB access processing unit232deletes the record stored in the storage location indicated by the physical storage location information contained in the data replication SQL in the table2361(SP411) and advances to Step SP412.

After the record has been added, updated or deleted in Steps SP405, SP408and SP411, the in-memory DB management apparatus2discriminates whether the processing is complete for all the records in the SQL or not (SP412). If an affirmative result is obtained in Step SP412(SP412: YES), the processing is terminated. If a negative result is obtained in Step SP412(SP412: NO), the in-memory DB management apparatus2repeats the processing starting with Step SP403. The update of the in-memory DB236is replicated to the on-disk DB63as mentioned above.

(3-5) Reserved List Creation Processing

At this point, processing to create the reserved list235through co-operation between the in-memory DB management apparatus2and on-disk DB management apparatus3will be described referring toFIG. 11. The in-memory DB management apparatus2creates the reserved list104after creating the in-memory DB236.

Firstly, if the in-memory DB236is created, the in-memory DB management apparatus2notifies the on-disk DB management apparatus3that the in-memory DB236has been created.

When the on-disk DB management apparatus3receives this notification, the DB access processing unit332exports data of the on-disk DB63via the DB buffer336(SP501). The location information management unit333then exports the reserved physical storage location information of the reserve instruction list61via the reserve instruction list buffer335(SP502) and the data replication request unit334issues a request to read the exported data to the in-memory DB management apparatus2(SP503).

Next, the on-disk DB management apparatus3discriminates whether all the data of the on-disk DB63and all the reserved physical storage location information of the reserve instruction list61have been read (SP504). When an affirmative result is obtained in Step SP504, the processing is terminated. If a negative result is obtained in Step SP504, the on-disk DB management apparatus3returns to Step SP501.

Accordingly, the on-disk DB management apparatus3exports all the data of the on-disk DB63and all the reserved physical storage location information of the reserve instruction list61and issues a request to read the exported data to the in-memory DB236.

On the other hand, if the DB access analysis unit231of the in-memory DB management apparatus2receives the request issued by the on-disk DB management apparatus3in Step SP503(SP601), the DB access processing unit262carries out the export of the data in the on-disk DB63to the table2361of the in-memory DB236(SP602). Thereafter, the location information management unit263creates an index2362(SP603), creates a reserved list235on the basis of the reserve physical storage location information thus read (SP604), and the processing is terminated.

(3-6) Reserve Instruction List Creation Processing

At this point, processing in which the on-disk DB management apparatus3creates the reserve instruction list61will be described referring toFIG. 12.

Firstly, the location information management unit333of the on-disk DB management apparatus3reads the location information reserve parameter file62created by the user (SP701) and registers the content of the parameter file in the reserve instruction list61(SP702). The on-disk DB management apparatus3discriminates whether all of the location information reserve parameter file62has been read (SP703). If an affirmative result is obtained in Step SP703(SP703: YES), the processing is terminated. If a negative result is obtained in Step SP703(SP703: NO), returns to Step SP701.

As explained above, the user can create a plurality of location information reserve parameter files62, and is able to create the reserve instruction list61from the plurality of location information reserve parameter files62.

(3-7) Reserved List Supplementation Processing

At this point, reserved list supplementation processing to supplement the physical storage location if the physical storage location of the reserved list235is small will be described with reference toFIG. 13. This processing is started when the location information management unit233acquires reserved physical storage location information from the reserved list235in Step SP104.

Initially, if the reserved physical storage location information is acquired from the reserved list235, the location information management unit233of the in-memory DB management apparatus2changes the state of the leading information among the location information items in an unused state in the reserved list235to in use (SP801).

Next, the location information management unit233then subtracts “1” from the in-use physical storage location information count2354of the reserved list104(SP802). The location information management unit233discriminates whether the usage rate which is the percentage of the in-use physical storage location information count in the reserved physical storage location information count is 80 percent or more (SP803).

If a negative result is obtained in Step SP803(that is, if the usage rate is 80 percent or more (SP803: YES)), it is determined that a supplementation is not required and the processing is terminated at that point of time.

If an affirmative result is obtained in Step SP803(that is, if the usage rate is less than 80% (SP803: NO)), the location information management unit233issues a request to the on-disk DB management apparatus3to supplement the reserved physical storage location information (SP804), receives the reserved list replication request from the on-disk DB management apparatus3(SP805), replicates and supplements the reserved list235(SP806), and ends the processing.

On the other hand, upon receipt of the request to supplement the reserved physical storage location information (SP901), the location information management unit333of the on-disk DB management apparatus3calculates the supplementation size (SP902). The calculation of the supplementation size is performed using the following equation, for example.
The reserved physical storage location information to be supplemented=the pre-supplemented reserved physical storage location information count×0.2.

Thereafter, the location information management unit333secures a physical storage location in the on-disk DB63in an capacity corresponding to the calculated supplementation size, supplements the reserved physical storage location information of the reserve instruction list61(SP903), issues a request to replicate the reserved list235to the in-memory DB management apparatus2(SP904), and ends the processing. Accordingly, if there is a lot of in-use reserved physical storage location information, unused reserved physical storage location information can always be secured by securing and supplementing the physical storage location information.

FIG. 14is a diagram showing an example of the result of displaying the reserved physical storage location information. The reserved physical storage location information can be classified in each table of the in-memory DB236. For example, the user uses an interface such as a command interface to display, in table units, the table name, usage rate of the reserved physical storage location information, and in-use location information. The reserved physical storage location information is retrieved from the reserve instruction list61by the location information management unit333of the on-disk DB management apparatus3. The location information is configured from files, extents, pages, and records. The usage rate of the reserved physical storage location information is found by the location information management unit233of the in-memory DB management apparatus2by means of the following equation from the reserved list235.
Usage rate of reserved physical storage location information=in-use physical storage location information count÷reserved physical storage location information count.

(5) Other Embodiments

On an aside, in the embodiment explained above, the reserved list235is held in a table format, this list may also be held in an index format.

In this case, as shown inFIG. 15, the index entry2355constituting the index can be implemented by holding the reserved physical storage location information as an index key2356and holding physical storage location information2357together with the index key2356. By the way, the index key2356indicates a storage location of a record in the on-disk DB63, and a storage location of a record in the in-memory DB236corresponding to this storage location of the record in the on-disk DB63is indicated by the physical storage location information2357. If the physical storage location2357is “0”, this indicates that the storage location in the in-memory DB236indicated by the reserved physical storage location information is unused.

Also, in the embodiment above the physical storage location information632in the on-disk DB63is used as an index, however, if unique indexes exist ensuring uniqueness between the data stored by the in-memory DB236and the data stored by the on-disk DB63, such unique indexes may also be used.

FIG. 16is a conceptual diagram showing processing for updating the in-memory DB where the unique key exists. The in-memory DB236receives a request to add a record (“CCC” in the example ofFIG. 16) and adds the record “CCC” to the table2363together with the unique key (“0004” in the example ofFIG. 16) acquired from the reserved list235.

Afterwards, the unique key “0004” is appended to the record “CCC” and a record addition request is issued to the on-disk DB63. The on-disk DB63subsequently stores the record “CCC” in the physical storage location where the unique key “0004” has been appended.

As mentioned above, if the table already holds a unique key, the unique key can be used as physical storage location information and data can be replicated.

REFERENCE SIGNS LIST