WO2013136442A1 - データ利用システム、時限データの履歴管理システム及びデータ処理システム - Google Patents

データ利用システム、時限データの履歴管理システム及びデータ処理システム Download PDF

Info

Publication number
WO2013136442A1
WO2013136442A1 PCT/JP2012/056407 JP2012056407W WO2013136442A1 WO 2013136442 A1 WO2013136442 A1 WO 2013136442A1 JP 2012056407 W JP2012056407 W JP 2012056407W WO 2013136442 A1 WO2013136442 A1 WO 2013136442A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
application
server
basic
search
Prior art date
Application number
PCT/JP2012/056407
Other languages
English (en)
French (fr)
Inventor
裕三 石田
順一 久保
拓見 安増
英樹 峯
耕平 後藤
明洋 谷本
修武 小林
和廣 丸尾
朋幸 駒
隆浩 小林
広伸 上野
Original Assignee
株式会社野村総合研究所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社野村総合研究所 filed Critical 株式会社野村総合研究所
Priority to JP2014504532A priority Critical patent/JP5878232B2/ja
Priority to PCT/JP2012/056407 priority patent/WO2013136442A1/ja
Publication of WO2013136442A1 publication Critical patent/WO2013136442A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions

Definitions

  • the present invention relates to a data use system, a timed data history management system, and a data processing system, and more particularly, a technology for improving the efficiency of use of data stored in a database server by cooperation between an application server and the database server, and an effective period
  • the present invention relates to a technique for managing a history of timed data provided with, and a technique for decomposing data processing that inherently requires many-to-many matching into one-to-one matching.
  • DB server database server
  • AP servers constituted by servers
  • the master server that controls the entire process inquires of the target DB server whether the commit can be executed.
  • the DB server that is ready for update returns a “ready” response, confirms that all DB servers have completed the preparation, the master server notifies the commit start, and the database is rewritten all at once. If an error occurs in one of the databases during rewriting, the DB server where the error occurred reports the failure, and the master server notifies all servers of the withdrawal and performs a “rollback” process to restore the data.
  • Non-Patent Document 2 Non-Patent Document 2
  • the consumption tax rate in each country is not always constant and may vary depending on the revision of the law. Therefore, in order to calculate the consumption tax amount, it is still necessary to specify the consumption tax rate in the selling country at each point of sale. For this reason, in an accounting system or the like, a history management function that records the transition of the consumption tax rate in time series is indispensable.
  • the present invention has been devised to solve the conventional problem (1) described above, and optimizes the configuration of the AP server and DB server in a large-scale information processing system, thereby processing the entire system.
  • the first object is to realize a technology capable of improving the speed.
  • the present invention has been devised to solve the conventional problem (2) above, and relies on the two-phase commit of the XA interface while assuming the distributed management of tables by a plurality of DB servers.
  • the second purpose is to realize a technology capable of ensuring the consistency between data without doing so.
  • the present invention has been devised to solve the conventional problem (3), and a third object thereof is to provide a timed data history management system excellent in versatility.
  • the present invention has been devised in order to solve the conventional problem (4), and the process to be collated between many-to-many data is originally performed between one-to-one data.
  • the fourth object is to realize a data processing system that can improve the efficiency of the connection processing between related data by converting to collation processing, and can also support multi-core CPUs.
  • the data use system is a data use system including a plurality of database servers and an application server connected to each database server via a network.
  • Each of the above database servers includes a DB management system and a data storage area, and each data storage area of each database server stores a plurality of common tables each holding data common to the database servers.
  • Each table has a restriction that the number of key items is limited to one and a restriction that prohibits update and deletion of data.
  • the application server includes a search condition division processing unit, Search processing unit, multiple data processing processing unit, search result integration processing unit, and additional data reception And a plurality of registration processing units, wherein the search condition division processing unit analyzes the input search conditions and divides them into a plurality of search conditions, and each search condition and the corresponding database server are divided into the plurality of search processing units.
  • Each of the above search processing units generates a SQL corresponding to the search condition assigned to itself and issues it to the database server assigned to itself, and a certain amount of search from the database server.
  • the necessary arithmetic processing is assigned to each data processing unit, and each time the result data is returned from each data processing unit, this is stored in the memory.
  • the process of deleting the data sent from the database server from the memory and the data sending from the database server are completed, and the partial search
  • these are aggregated and a process of outputting the aggregated result to the search result integration processing unit is executed, and the search result integration processing unit performs each search
  • the totaling result passed from the processing unit is totaled, and a process of outputting as a search result is executed.
  • the additional data receiving unit receives a data addition request including a copy of the input additional data and specific information of the corresponding database server.
  • a process of assigning to each of the above registration processing units is executed, and each of the above registration processing units generates a SQL for requesting registration of the additional data, and executes a process of issuing to the database server assigned to itself. It is said.
  • the data use system is a data use system including a plurality of database servers and an application server connected to each database server via a network.
  • Each of the above database servers includes a DB management system and an external storage device in which various tables are stored, and each of the above tables is provided with a restriction that prohibits update and deletion of data.
  • the application server includes a registration processing unit and a search processing unit, and the registration processing unit requests registration of a combination of a plurality of mutually related data for different tables managed by a plurality of database servers.
  • each database server with a corresponding table Process to issue SQL for requesting additional registration of data, and generate SQL for requesting registration of ID of each additional data for the related table provided in the external storage device of any database server. Executes the process issued to the database server to be managed, and the search processing unit inputs search conditions for extracting a combination of a plurality of mutually related data from different tables stored in the external storage devices of the plurality of database servers If the process is performed, refer to the related table above to identify the ID of each data to be extracted, and refer to each table managed by the corresponding database server, and whether the required data combination is complete If you have all the required data combinations and the process to check whether or not, extract the corresponding data by issuing SQL to each database server Command and, if not equipped with a combination of required data it is characterized by executing a process for removing the combination of the data from the extraction target.
  • the data utilization system described in claim 3 is based on the system of claim 2, and each of the database servers is classified into a plurality of DB systems, and is external to a plurality of database servers belonging to the same DB system.
  • Each storage device stores a common table that holds data that is equal to each other, and each external storage device of a database server that belongs to a different DB system stores a separate table that holds different data.
  • the application server includes an additional data reception unit, a plurality of registration processing units, a search condition division processing unit, a plurality of search processing units, a plurality of data processing processing units, and a search result integration processing unit.
  • the additional data receiving unit adds a plurality of data combinations related to different tables belonging to a plurality of DB systems.
  • a process of assigning a copy of a combination of input data and a data addition request including specific information of a plurality of database servers belonging to different DB systems to each of the above registration processing units Each registration processing unit generates a SQL requesting registration of the ID of each additional data and a process for issuing an SQL for requesting additional registration of the corresponding data to each database server assigned to the registration processing unit.
  • the search condition dividing processing unit executes a process issued to a database server that manages the related table, and the search condition division processing unit has a search condition for extracting a combination of a plurality of mutually related data from a plurality of tables belonging to different DB systems.
  • this search condition When input, this search condition is analyzed and divided into a plurality of search conditions, and each divided search condition and different
  • the process of assigning specific information of each database server belonging to the DB system to the plurality of search processing units is executed, and each search processing unit generates SQL corresponding to the search condition assigned to itself and assigned to the self Processing issued to each database server, processing for assigning necessary arithmetic processing to each data processing processing unit each time a certain amount of search result data is transmitted from each database server, and partial processing from each data processing processing unit Each time processing result data is returned, it is stored in the memory, and the data sent from the database server is deleted from the memory, and the data transmission from the database server is completed.
  • the search result integration processing section adds up the total result passed from the search processing unit is characterized by executing a process of outputting a search result.
  • the data utilization system described in claim 4 is based on the system of claim 1 or 3, and the search condition division processing unit further determines that the input search condition includes a temporal range. It is characterized by dividing into shorter time ranges.
  • the data utilization system described in claim 5 is based on the system according to claim 1 or 3, and the search condition division processing unit further determines that the input search condition includes a regional range. It is characterized by dividing it into narrower regional areas.
  • the data utilization system described in claim 6 is based on the system of claims 1 to 5, and further includes an index server having an index generation unit and an index storage unit.
  • the DB management system stores the additional data transmitted from the application server in the temporary storage area and the additional data in the temporary storage area at a predetermined time interval.
  • a process of moving to the permanent storage area is executed, and the index generation unit of the index server acquires the additional data stored in the temporary storage area of the database server at a predetermined time interval, and based on the additional data Generate an index and execute the process of storing in the index storage unit,
  • the search processing unit of the application server generates the SQL corresponding to the search condition assigned to itself
  • the search server of the application server refers to the index storage unit of the index server and acquires the primary key of each data corresponding to the search condition It is characterized by executing a process and a process for generating an SQL in which acquired data is designated by the primary key.
  • the data utilization system according to claim 7 is based on the system according to claims 1, 3 to 6, and each of the database servers further includes an update log storage area provided on a memory.
  • the OS executes a process of sequentially storing additional data transmitted from the application server in the update log storage area.
  • a timed data history management system is a DB server for storing timed data having a specific effective period and value, and accesses the DB server. And a history management unit for requesting reference and addition of data, wherein the DB server stores a basic table for storing the valid period application target and its value in association with a unique basic ID, and the application Application start table for registering the start of the valid period of the target and value in association with the corresponding basic ID and the unique application start ID, and the end of the valid period of the application target and value with the corresponding basic ID and unique application An application end table that is registered in association with an end ID, an application start cancellation table that stores the application start ID, and an application end cancellation table that stores the application end ID.
  • the history management unit includes (1 ) When a request to add timed data specifying the application target, value, and validity period is input, whether or not basic data with the application target and value exists in the basic table to the DB server.
  • the application start data with the basic ID and the start of the effective period is added to the application start table, and the application end with the basic ID and the end of the effective period is completed.
  • the basic data including the application target and value is added to the basic table, and the basic ID of the basic data and Application start data with the start of the valid period is added to the application start table, and application end data with the same basic ID and the end of the valid period is added to the application end table.
  • the basic ID and the start of the valid period Requesting to add application end data with the same basic ID and end of validity period to the application end table, and the basic data does not exist
  • the application start data with the basic ID of the basic data and the start of the validity period is added. Add the initial application table, and the application terminates data having the end of the base ID and the valid period and executes a process of requesting to add to the application termination table.
  • a timed data history management system is the system according to claim 8, wherein the DB server further includes an application period table for registering the application start ID and the application end ID in association with each other.
  • the history management unit (1) when a request for adding timed data specifying the target of application, value, and validity period is input, the application target and value in the basic table are sent to the DB server. Inquires whether or not basic data with the name exists, and if the basic data exists, requests to add the application start data with the basic ID and the start of the valid period to the application start table. If the basic data does not exist, the basic data including the application target and the value is added to the basic table, and the basic ID of the basic data and the start of the effective period are set.
  • a request to add the applied application end data to the application end table was executed, and (4) a request to add timed data specifying the basic ID, application end ID, and the start of the valid period was input
  • the application start data having the basic ID and the start period is added to the application start table, and the application end ID and the application start ID of the application start data are added to the application period table. It is characterized by executing processing for requesting addition.
  • the history management system for timed data described in claim 10 is the system according to claim 9, wherein the history management unit specifies at least one of an application target, a value, and an effective period as a search condition.
  • the history management unit specifies at least one of an application target, a value, and an effective period as a search condition.
  • a timed data history management system is the system according to claims 8 to 10, further comprising a plurality of timed data having valid periods overlapping each other for the same application target.
  • the history management unit certifies that the period data having the latest registration date and time set in the application start data and the application end data is valid for a period overlapping.
  • a timed data history management system is the system according to claims 8 to 11, further comprising a specific table name corresponding to the type of application target and the application target included in each table.
  • a class that defines at least a specific table name, specific data items, and data type of each data item is generated for each table based on table setting information such as a specific item name corresponding to the type of
  • the data processing system is a first combination target storage means for storing a plurality of similar data having different values as the first combination target data.
  • a second combination target storage means for storing a plurality of the same kind of data having different values as the second combination target data having a different type from the first combination target data, and a specific first Association storage means for storing association data in which an ID of one combination target data and an ID of a specific second combination target data to be combined with the first data are stored; and the first combination
  • the related data including the ID of the specific first combination target data extracted from the target storage means is extracted from the related storage means, and the ID of the second combination target data recorded in the related data is First join target Among the second combination target data extracted from the second combination target storage means and the means for executing the first combination processing for generating the intermediate data added to the data, the intermediate data is added to the intermediate data Means for executing a second combining process for identifying the ID recorded and generating combined data obtained by adding the values of at least some data items of
  • the data processing system is the system according to claim 13, and further, when there is no related data having an ID of the specific first combination target data, the first combination target data In the case where there is no intermediate data having the ID of the specific second combination target data and means for executing the first exclusion process for separating the corresponding second combination target data as data that does not exist And a means for executing a second exclusion process for separating the two data to be combined as data for which the corresponding first data to be combined does not exist.
  • the input search condition is divided into a plurality of parts, and a search request for data is transmitted to the database server via each of the plurality of search processing units, and from the database server to each search processing unit.
  • the returned search result data is also processed in parallel by multiple data processing units in a fixed unit, so even if a large amount of data is sent from the database server, many CPU cores By using, efficient processing becomes possible.
  • without waiting for all the search result data from the database server to complete in this way by shifting to partial processing when a certain amount of data has been prepared, the delay due to DISK / IO on the database server side Can be relaxed.
  • each data when additionally registering different data to a plurality of database servers at the same time, each data is searched without questioning the success or failure of the registration of each data. At this time, it is checked whether or not related data is prepared by referring to the related table, and if it is not prepared, a method is adopted in which it is processed that there is no additional registration of the combination of the data. For this reason, consistency between data can be ensured at the time of retrieval without using the two-phase commit of the XA interface as in the prior art.
  • each database server is classified into a plurality of DB systems, and a plurality of database servers belonging to the same DB classification are provided with a common table, and at the time of search processing Since the search condition is distributed to each database server, the data extraction process in each database server is reduced, so that the processing speed of the entire system can be improved.
  • the input search condition is divided into a plurality of parts, and a search request for data is transmitted to the database server via each of the plurality of search processing units, and from the database server to each search processing unit.
  • the returned search result data is also processed in parallel by multiple data processing units in a fixed unit, so even if a large amount of data is sent from the database server, many CPU cores By using, efficient processing becomes possible.
  • without waiting for all the search result data from the database server to complete in this way by shifting to partial processing when a certain amount of data has been prepared, the delay due to DISK / IO on the database server side Can be relaxed.
  • the index (secondary index) creation process is transferred to an external independent index server, the burden on the database server side associated therewith can be eliminated.
  • the application server issues a SQL that specifies the primary key of the individual data, eliminating the need to sort the table on the database server side, thereby reducing the load on the database server. it can.
  • the update log of the database server is provided in a memory, the DISK / on the database server side is compared with the case where the update log is stored on the disk. IO can be reduced.
  • This update log storage area is set in the memory by the OS of each database server, and the update log storage process is also realized by the OS function, so the application program for the database server stops functioning. However, recovery is possible as long as the OS does not go down.
  • a plurality of database servers are physically prepared, and the same additional data is accumulated in the update log storage area as an update log in each database server. Even if the update log disappears, the update log stored in another database server can be easily recovered.
  • routine processing it is possible to add, reference, delete, and modify timed data. For this reason, it becomes easy to incorporate it into various business systems as a general-purpose history management system.
  • deleting timed data the corresponding timed data is not physically deleted from the table, but the ID of the application start data is registered in the application start cancellation table and the application end data is registered in the application end cancellation table. A method of logical deletion by registering the ID of the system is adopted.
  • the timed data history management system since the table for associating the application start data and the application end data is provided, the application start data and the application end data are registered at different timings. In addition, the effective period can be correctly managed, and it is possible to give flexibility to the history management of timed data.
  • timed data history management system In the case of the timed data history management system according to claim 11, even if there are a plurality of timed data having overlapping validity periods for the same application target, the newest registered date is applied preferentially. It is possible to register timed data one after another as needed without considering the consistency of the valid period between them, and without modifying or deleting existing timed data. It becomes possible to set flexibly.
  • time-limited data history management system when a specific table is generated according to the type of application target such as the selling price or discount rate of goods, or the consumption tax rate by country, Corresponding class is automatically generated based on the setting information, and the history management unit specialized for the type of application target is automatically generated by applying the definition contents of each class to general-purpose program parts. I have. Moreover, since the program parts are versatile, they only need to be tested once, and classes corresponding to specific tables are automatically generated without human intervention, so every time a specific history management unit is generated, There is no need to perform consolidation tests. From the above, it becomes extremely easy to incorporate this time-limited data history management system into various business systems.
  • the correspondence relationship between the first combination target data and the second combination target data is defined “one-to-one” in the related storage unit.
  • FIG. 1 is a schematic diagram showing the overall configuration of a data utilization system 10 according to the present invention, which includes a load balancer 13, a Web server 12, a plurality of AP servers 14, and a plurality of DB servers 16.
  • a client terminal 18 is connected to the Web server 12 via the Internet 17.
  • Each DB server 16 includes a plurality of tables (table group 19) storing data common to all the DB servers 16, and a DB management system (RDBMS). At least a part of the DB servers 16 is It is located in a remote place from the viewpoint of data preservation.
  • a data utilization screen is transmitted from the web server 12 to the client terminal 18 and displayed on the web browser (not shown). Then, when the user designates a search condition through this data use screen and requests a data search, a search request is transmitted from the Web server 12 to the AP server 14. At this time, the search request is distributed to the one AP server 14 with the smallest load via the load balancer 13.
  • the AP server 14 Upon receiving this search request, the AP server 14 logically divides the search condition into a plurality of pieces, issues a plurality of SQLs corresponding to the divided search conditions to the separate DB servers 16, and data that matches the search condition Request extraction. Receiving this, each DB server 16 extracts the data designated by SQL and transmits it to the AP server 14.
  • the AP server 14 integrates the data received from each DB server 16 and transmits it to the Web server 12.
  • the Web server 12 generates a screen (not shown) for displaying the search result data received from the AP server 14 and transmits it to the client terminal 18.
  • each DB server 16 executes a process of storing the additional data in a corresponding table.
  • FIG. 2 shows a functional configuration when a search request transmitted from the client terminal 18 is transmitted to the DB server 16 via the Web server 12 and the AP server 14, and the AP server 14
  • a division processing unit 20 and a plurality of search processing units 22 are provided.
  • FIG. 3 shows a functional configuration in the case where a search result is transmitted from the DB server 16, and the AP server 14 includes a plurality of data processing units 24 assigned to each search processing unit 22 and search results.
  • An integrated processing unit 26 is provided.
  • FIG. 4 shows a functional configuration when a data addition request transmitted from the client terminal 18 is transmitted to the DB server 16.
  • the AP server 14 includes an additional data reception unit 27 and a plurality of registration processes. Part 28 is provided.
  • the search condition division processing unit 20, the plurality of search processing units 22, the plurality of data processing units 24, the search result integration processing unit 26, the additional data receiving unit 27, and the plurality of registration processing units provided in the AP server 14 28 is realized by a number of CPU cores mounted on the AP server 14 executing predetermined processing according to a dedicated application program. At this time, multiple threads are started by the OS and each CPU is started. Multitask processing is realized by being assigned to the core.
  • FIG. 5 shows a correspondence relationship between each CPU core 30 and the thread 32.
  • Each thread 32 is provided with a thread pool 34, and the thread 32 sequentially processes a plurality of tasks 36 arranged there. An image is drawn.
  • the thread 32 in this figure includes a search condition division processing unit 20, a plurality of search processing units 22, a plurality of data processing units 24, a search result integration processing unit 26, and an additional data receiving unit 27 shown in FIGS.
  • a specific process that functions as a plurality of registration processing units 28 and that is executed by these functional configuration units corresponds to the task 36.
  • Each thread 32 executes the tasks accumulated in the thread pool 34 one after another from the oldest, and when its own thread pool 34 becomes empty, the tasks accumulated in the thread pool 34 of other threads 32 36 is executed in order from the newest.
  • the processing procedure by the search condition division processing unit 20 will be described with reference to FIG. That is, when the AP server 14 receives the search condition transmitted from the client terminal 18 via the Web server 12 (S10), the search condition division processing unit 20 analyzes the search condition and performs a plurality of searches according to the contents of the search condition. The conditions are divided (S12).
  • the criteria for the division are those that can logically divide the search target data into a plurality of data such as time (day, week, month, year, etc.) and region (prefecture, municipality, etc.). For example, if the search condition “aggregate sales of all chain stores in 2010” is given, “sales of all chain stores for January 2010”, “sales of all chain stores in February 2010” ”,“ Sales of all chain stores in March 2010 ”, etc., and the year is divided into 12 units per month. Focusing on the location data of each chain store, “Sales of chain stores in Tokyo in 2010”, “Sales of chain stores in Hokkaido in 2010”, “Sales of chain stores in Okinawa in 2010”... In addition, dividing the whole country into 47 prefectures is also applicable. Of course, it can also be divided into 564 by month ⁇ prefectural unit, such as “sales of chain stores in Tokyo for January 2010” and “sales of chain stores in Hokkaido in January 2010”.
  • the search condition division processing unit 20 assigns the above-mentioned search unit for each prefecture and the corresponding DB server 16 to the 47 search processing units 22 (S14).
  • the search processing unit 22 automatically generates a SQL specifying a prefecture necessary for search processing assigned to itself and issues it to a specific DB server 16 assigned to the search processing unit 22 (S20).
  • the search processing unit 22 does not wait for all the search result data to be transmitted from the corresponding DB server 16, and when a predetermined amount of data (for example, 1,000 records) is transmitted.
  • a predetermined amount of data for example, 1,000 records
  • necessary arithmetic processing is assigned to a plurality of data processing units 24 (S24).
  • a part of the data processing unit 24 sorts the received data by the key item and executes a process of dividing the received data into a plurality of data based on the value of the key item.
  • the other data processing unit 24 executes a process of summing up values based on the divided data, a process of requesting the DB server 16 to extract data specifying the values, and the like.
  • the received data dividing method will be exemplified later.
  • the dividing method is based on the value and amount of the received data. Specific processing by the data processing unit 24 will also be exemplified later.
  • the search processing unit 22 stores the processing result per unit data amount in the memory and the data transmitted from the DB server 16 Is deleted from the memory (S28). Each search processing unit 22 repeats the processing of S24 to S28 every time the data transmitted from the DB server 16 reaches a certain amount until the data transmission from the DB server 16 is completed (S30 / N, S22 / Y). .
  • the search processing unit 22 totals the total values of the partial processing results so far. (S32), the total result is output to the search result integration processing unit 26 (S34).
  • the search result integration processing unit 26 checks whether or not the total results from all the search processing units 22 are prepared every time the total results are transmitted from each search processing unit 22 (S40, S42). The totaled results of all the search processing units are totaled when they are ready (S44). Then, the final count result is transmitted to the Web server 12 (S46). The Web server 12 generates a Web file including the counting result and transmits it to the client terminal 18.
  • the additional data reception unit 27 activates the registration processing unit 28 corresponding to the number of DB servers 16.
  • the specific information and additional data of the responsible DB server 16 are passed to each (S52).
  • each registration processing unit 28 issues an SQL requesting registration of the additional data to the DB server 16 that it is in charge of (S54).
  • each DB server 16 adds data to the corresponding tables all at once. As a result, the identity of the data managed by each DB server 16 is ensured.
  • FIG. 10 shows a specific example of a table group stored in each DB server 16, and includes a customer management table 40, a reservation management table 42, a sales management table 44, a reservation cancellation management table 46, and a billing management table. 48, the sales of each store are managed.
  • the customer management table 40 includes data items of “customer ID (primary key)” and “region”.
  • the reservation management table 42 includes data items of “reservation ID (primary key)”, “store ID”, “customer ID (foreign key)”, “amount”, and “reservation date”.
  • the sales management table 44 includes data items of “reservation ID (primary key / foreign key)” and “sales date”.
  • the reservation cancellation management table 46 includes data items of “reservation ID (primary key / foreign key)” and “reservation cancellation date”.
  • the billing management table 48 includes data items of “billing ID (primary key)”, “billing date”, and “reservation ID (foreign key)”.
  • the key item is limited to one. Therefore, it is prohibited to configure a key item (composite key) by combining a plurality of items.
  • NULL value prohibition constraint means that it is prohibited to fill NULL (no value) as the value of the data item, and the setting of the data item assuming such filling of the NULL value itself Is not allowed.
  • flag value prohibition constraint prohibits filling of flag values (binary data such as “1/0”, “ON / OFF”, “TRUE / FALSE”, etc.) as data item values. This means that setting of data items assuming such filling of flag values is not allowed.
  • Category value prohibition constraint means that it is prohibited to fill a data item value with a category value (“1: regular employee”, “2: part”, “3: part-time job”, etc.). Therefore, the setting of the data items assuming such filling of the segment values is not allowed.
  • RDBMS database management system
  • each table has a primary key (PK) constituted by a single data item.
  • data relating to “reservation cancellation” is usually provided with data items such as “reservation cancellation flag” in the reservation management table 42, and each record is filled with a flag value such as “1/0”.
  • the reservation cancellation state management is performed by providing the reservation cancellation management table 46 separately from the reservation management table 42. That is, the reservation ID registered in the reservation cancellation management table 46 is in the “reservation cancellation” state, and the presence or absence of the reservation cancellation is expressed by the presence or absence of the record.
  • Each table is subject to the restriction (2) (prohibition of value update) above, so even if there is a change in the “region” of a customer, for example, the “region” of the corresponding record in the customer management table 40 The value is never rewritten.
  • illustration is omitted, in such a case, for example, a “customer region change management table” including data items such as “customer ID”, “change region”, “change date” is newly provided, Stores the customer ID of the customer, the area after the change, and the date of change.
  • AP server 14 obtains regional information for each customer by referring to customer management table 40, and then refers to the customer region change management table. A process for identifying a customer who has changed and replacing it with the area after the change is executed.
  • the search condition is divided into 31.
  • the search condition division processing unit 20 assigns these divided search conditions (such as “A total billed amount for August 1 of store A for each region”) to 31 search processing units 22.
  • each search processing unit 22 receives this, each search processing unit 22 generates a SQL for acquiring the billing data from the billing management table 48 specifying the billing date assigned to it, and issues it to the DB server 16 that it is in charge of. Then, when the billing data having the billing date of the corresponding day is transmitted from the DB server 16, the search processing unit 22 divides the received data by a certain amount of data (for example, equivalent to 1,000 records), The following processing is assigned to the plurality of data processing units 24. (1) An SQL specifying the “reservation ID” of each billing data is generated and issued to the DB server 16, and the corresponding reservation data is acquired from the “reservation management table 42”.
  • the search processing unit 22 stores the processing result data in increments of 1, OOO obtained from the data processing processing unit 24 in the memory, and deletes the data transmitted from the DB server 16 from the memory. Then, when the processing result data for one day is prepared, all the processing result data is totaled. The aggregation results are output to the search result integration processing unit 26.
  • the search result integration processing unit 26 totals all the aggregation results from August 1 to August 31 from all the search processing units 22 and outputs them to the Web server 12.
  • the AP server 14 does not wait until the fetch from the DB server 16 is completed, and the processing by the plurality of data processing units 24 is started each time a certain amount of data is received. Therefore, the bottleneck caused by DISK / IO of the DB server 16 can be eliminated.
  • the memory occupied by the data transmitted from the DB server 16 is released, and only the aggregation result data with a much smaller amount of data is stored in the memory. Therefore, it can be avoided that the memory of the AP server 14 is continuously occupied by large data.
  • each search processing unit 22 issues SQL to each separate DB server 16 in a distributed manner, which inevitably reduces the processing load on each DB server 16 and increases the overall processing speed.
  • each DB server 16 holds the same data, when allocating the DB server 16 to the search processing unit 22, it is mechanically associated without considering the characteristics of each DB server 16 Can do.
  • segmentation procedure with respect to the data of the fixed amount unit transmitted from DB server 16 is demonstrated.
  • the first data processing unit 24 searches for a position to divide the data transmitted from the DB server 16 into two equal parts, finds a change of the key item by forward mismatch search, and divides the data into two.
  • the data string of (a) has key item values 1 to 6, but the data processing unit 24 divides this into two at the boundary between “3” and “4”, and (b) and Generate the data string of (c).
  • the other data processing unit 24 divides the data string of (b) into two between “2” and “3”, and generates the data strings of (d) and (e). At this time, since the value of the key item of the data string of (e) is only “3”, the data processing unit 24 stops further division. With respect to the data string (e), other data processing unit 24 performs necessary calculation processing and the like.
  • the data string can be divided into two between “1” and “2”, so the data processing unit 24 divides the data string into two here, and (h) and The data string of (i) is generated.
  • the data processing unit 24 stops further division.
  • necessary calculation processing and the like are executed by the other data processing unit 24.
  • the data processing unit 24 stops further division.
  • the other data processing unit 24 performs necessary calculation processing and the like.
  • the other data processing unit 24 divides the data string (c) into “5” and “6” and generates the data strings (f) and (g). At this time, since the value of the key item in the data string (g) is only “6”, the data processing unit 24 stops further division. With respect to the data string (g), the other data processing unit 24 performs necessary calculation processing and the like.
  • the data processing unit 24 divides the data string into two here, and (j) and The data string of (k) is generated. At this time, since the value of the key item of the data string (j) is only “4”, the data processing unit 24 stops further division. With respect to the data string (j), the other data processing unit 24 performs necessary calculation processing and the like. Similarly, since the value of the key item in the data row (k) is only “5”, the data processing unit 24 stops further division. For this data string (k), the other data processing unit 24 performs necessary calculation processing and the like.
  • each data processing unit 24 actually uses a certain amount of data string (for example, 1,000 records) transmitted from the DB server 16.
  • the above-described division processing is executed every time sorting, matching, and control break are performed.
  • a large amount of data can be processed in parallel by a plurality of data processing units 24, and a plurality of CPU cores mounted on the AP server 14 can be used effectively.
  • a certain limit can be set for the number of divisions (hierarchy depth).
  • the data processing unit 24 may issue a SQL to the DB server 16 by specifying the value of a specific data item in the data string passed from the search processing unit 22 and request the search process. Inevitably, waiting for a response from the DB server 16 (I / O Wait) will occur.
  • each thread 32 it is desirable to provide each thread 32 with a first thread pool 50 for processing with I / O Wait and a second thread pool 52 for processing without I / O Wait. .
  • the thread 32 processes the task 36 arranged in the second thread pool 52 during the waiting time. This makes it possible to improve processing efficiency.
  • each table managed by the DB server 16 is simplified to the limit as described above, the number of tables increases and the number of SQL issuances itself increases, but there are many arithmetic processes.
  • DB server 16 can concentrate on simplified data management (insert and select), freeing from data updates and deletions. Therefore, the burden on the DB server 16 is greatly reduced.
  • a plurality of DB servers 16 are prepared at the chassis level, and data extraction processing is distributed to each when searching. For this reason, it is possible to effectively avoid a decrease in the processing speed on the DB server 16 side in accordance with the pursuit of table normalization.
  • each DB server 16 includes a DB management system (RDBMS) 61, a data storage area (provisional storage area) 62 for the day, and a data storage area (permanent storage area) 63 for the past.
  • RDBMS DB management system
  • the index server 60 includes an index generation unit 64, an index storage unit 65, and an index provision unit 66.
  • the index generating unit 64 and the index providing unit 66 are realized by the CPU of the index server 60 operating according to a dedicated program, and the index storage unit 65 is provided in an SSD (Solid State Drive) of the index server 60. .
  • the additional data transmitted from the registration processing unit 28 of the AP server 14 is temporarily stored in the data storage area 62 for the current day by the DB management system 61 of the DB server 16, and then transferred to the past data storage area 63 by nighttime batch processing. It is.
  • the index generation unit 64 of the index server 60 obtains additional data stored in the data storage area 62 for the current day from the DB management system 61 by nighttime batch processing, creates an additional index, Store in part 65.
  • each search processing unit 22 of the AP server 14 refers to the index storage unit 65 via the index providing unit 66 of the index server 60 when issuing an SQL to each DB server 16, and stores past data.
  • the data stored in the area 63 after acquiring the primary key of each data included in the range of the search condition, an SQL specifying each primary key is generated.
  • the search processing unit 22 sets the primary key of all data that matches this condition to the index server. After obtaining from 60, describe these primary keys in SQL and issue them to the DB server 16.
  • the DB management system 61 of the DB server 16 directly retrieves the data designated by the primary key from each table stored in the past data storage area 63 without performing the data retrieval process, Return to 22 quickly.
  • the index is stored in an SSD capable of operating at a higher speed than the hard disk, DISK / IO when the AP server 14 refers to the index can be reduced.
  • the search processing unit 22 issues a SQL specifying the search condition to the DB server 16 without specifying the primary key.
  • FIG. 14 shows the internal structure of each DB server 16 in more detail.
  • a buffer cache area 70 provided on the memory, a DB management system (RDBMS) 61, an OS (Linux) 72, and a table.
  • a storage area 74 and an update log storage area 76 are drawn.
  • the table storage area 74 is provided in the hard disk (HDD), and stores the customer management table 40, the reservation management table 42, and the like described above.
  • the update log storage area 76 is provided in the memory (tmpfs) by the OS.
  • data in a table is generally fetched from the table storage area 74 to the buffer cache area 70 and written to the buffer cache area 70 in units of blocks 78.
  • the data is stored in the table storage area 74 in units of blocks 78. For this reason, if the structure of the records stored in each table has been simplified to the limit as described above, the number of records that can be stored in one block 78 can be increased. It becomes possible to realize efficiency improvement.
  • the update log 79 is an important component that will be the last base for data recovery in the event of any trouble in the DB server 16, so normally the data is lost when the power is turned off. Is not provided.
  • a plurality of DB servers 16 are physically provided as described above, and each DB server 16 has a mechanism for storing data of the same content. It is possible to effectively disperse the risk of data loss.
  • the update log storage area 76 is set on the memory by the OS of each DB server 16 as described above, and the update log storage process is also realized by the function of the OS. Even if an application program crashes, it can be recovered in the DB server as long as the OS does not go down.
  • each DB server 16 is classified into a plurality of DB systems, and the external storage device 19 of the DB server 16 belonging to the same DB system stores a plurality of data stored in common with each other. It can also be configured to store tables. In this case, different tables are stored in the external storage device 19 between the DB servers 16 of different DB systems. At least a part of the DB servers 16 belonging to the same DB system is located in a remote place from the viewpoint of data maintenance. In the figure, two DB systems (DB ⁇ system and DB ⁇ system) are illustrated, but more DB systems can be provided.
  • the tables shown in FIG. 10 may be stored together in the DB server 16 belonging to the same DB system, but may be distributed and arranged in the DB servers 16 belonging to different DB systems.
  • the registration processing unit 28 is configured to perform a plurality of DBs belonging to different DB systems in the data addition process.
  • the server 16 is requested to add data at the same time. For example, if the basic attribute table that manages the user's name and address and the derived attribute table that manages each user's office and hobbies belong to different DB systems, each registration processing unit 28 Will simultaneously issue SQL requesting the addition of corresponding records to the corresponding DB servers 16 belonging to the two DB systems.
  • the registration processing unit 28 applies the original table to the related table provided in one of the DB servers 16. Apart from the additional data, data indicating the relevance of both data is registered.
  • FIG. 17 shows an example.
  • a product An association table 81 having data items of ID and store ID is provided.
  • a store table 82 including data items of store ID, store code, store name, and registration date / time is provided.
  • the product ID and the store ID are unique artificial keys that are numbered by the system 10.
  • the registration processing unit 28 instructs the related table 81 to store the product ID and store ID.
  • SQL for instructing addition of product data to the product table 80 is generated and issued to the DB server ( ⁇ 2) 16.
  • the registration processing unit 28 generates an SQL for instructing addition of store data in the store table 82 and issues it to the DB server ( ⁇ 2) 16.
  • the registration processing unit 28 does not know whether the data addition has succeeded or failed in the DB server ( ⁇ 2) 16 and the DB server ( ⁇ 2) 16.
  • the search processing unit 22 first refers to the related table 81 of the DB server ( ⁇ 2) 16, and the product ID And store ID is specified (S60). Next, the search processing unit 22 refers to the product table 80 of the DB server ( ⁇ 2) 16 and the store table 82 of the DB server ( ⁇ 2) 16, and whether there is registration of data corresponding to the product ID and store ID. Is confirmed (S62).
  • the search processing unit 22 executes the SQL for acquiring the corresponding product data and store data as the DB server ( ⁇ 2) 16 and the DB server. ( ⁇ 2) is issued to 16 (S66).
  • ⁇ 2 is issued to 16 (S66).
  • FIG. 18 shows another example of a method for ensuring consistency between data.
  • the DB server ( ⁇ 2) 16 belonging to the DB ⁇ system members having data items of user ID, name, and registration date / time are shown.
  • a table 83 and an address table 84 having data items of address ID, user ID, address, and registration date / time.
  • the DB server ( ⁇ 2) 16 belonging to the DB ⁇ system includes address ID and transaction ID data items in addition to the purchase table 85 including transaction ID, purchase price, user ID, and purchase date and time data items.
  • a related table 86 is provided.
  • the above user ID, address ID, and transaction ID are unique artificial keys that are numbered by the system 10.
  • the registration processing unit 28 displays the address ID and the transaction ID in the related table 86.
  • a SQL for instructing storage is generated, and a SQL for instructing addition of purchase data in the purchase table 85 is generated and issued to the DB server ( ⁇ 2) 16.
  • the registration processing unit 28 generates SQL for instructing addition of address data to the address table 84 and issues it to the DB server ( ⁇ 2) 16.
  • the registration processing unit 28 does not know whether the data addition has succeeded or failed in the DB server ( ⁇ 2) 16 and the DB server ( ⁇ 2) 16.
  • the search processing unit 22 first refers to the related table 86 of the DB server ( ⁇ 2) 16 to determine the address ID The transaction ID is specified (S70). Next, the search processing unit 22 refers to the purchase table 85 of the DB server ( ⁇ 2) 16 and the address table 84 of the DB server ( ⁇ 2) 16, and whether there is registration of data corresponding to the transaction ID and the address ID. (S72).
  • the search processing unit 22 executes the SQL for acquiring the corresponding purchase data and address data as the DB server ( ⁇ 2) 16 and the DB server. ( ⁇ 2) is issued to 16 (S76).
  • ⁇ 2 is issued to 16 (S76).
  • the additional registration of the address data is successful in the previous additional registration request, the same address data is registered in the address table 84 in duplicate. By treating the data as valid and ignoring the existence of data with an old registration date, data integrity is ensured. Similarly, if the additional registration of purchase data was successful in the previous additional registration request, the same purchase data is registered in the purchase table 85 twice, but the new purchase date is treated as valid, By ignoring the presence of data with an old purchase date and time, data integrity is ensured.
  • a plurality of search processing units 22 are started on the AP server 14, and each search processing unit 22 issues a SQL to each of a plurality of DB servers 16 belonging to different DB systems assigned to itself. Therefore, efficient distributed processing becomes possible by using many CPU cores.
  • a plurality of data processing units 24 are activated for each search processing unit 22, and thus a large number of CPU cores are used. Efficient distributed processing is possible.
  • the parallel processing by the data processing unit 24 is executed in a fixed amount unit without waiting until all the search result data from the DB server 16 is ready, so the delay due to DISK / IO on the database server side can be alleviated Is also possible.
  • each registration processing unit 28 has a mechanism for issuing an SQL to each of a plurality of DB servers 16 belonging to different DB systems assigned to itself. Even at the time of additional registration, efficient distributed processing using a large number of CPU cores becomes possible.
  • FIG. 19 shows an overall configuration of the first history management system 110 for timed data according to the present invention, and includes a Web server 112, an AP server 114, and a DB server 116. Each server is connected via a communication network. Further, a client terminal 117 operated by a user is connected to the Web server 112 via a communication network.
  • the client terminal 117 is composed of a computer such as a PC, and is loaded with programs such as an OS, a web browser, and a text editor.
  • the AP server 114 includes a data reference unit 118, a data update unit 120, a selling price history management unit 122, a table setting unit 124, a type generation unit 126, a type storage unit 127, a compiler 128, and a data access general-purpose component. And 130.
  • the CPU of the AP server 114 executes predetermined processing according to a dedicated application program. This is realized.
  • the mold storage unit 127 is provided in the external storage device of the AP server 114.
  • the data access general-purpose component 130 is also stored in the external storage device.
  • the DB server 116 includes a database management system (RDBMS) 132, a basic selling price table 134, a selling price application start table 136, a selling price application end table 138, a selling price application start cancellation table 140, and a selling price application end cancellation table 142. I have.
  • RDBMS database management system
  • FIG. 20 shows a specific configuration of each table described above.
  • the basic selling price table 134 includes data items of “basic selling price ID (primary key)”, “product ID (external key)”, “selling price”, and “registration date”.
  • the sales price application start table 136 includes data items of “sale price application start ID (primary key)”, “sale price basic ID (external key)”, “application start date”, and “registration date”.
  • a data item of “application start date / time” is provided instead of the application start date.
  • the sales price application end table 138 includes data items of “sale price application end ID (primary key)”, “sale price basic ID (external key)”, “application end date”, and “registration date”. When the expiration date is set in units of time, a data item of “application end date and time” is provided instead of the application end date.
  • the sale price application start cancellation table 140 includes data items of “sale price application start ID (primary key / foreign key)” and “registration date”.
  • the sale price application end cancellation table 142 includes data items of “sale price application end ID (primary key / foreign key)” and “registration date”.
  • constraint rules are checked for suitability by the database management system 132 at the time of designing a new table or issuing a SQL, and the effectiveness of the constraint rules is ensured by rejecting execution of processing that violates the constraint rules.
  • each table has a primary key (PK) constituted by a single data item.
  • data related to “cancellation of sales price application start” is usually provided with data items such as “sale price application start cancellation flag” in the sales price application start table 136, and a flag value such as “1/0” is assigned to each record.
  • the state is managed by filling, or the sales price cancellation start record itself is deleted, but the sales price application start cancellation table 140 is provided separately from the sales price application start table 136, so that State management is done.
  • the selling price application start ID registered in the selling price application start cancellation table 140 is in a “cancel” state, and the presence or absence of a record is expressed by the presence or absence of a record.
  • the data related to “cancellation application end cancellation” is usually provided with data items such as “sales application end cancellation flag” in the sales application end table 138, and each record has a flag value such as “1/0”.
  • the status is managed by filling in, or the sales price cancellation end record is to be deleted, but the sales price application end cancellation table 142 is provided separately from the sales price application end table 138, thereby canceling the sales price application end cancellation. State management is done.
  • FIG. 21A shows a search condition input screen 150 displayed on the Web browser of the client terminal 117, and the screen 150 includes items of product ID, date, and selling price.
  • the user inputs “A” as the product ID and “2010/10/03” as the date and clicks the search button 152, these search conditions are transferred to the AP server 114 via the Web server 112. Sent. Receiving this, the data reference unit 118 passes the search condition to the selling price history management unit 122 and requests the search process.
  • the sales price history management unit 122 first issues an SQL with a content requesting acquisition of basic sales price data related to “product ID: A” from the basic sales price table 134 to the DB server 116.
  • the selling price history management unit 122 extracts the selling price basic ID from the data received from the DB server 116, and requests the acquisition of the data related to the corresponding selling price basic ID from the selling price application start table 136 and the selling price application end table 138. Is issued to the DB server 116.
  • the selling price history management unit 122 extracts the selling price application start ID from the data received from the DB server 116, and obtains the SQL of the content requesting acquisition of the data related to the corresponding selling price application start ID from the selling price application start cancellation table 140. Issued to the DB server 116. At the same time, the selling price application end ID is extracted from the data received from the DB server 116, and the SQL requesting the acquisition of the data related to the corresponding selling price application end ID from the selling price application end cancellation table 142 is issued to the DB server 116. To do.
  • FIG. 22 is a schematic diagram in which sales price application information of the product ID: A generated based on the data transmitted from the DB server 116 is arranged in time series.
  • the selling price application information of (1) displayed with a chain line shows that the selling price is 800 yen, the application start date (start) is "2010/1501”, and the application end date (end) is "2011/03/31 ”,
  • the registration date is“ 2010/04/01 ”, but it is deleted on the same date, indicating that it is non-target information.
  • the fact that the selling price application information is “deleted” means that the corresponding selling price application start ID and selling price application end ID are registered in the selling price application start cancellation table 140 and the selling price application end cancellation table 142. (It will be described later in detail).
  • the sales price application information (2) displayed with a solid line is 700 yen
  • the application start date is "2010/1501”
  • the application end date is “2011/03/31”
  • the registration date is “2010/04/01”
  • the sales price application information of (3) displayed with a solid line is 600 yen
  • the application start date is “2010/10/01”
  • the application end date is “2010/12/25”
  • the registration date is “ 2010/08/15 ", indicating that it has not been deleted.
  • the sales price application information in (4) displayed with a solid line shows that the sales price is 500 yen, the application start date is “2010/11/01”, the application end date is “2010/12/25”, and the registration date is “2010 / 10/25 ", indicating that it has not been deleted.
  • the sales price application information of (5) displayed with a solid line is 500 yen, the application start date is “2010/11/01”, the application end date is “2011/01/31”, and the registration date is “2010 / 12/25 ", indicating that it has not been deleted.
  • the selling price history management unit 122 compares the registration date and time of each selling price application start data and selling price application end data, and extracts both data with the same registration date and time, so that the selling price application with the beginning and end of the validity period is extracted. Generate information.
  • the sales price history management unit 122 follows the rules in which the sales price application information with the later registration date has priority, Applicable information “600 yen” is recognized as a valid selling price for “October 3, 2010” and is output to the data reference unit 118.
  • the data reference unit 118 transmits the search result data to the Web server 112.
  • a search result screen is transmitted from the Web server 112 to the client terminal 117.
  • FIG. 21B shows a search result screen 154 displayed on the Web browser of the client terminal 117, in which the value “600” (yen) is displayed in the “sale price” item.
  • the search condition sent from the client terminal 117 is “Product ID: A / Date: 2011/02/15”, the selling price of “700 yen” according to the selling price application information in (2). Will be displayed on the client terminal 117.
  • a search result screen listing the selling price history information of selling price 600 related to A is displayed on the display of the client terminal 117.
  • the user can recognize the period in which the product with the product ID: A is sold at a selling price of 600 yen.
  • a search result screen 156 in which all valid selling price application information (excluding deleted information) related to the product ID: A is listed is displayed on the Web browser of the client terminal 117.
  • Each listed selling price application information includes display items of No, selling price, application start, application end, and registration date / time. This display data is also generated by the selling price history management unit 122.
  • the sales price application information including items of product ID, sales price, application start and application end is displayed.
  • a detail screen 160 is displayed on the Web browser of the client terminal 117.
  • the selling price history management unit 122 executes processing for data correction.
  • the selling price history management unit 122 issues an SQL for inquiring whether or not the selling price basic data of “product ID: A / selling price: 550 yen” has already been registered to the DB server 116.
  • the selling price application start data associated with the basic selling price ID of the basic selling price data (application start date: 2010 / 11/01) is added to the selling price application start table 136 and the selling price application end data (application end date: December 25, 2010) specifying the selling price basic ID is added to the selling price application end table 138
  • the SQL server that requests to add this selling price basic data to the selling price basic table 134 is DB server Issue to 116.
  • the selling price history management unit 122 acquires the selling price basic ID of the selling price basic data from the DB server 116 and then sells the selling price application start data (application start date: 2010/11/01) specifying the selling price basic ID.
  • sales price application information of “Product ID: A / Sale price: 550 yen / Application start date: 2010/11/01 / Application end date: 2010/12/25” is newly added to the DB server 116. .
  • the user can logically delete this by registering the sales price application start cancellation data and the sales price application end cancellation data for the overlapping previous sales price application information.
  • the user can also request correction of the application start date and the application end date together with the selling price.
  • the selling price history management unit 122 deletes the selling price history data. Execute the process. First, the selling price history management unit 122 issues to the DB server 116 an SQL requesting the DB server 116 to store the selling price application start ID related to the selling price application information of NO.0014 in the selling price application start cancellation table 140. . At the same time, the selling price history management unit 122 issues a SQL requesting the DB server 116 to store the selling price application end ID related to the selling price application information in the selling price application end cancellation table 142. As a result, the selling price history data with the selling price basic ID: 0014 is logically deleted.
  • a new registration screen is displayed from the Web server 112 to the client terminal 117. Sent to and displayed on a web browser. Although not shown, this new registration screen includes items of product ID, selling price, application start, and application end, as in the detailed screen 160 shown in FIG. However, each item is not filled with a character string and is blank.
  • the selling price history management unit 122 executes a process for adding data.
  • the selling price history managing unit 122 issues an SQL for inquiring whether or not basic selling price data having the input product ID and selling price has already been registered to the DB server 116.
  • the selling price history management unit 122 displays the selling price application start data including the selling price basic ID of the selling price basic data and the input selling price application start date.
  • the SQL requesting to add to the application start table 136 and the SQL requesting to add the same selling price basic ID and the input selling price application end data to the selling price application end table 138 are issued to the DB server 116.
  • the selling price history management unit 122 requests the DB server 116 to add the selling price basic data to the selling price basic table 134. Is issued.
  • the selling price history management unit 122 acquires the selling price basic ID of the selling price basic data from the DB server 116, the selling price application start data including the selling price basic ID and the entered selling price application start date is displayed in the selling price application start table.
  • the SQL requesting to be added to 136 and the SQL requesting to add the sale price application end data having the same sale price basic ID and the entered sale price application end date to the sale price application end table 138 are issued to the DB server 116. .
  • the selling price history management unit 122 issues the necessary SQL to the DB server 116 in response to the data reference request output from the data reference unit 118 and the data update request output from the data update unit 120. Then, processing / analysis processing of the data acquired from the DB server 116 is executed.
  • processing / analysis processing of the data acquired from the DB server 116 is executed.
  • each table configuration a table name such as “sale price basic table” or a column name such as “sale price”.
  • the sales price history management unit 122 is literally specialized for the management function of the sales price history, and cannot be used as a tax rate history management system or the like.
  • the processing logic part excluding the specific table name and column name (for example, when there is a request for deletion of specific timed data from the client terminal, application start cancellation data and application end cancellation data are added. Etc.) can be applied to any kind of timed data in common. Therefore, the first history management system 110 has a function of automatically generating “... History management unit” that matches the configuration of the table when setting each table.
  • the user accesses the table setting unit 124 from the client terminal 117 and requests creation of a new table.
  • the table setting screen is transmitted to the client terminal 117 and displayed on the Web browser (not shown).
  • the user designates a table name (such as a basic selling price table), a data item name (such as a basic selling price ID), a data type, the number of digits, and the like, and transmits it to the table setting unit 124.
  • the table setting unit 124 transmits the transmitted setting data to the DB server 116 and requests generation of a new table. Receiving this, the database management system 132 creates new tables (the selling price basic table 134, the selling price application start table 136, the selling price application end table 138, the selling price application start cancellation table 140, and the selling price application end cancellation table 142) according to the setting data. It is generated in the storage device of the DB server 116.
  • the type generation unit 126 is activated, and generates a class (type) corresponding to each table generated in the DB server 116 based on the setting data of each table received from the table setting unit 124.
  • a selling price basic class 170, a selling price application start class 171, a selling price application end class 172, a selling price application start cancellation class 173, and a selling price application end cancellation class 174 are generated and stored in the type storage unit 127.
  • the entities of these classes are programs in which the names of correspondence tables, data items, data types, the number of digits, etc. are described.
  • the compiler 128 is activated, and the selling price history management unit 122 is generated by giving each class in the type storage unit 127 as an argument to the data access general-purpose component 130.
  • the data access general-purpose component 130 is a program component having a code of a processing logic portion that should be executed in common by the “... history management unit”, and specific data such as a selling price basic table to be processed for this.
  • the selling price history management unit 122 specialized for managing the selling price history data is generated.
  • the selling price basic class 170, selling price application start class 171, selling price application end class 172, selling price application start cancellation class 173, and selling price application end cancellation class 174 are automatically generated by the type generator 126 based on the table design data. Therefore, there is no room for human error and it can be said that testing is essentially unnecessary.
  • the coding itself of the data access general-purpose component 130 is done by human hands, but since it can be reused for general purposes, if you perform a rigorous test in advance and crush the bug thoroughly, There is no need to perform a test each time a “... history management unit” is generated. From the above, it is not necessary to perform a test each time various history management units specialized for the configuration of each table to be operated are generated.
  • the user first accesses the table setting unit 124 from the client terminal 117 and requests creation of a new table.
  • the table setting screen is transmitted to the client terminal 117 and displayed on the Web browser (not shown).
  • the user designates the table name (tax rate basic table, etc.), data item name (tax rate basic ID, etc.), data type, number of digits, etc., and transmits them to the table setting unit 124.
  • the table setting unit 124 transmits the transmitted setting data to the DB server 116 and requests generation of a new table.
  • the database management system 132 specializes in the tax rate history management according to the setting data as the tax rate basic table 176, tax rate application start table 177, tax rate application end table 178, tax rate application start cancellation table 179, tax rate.
  • An application end cancellation table 180 is generated in the storage device of the DB server 116.
  • FIG. 26 shows a specific configuration of each table described above.
  • the tax rate basic table 176 includes data items of “tax rate basic ID (primary key)”, “country ID (external key)”, “tax rate”, and “registration date”.
  • the tax rate application start table 177 includes data items of “tax rate application start ID (primary key)”, “tax rate basic ID (external key)”, “application start date”, and “registration date”.
  • the tax rate application end table 178 includes data items of “tax rate application end ID (primary key)”, “tax rate basic ID (external key)”, “application end date”, and “registration date”.
  • the tax rate application start cancellation table 179 includes data items of “tax rate application start ID (primary key / foreign key)” and “registration date”.
  • the tax rate application end cancellation table 180 includes data items of “tax rate application end ID (primary key / foreign key)” and “registration date”.
  • the type generation unit 126 is activated and generates a class (type) corresponding to each table generated in the DB server 116 based on the setting data of each table received from the table setting unit 124. Specifically, a tax rate basic class 181, a tax rate application start class 182, a tax rate application end class 183, a tax rate application start cancellation class 184, and a tax rate application end cancellation class 185 are generated and stored in the type storage unit 127.
  • the compiler 128 is activated, and each class in the type storage unit 127 is given as an argument to the data access general-purpose component 130, thereby generating a tax rate history management unit 186 specialized for managing tax rate history data.
  • the first history management system 110 functions as a tax rate history management system, and includes a tax rate basic table 176, a tax rate application start table 177, a tax rate application end table 178, a tax rate application start cancellation table 179, and a tax rate application end cancellation table 180. Data corresponding to is accumulated.
  • FIG. 27A shows a search condition input screen 187 displayed on the Web browser of the client terminal 117, and the screen 187 includes items of country ID, date, and tax rate.
  • the user inputs “JP” as the country ID and “2009/01/03” as the date and clicks the search button 188, these search conditions are transmitted to the AP server 114 via the Web server 112. Sent. Receiving this, the data reference unit 118 passes the above search conditions to the tax rate history management unit 186 and requests a search process.
  • the tax rate history management unit 186 first issues, to the DB server 116, a SQL requesting to acquire the basic tax rate data related to “country ID: JP” from the basic tax rate table 176.
  • the tax rate history management unit 186 extracts the tax rate basic ID from the data received from the DB server 116, and requests acquisition of data related to the corresponding tax rate basic ID from the tax rate application start table 177 and the tax rate application end table 178. Is issued to the DB server 116.
  • the tax rate history management unit 186 extracts the tax rate application start ID from the data received from the DB server 116, and obtains the SQL with the content for requesting acquisition of the data related to the corresponding tax rate application start ID from the tax rate application start cancellation table 179. Issued to the DB server 116. At the same time, it extracts the tax rate application end ID from the data received from the DB server 116, and issues to the DB server 116 an SQL requesting the acquisition of the data related to the corresponding tax rate application end ID from the tax rate application end cancellation table 180 To do.
  • the tax rate history management unit 186 analyzes each data transmitted from the DB server 116 and specifies the JP (Japan) tax rate on “January 3, 2009”.
  • the data reference unit 118 transmits the search result data to the Web server 112.
  • a search result screen is transmitted from the Web server 112 to the client terminal 117.
  • FIG. 27B shows a search result screen 189 displayed on the Web browser of the client terminal 117, and a value of “5” (%) is displayed in the “tax rate” item.
  • the tax rate history management unit 186 performs logical correction, deletion, or additional processing of the tax rate application data in response to a request from the client terminal 117 in the same manner as the selling price history management unit 122 described above. Execute.
  • the tables for time history data history management are “basic table”, “application start table”, “application end table”, and “application start cancellation table”.
  • “Application end cancellation table” is unified into five, and the history management processing logic is made common as the data access general-purpose component 130, and a specific table configuration is applied to this, so that various timed data can be obtained. It has a mechanism for automatically generating a specialized history management unit. As a result, there is an advantage that maintenance is improved by providing a common mechanism regardless of the type of timed data, as well as saving time and labor for individually constructing a history management system and performing tests.
  • timed data history management system has shown an example in which data search or update is executed in response to a request from the client terminal 117.
  • the history management unit does not respond to requests from other computer systems.
  • various processes can be executed.
  • FIG. 28 shows a specific example, and the second history management system 190 for this timed data includes a selling price basic table 134, a selling price application start table 136, a selling price application end table 138, and a selling price application in the DB server 116.
  • a selling price application period table 191 is provided in addition to the start cancellation table 140 and the selling price application end cancellation table 142.
  • the selling price application period table 191 includes data items of “selling price application start ID (primary key / foreign key)”, “sale price application end ID (external key)”, and “registration date”. .
  • “sale price application end ID” may be used as a primary key.
  • the configuration of the other tables is the same as that shown in FIG.
  • the association between the selling price application start data and the selling price application end data is respectively Therefore, both data need to be registered at the same timing.
  • a selling price application period table 191 with items of selling price application start ID and selling price application end ID, the validity period can be correctly managed even if both data are registered at separate timings. Become.
  • the selling price history management unit 122 is similar to the above.
  • the DB server 116 is requested to register sales price application information of “Product ID: A / Sales price: 700 / Application start date: 2010/1901”.
  • the database management system 132 of the DB server 116 records the basic price data in the basic price table 134 only when the basic price data “Product ID: A / Selling price: 700” does not exist. Add Next, the database management system 132 adds a record having a selling price basic ID and an application start date (2010/1501) to the selling price application start table 136.
  • FIG. 31 (1) shows the selling price history data in which only the “application start date” is registered.
  • the selling price history management unit 122 executes processing for data correction. To do.
  • the selling price history management unit 122 uses the selling price basic ID related to the selling price basic data of “product ID: A / selling price: 700” and selling price application end data having the application end date of “2011/03/31”
  • the SQL requesting to be added to the application end table 138 is issued to the DB server 116.
  • the selling price history management unit 122 has a selling price application end period including a selling price application end ID related to the selling price application end data and a selling price application start ID related to the selling price application start data of “application start date: 2010/1501”.
  • An SQL requesting to add data to the selling price application period table 191 is issued to the DB server 116.
  • the sales price history management unit 122 associates the application start ID of each sales price application start data and the application end ID of the sales price application end data transmitted from the DB server 116 by associating the application start date and the application end date of the sales price application information. This is realized by checking whether they are registered together in the selling price application period data.
  • the selling price history management unit 122 needs to check the selling price application period table 191 at the time of reference and associate selling price application start data with selling price application end data. First, the start date is registered, and the end date can be additionally registered later, so that the timed data can be managed more flexibly.
  • the table setting unit 124 transmits this to the DB server 116 and requests generation of a new table.
  • the database management system 132 creates a new table (the selling price basic table 134, the selling price application start table 136, the selling price application end table 138, the selling price application start cancellation table 140, the selling price application end cancellation table 142, the selling price, The application period table 191) is generated in the storage device of the DB server 116.
  • the type generation unit 126 is activated, and a class (type) corresponding to each table generated in the DB server 116 is generated based on the setting data of each table received from the table setting unit 124.
  • the selling price basic class 170, selling price application start class 171, selling price application end class 172, selling price application start cancellation class 173, selling price application end cancellation class 174, and selling price application period table 191 are generated and stored in the type storage unit 127. Stored.
  • each class in the type storage unit 127 is given as an argument to the data access general-purpose component 130 corresponding to the six table configurations, so that the selling price history management unit 122 corresponding to the six table configurations is provided. Generate.
  • the sales price application period data is applied when the sales price application end data is added. Registered in the period table 191.
  • the selling price history management unit 122 sends the selling price application period data to the DB server 116 from the beginning. Request registration in the application period table 191.
  • the sales price application period data is not registered in the sales price application period table 191.
  • the selling price history management unit 122 matches the application start date and the application end date based on the same registration date and time of the application start data and the application end data.
  • the second history management system 190 can be configured.
  • the selling price application start data itself becomes unnecessary before the selling price application end data is registered after registering the selling price application start data once, the selling price application start ID related to the selling price application start data is set. It may be registered in the selling price application start cancellation table 140.
  • the sale price application end date is registered after the sale price application start date is registered first.
  • the sale price application end date is registered first.
  • the sales price application start date is registered in advance and the corresponding sales price application is applied later. It is possible to substantially add an end date.
  • the sales price application start data of “Product ID: B / Sales price: 1700 yen / Application start date: 2011/03/01” is registered first on April 1, 2011.
  • sales price application start data of “product ID: B / selling price: 1700 yen / application start date: 2011/1501” and “product ID: B / selling price: 1700” "Yen / Applicable end date: 2012/03/31" is registered at the same time.
  • the sales price application start data of “Product ID: B / Sale price: 1700 yen / Application start date: 2011/03/01” will be duplicated. Since the selling price application start data in FIG. 33 (1) is excluded from the reference object, the selling price application end date is substantially added.
  • the selling price history management unit 122 collates the selling price application start data 201 with the selling price application start cancellation data 202 to eliminate the selling price application start data 201 in which the selling price application start cancellation data 202 is registered, and the selling price application start cancellation data. Exclusion processing (except) 204 is executed to extract selling price application start data 201 for which 202 is not registered as effective selling price application start data 203.
  • the selling price history management unit 122 specifies a target to be verified based on the selling price application start ID assigned to the selling price application start data 201 and the selling price application start cancellation data 202.
  • the effective selling price application start data 203 includes at least a selling price application start ID, a selling price basic ID, and an application start date.
  • the selling price history management unit 122 collates the selling price application end data 205 and the selling price application end cancellation data 206 to eliminate the selling price application end data 205 in which the selling price application end cancellation data 206 is registered, and to cancel the sales price application end data. Exclusion processing (except) 208 is executed in which selling price application end data 205 for which data 206 is not registered is extracted as effective selling price application end data 207. At this time, the selling price history management unit 122 identifies a target to be collated based on the selling price application end ID assigned to the selling price application end data 205 and the selling price application end cancellation data 206.
  • the effective selling price application end data 207 includes at least a selling price application end ID, a selling price basic ID, and an application end date.
  • the selling price history management unit 122 collates the effective selling price application start data 203 and the effective selling price application end data 207, and based on the matching result, the effective selling price application start / end data 209, the effective selling price application start (no end).
  • the matching process 212 for outputting the data 210 and the effective sale price application end (no start) data 211 is executed.
  • the selling price history management unit 122 when the corresponding effective selling price application start data 203 and the effective selling price application end data 207 are available, sets the effective selling price application start / end data 209 based on both data. It is generated and output to the data reference unit 118.
  • the effective selling price application start / end data 209 includes at least a selling price basic ID, an application start date, and an application end date.
  • the selling price history management unit 122 stores the data as effective selling price application start (no end) data 210 in the data reference unit 118. Output.
  • the selling price history management unit 122 stores the data as effective selling price application end (no start) data 211 in the data reference unit 118. Output.
  • the correspondence between the data is determined based on the difference in registration date and time of each effective selling price application start data 203 and effective selling price application end data 207 as described above.
  • the selling price history management unit 122 sums up the registration date and time of each effective selling price application start data 203 and the registered date and time of the effective selling price application end data 207. It is necessary to collate with the hit formula and associate the matched items with each other, and it is necessary to collate up to “number of sales price application start data ⁇ number of price application end data”.
  • the selling price application period table 191 in which the correspondence relationship between selling price application start data and selling price application end data is associated in a one-to-one relationship is provided, thereby greatly increasing the processing amount of the selling price history management unit 122. It becomes possible to reduce it.
  • the processing procedure of the selling price history management unit 122 in this case will be described below with reference to the flowchart of FIG.
  • the selling price history management unit 122 collates the selling price application start data 201 with the selling price application start cancellation data 202 to eliminate the selling price application start data 201 in which the selling price application start cancellation data 202 is registered, and the selling price application start cancellation data. Exclusion processing (except) 204 is executed to extract selling price application start data 201 for which 202 is not registered as effective selling price application start data 203.
  • the selling price history management unit 122 identifies a target to be verified based on the selling price application start ID assigned to the selling price application start data 201 and the selling price application start cancellation data 202.
  • the effective selling price application start data 203 includes at least a selling price application start ID, a selling price basic ID, and an application start date.
  • the selling price history management unit 122 collates the selling price application end data 205 and the selling price application end cancellation data 206 to eliminate the selling price application end data 205 in which the selling price application end cancellation data 206 is registered, and to cancel the sales price application end data. Exclusion processing (except) 208 is executed in which selling price application end data 205 for which data 206 is not registered is extracted as effective selling price application end data 207.
  • the selling price history management unit 122 specifies a target to be verified based on the selling price application start ID allocated to the selling price application end data 205 and the selling price application end cancellation data 206.
  • the effective selling price application end data 207 includes at least a selling price application end ID, a selling price basic ID, and an application end date.
  • the selling price history management unit 122 collates the effective selling price application start data 203 with the selling price application period data 215, and for the effective selling price application start data 203 for which the corresponding selling price application period data 215 exists, the effective selling price application start + end A join process (join) 217 for generating ID data 216 is executed.
  • the selling price history management unit 122 specifies a target to be verified based on the selling price application start ID stored in the effective selling price application start data 203 and the selling price application period data 215.
  • the effective selling price application start + end ID data 216 includes at least a selling price application start ID, a selling price basic ID, an application start date, and a selling price application end ID.
  • the selling price history management unit 122 collates the effective selling price application start data 203 and the selling price application period data 215 to eliminate the effective selling price application start data 203 in which the corresponding selling price application period data 215 exists, and the corresponding selling price application period Exclusion processing (except) 218 is executed in which valid selling price application start data 203 for which no data 215 exists is output as effective selling price application start (no end) data 210.
  • the selling price history management unit 122 specifies a target to be verified based on the selling price application start ID stored in the effective selling price application start data 203 and the selling price application period data 215.
  • the selling price history management unit 122 collates the valid selling price application end data 207 with the valid selling price application start + end ID data 216 and relates to the effective selling price application end data 207 in which the corresponding effective selling price application start + end ID data 216 exists. Executes a join process (join) 219 for generating effective selling price application start / end data 209. At this time, the selling price history management unit 122 identifies a target to be collated based on the selling price application end ID stored in the effective selling price application end data 207 and the effective selling price application start + end ID data 216.
  • the effective selling price application start / end data 209 includes at least a basic selling price ID, an application start date, and an application end date.
  • the selling price history management unit 122 collates the effective selling price application end data 207 with the effective selling price application start + end ID data 216, and obtains the effective selling price application end data 207 in which the corresponding effective selling price application start + end ID data 216 exists.
  • an exclusion process (except) 220 is executed to output the effective selling price application end data 207 for which the corresponding effective selling price application start + end ID data 216 does not exist as the effective selling price application end (no start) data 211.
  • the selling price history management unit 122 identifies a target to be collated based on the selling price application end ID stored in the effective selling price application end data 207 and the effective selling price application start + end ID data 216.
  • the selling price history management unit 122 sets the effective selling price application start / end data 209, the effective selling price application start (no end) data 210, the effective selling price application end (no start) data 211, and the basic price ID.
  • the corresponding product ID and selling price are output to the data reference unit 218, and the search result screen is transmitted to the client terminal 217 through the Web server 212.
  • FIG. 37 shows the search result screen 222.
  • NO.0022 and NO.0025 correspond to the effective selling price application start / end data 209 in which the application start date and the application end date are aligned.
  • the selling price history management unit 122 can uniquely identify the matching target “one-to-one” by matching the selling price application start IDs or selling price application end IDs of each data. For this reason, it is possible to significantly reduce the amount of processing compared to a case where a plurality of data is collated with a brute force formula in a “many-to-many” relationship.
  • the “first combination target storage means for storing a plurality of similar data having different values as the first combination target data” in claim 13 includes “a plurality of selling price application start data.
  • the selling price application start table 136 storing “
  • the second combination target storage means for storing a plurality of the same kind of data having different values as the second combination target data having a different type from the first combination target data. ”Corresponds to“ a sales price application end table 138 storing a plurality of sales price application end data ”.
  • “relevant data recording the ID of the specific first combination target data and the ID of the specific second combination target data to be combined with the first data is stored.
  • the “related storage means” corresponds to “a selling price application period table 191 storing a selling price application start ID and a selling price application end ID”.
  • the related data including the ID of the specific first combining target data extracted from the first combining target storage means is extracted from the related storing means and recorded in the related data.
  • “means for executing the first combining process for generating the intermediate data in which the ID of the second combination target data is added to the first combination target data” includes “effective sales price application start + end” as the intermediate data. This corresponds to the selling price history management unit 122 that executes the combining process 217 for generating the “ID data 216”.
  • the second combination target data retrieved from the second combination target storage unit is specified with the ID added to the intermediate data recorded, and the intermediate data
  • the means for executing the second combining process for generating combined data obtained by adding the values of at least some of the data items of the second combining target data to the “combining process for generating the effective selling price application start / end data 209” This corresponds to the selling price history management unit 122 that executes 219.
  • the first combination target data when there is no related data having the ID of the specific first combination target data, the first combination target data is separated as data having no corresponding second combination target data.
  • the means for executing the first exception process corresponds to the selling price history management unit 122 that executes the exclusion process 218 that separates and outputs the effective selling price application start data 203 as the effective selling price application start (no end) data 210. .
  • the second combination target data when there is no intermediate data having the ID of the specific second combination target data, the second combination target data is separated as data for which the corresponding first combination target data does not exist
  • the selling price history management unit 122 that executes the exclusion process 220 that separates and outputs the effective selling price application end data 207 as the effective selling price application end (no start) data 211 corresponds to “means for executing the second exclusion process to be performed”.
  • the present invention is not limited to the association between the application start data and the application end data in the timed data history management system, and can be widely applied to associations between other data.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

AP サーバ14 と複数のDB サーバ16 を備えたデータ利用システム10 であって、各DB サーバ16は、同一データを保持した共通のテーブルを備える。各テーブルには、キー項目が一つに限定される制約と、更新・削除禁止の制約が課せられている。AP サーバ14 の検索条件分割処理部20は、検索条件を分割して複数の検索処理部22 に割り当て、各検索処理部22 は、対応のSQL を対応のDB サーバ16 に発行し、一定量の検索結果が送信される度に演算処理をデータ加工処理部24 に割り当て、加工処理結果が揃った時点で検索結果統合処理部26 に集計結果を出力し、検索結果統合処理部26 は、各検索処理部22 からの集計結果を集計し、検索結果として出力し、追加データ受付部27 は、入力された追加データのコピーを各登録処理部28 に割り当て、各登録処理部28 は、追加データの登録を求めるSQL を対応のDB サーバ16 に発行する。

Description

データ利用システム、時限データの履歴管理システム及びデータ処理システム
 この発明は、データ利用システム、時限データの履歴管理システム及びデータ処理システムに係り、特に、アプリケーションサーバとデータベースサーバとの連携により、データベースサーバに格納されたデータの利用を効率化する技術、有効期間を備えた時限データの履歴を管理する技術、本来的に多対多の照合を要するデータ処理を1対1の照合に分解する技術に関する。
(1) 巨大流通チェーンのように、大規模な業務システムを構築し、日々運用している企業においては、データベースサーバ(以下「DBサーバ」)が多数のテーブルを管理しており、複数のアプリケーションサーバ(以下「APサーバ」)によって構成されるサブシステム(受発注システム、仕入れシステム、経理システム等)が、上記のテーブルを共同利用する形式をとっている(非特許文献1参照)。
 しかしながら、システムの規模が拡大するにつれて、テーブルの数が増大すると共に、テーブル間の関係も複雑化し、その分、テーブルを操作するためのSQLの発行数の増大や処理内容の複雑化が生じ、この結果、DBサーバ16側の演算処理の負担が増加し、応答の遅れが生じていた。
 これを回避するため、サブシステム毎に必要性の高いデータ項目を組み合わせると共に独自のビジネスルールを反映させた中間テーブルを生成し、DBサーバ16に管理させる方法が一般に採られている。
 この結果、当該サブシステムから発行させるSQLは確かに簡素化され、サブシステム単位での演算処理量を低減することはできるが、システム全体としてのデータ一元性を担保するため、DBサーバ16にはバッチ処理によってデータの変換・更新処理を行う必要性が生じる。そして、最近では取扱いデータ量の増大に伴い、夜間バッチ処理では上記の変換・更新処理が間に合わなくなるという事態が生じ始めている。
(2) また、データベースには、本来的にデータの一元性を維持するという使命があるため、従来は1台のDBサーバで業務に必要な全テーブルを管理することが行われていたが、取扱データ量の増大に伴い、1台のDBサーバで業務に必要なテーブル全てを管理することが物理的に困難となってきた。このため最近では、相互に独立した複数のDBサーバによって、各種テーブルを分散管理することが行われている。
 ところで、複数のデータベースに対する更新処理を実行する際には、全てのデータベースに対するコミットが成立しないとデータ相互間に矛盾が生じるため、通常はXAインターフェースの2相コミットと称する調停方式が採用され、データベース相互間の整合性が担保される。
 この2相コミットではまず、処理全体を司るマスターサーバが、対象となるDBサーバに対し、コミットが実行可能であるかを問い合わせる。更新準備が整っているDBサーバは「準備完了」の応答を返し、すべてのDBサーバが準備を終えたことを確認した上で、マスターサーバはコミット開始を通知し、データベースが一斉に書き換えられる。書き換え中にいずれかのデータベースで異常が発生した場合、異常が生じたDBサーバは失敗を伝え、マスターサーバはすべてのサーバに処理撤回を通知して、データを復元する「ロールバック」処理を行うよう指示する(非特許文献2)。
 上記のように、2相コミット方式の採用によって複数のDBサーバ間でデータの整合性を確保することは技術的に可能である。
 しかしながら、DBサーバ間の調停を行うトランザクション・マネージャの処理能力がボトルネックとなり、データ処理量が膨大となる大規模システムの基盤としては、信頼性に不安があった。
(3) また、商品の販売価格やサービスの提供価格は一定ではなく、通常価格(定価)の他にも様々な期間限定のキャンペーン価格が存在するため、同一商品について後で売上の集計等を行う際には、各販売時点における販売価格を特定する必要がある(非特許文献3参照)。価格は一定に据え置いたまま、時間帯によって割引率を変更する場合も同様である。このため、販売管理システム等においては、時系列に沿って販売価格や割引率が変遷したことを記録する履歴管理機能が設けられている。
 あるいは、各国の消費税率も常時一定ではなく、法律改正によって変動する可能性があるため、消費税額を算出するためには、やはり各販売時点における販売国の消費税率を特定する必要がある。このため、経理システム等においては、時系列に沿って消費税率が変遷したことを記録する履歴管理機能が不可欠となる。
 上記のように、各種の業務システムにおいては、期間によって値が変動する様々な時限データについて、その変遷履歴を管理する仕組みが設けられているが、これまでは有効期間の適用対象毎に担当技術者が独自に履歴管理システムを設計していた。このため、その度に余計な労力がかかることはもちろん、システム間に互換性がなく、メンテナンスが困難であった。また、各自が一からコーディングするため、連結テストも個別に行う必要があった。
(4) さらに、コンピュータによる情報処理に際しては、同種のグループに属する複数のデータと、異なる種類のグループに属する複数のデータ間において、双方の特定のデータ項目の値の同一性に基づいて異種データを結合させる必要が生じる場合がある(非特許文献4参照)。
 このような場合、これまでは「第1のグループに属するデータの数×第2のグループに属するデータの数」分のメモリを確保した上で、双方のデータの値を総当たり式に比較していくことで、結合対象となるデータの探索が実行されていた。このため、各グループに属するデータの数が多い場合には膨大な計算量が必要となり、コンピュータ資源の効率的な利用が妨げられていた。また、予めメモリ空間上に必要な作業領域が設定される関係で、1のCPUコアに全ての処理を担当させる必要があり、昨今注目を集めているCPUのマルチコア化に対応できないという問題があった。
Webシステム入門/第1回 Webサイトの構成とJ2EEサーバ インターネットURL:http://www.atmarkit.co.jp/fjava/rensai2/websys01/websys01.html 検索日:2011年10月20日 2相コミット インターネットURL:http://e-words.jp/w/2E79BB8E382B3E3839FE38383E38388.html 検索日:2011年12月13日 HP Designjet L25500用保守サービス製品 特別価格キャンペーン インターネットURL:http://h50146.www5.hp.com/products/printers/designjet/campaign/latex_carepack201103/ 検索日:2012年2月1日 θ-join and equijoin インターネットURL:http://en.wikipedia.org/wiki/Relational_algebra#.CE.B8-join_and_equijoin 検索日:2012年3月7日
 この発明は、従来の上記(1)の問題を解決するために案出されたものであり、大規模な情報処理システムにおけるAPサーバ及びDBサーバの構成を最適化することにより、システム全体の処理速度を向上させ得る技術の実現を第1の目的としている。
 また、この発明は、従来の上記(2)の問題を解決するために案出されたものであり、複数のDBサーバによるテーブルの分散管理を前提としつつも、XAインターフェースの2相コミットに依存することなく、データ相互間の整合性を担保可能な技術の実現を第2の目的としている。
 また、この発明は、従来の上記(3)の問題を解決するために案出されたものであり、汎用性に優れた時限データの履歴管理システムを提供することを第3の目的としている。
 さらに、この発明は、従来の上記(4)の問題を解決するために案出されたものであり、本来、多対多のデータ間で照合すべき処理を、1対1のデータ間での照合処理に変換することにより、関連データ間の結合処理を効率化すると共に、CPUのマルチコア化にも対応可能なデータ処理システムを実現することを第4の目的としている
 上記第1の目的を達成するため、請求項1に記載したデータ利用システムは、複数のデータベースサーバと、各データベースサーバにネットワークを介して接続されたアプリケーションサーバとからなるデータ利用システムであって、上記の各データベースサーバは、DB管理システムとデータ記憶領域を備えており、各データベースサーバのデータ記憶領域には、データベースサーバ相互間に共通するデータを保持した共通のテーブルがそれぞれ複数格納されており、上記の各テーブルには、キー項目が一つに限定される制約と、データの更新及び削除が禁止される制約が設けられており、上記アプリケーションサーバは、検索条件分割処理部と、複数の検索処理部と、複数のデータ加工処理部と、検索結果統合処理部と、追加データ受付部と、複数の登録処理部を備え、上記検索条件分割処理部は、入力された検索条件を解析して複数の検索条件に分割すると共に、各検索条件及び対応データベースサーバを上記複数の検索処理部に割り当てる処理を実行し、上記の各検索処理部は、自己に割り当てられた検索条件に対応したSQLを生成し、自己に割り当てられたデータベースサーバに発行する処理と、データベースサーバから一定量の検索結果データが送信される度に、必要な演算処理を上記の各データ加工処理部に割り当てる処理と、各データ加工処理部から部分的な加工処理結果データが返される度に、これをメモリに格納すると共に、データベースサーバから送信されたデータをメモリ上から削除する処理と、データベースサーバからのデータ送信が完了し、部分的な検索結果データに基づく部分的な加工処理結果データが全て揃った時点で、これらを集計して上記検索結果統合処理部に集計結果を出力する処理を実行し、上記検索結果統合処理部は、各検索処理部から渡された集計結果を集計し、検索結果として出力する処理を実行し、上記追加データ受付部は、入力された追加データのコピーと、対応データベースサーバの特定情報を含むデータ追加リクエストを上記の各登録処理部に割り当てる処理を実行し、上記の各登録処理部は、上記追加データの登録を求めるSQLを生成し、自己に割り当てられたデータベースサーバに発行する処理を実行することを特徴としている。
 上記第2の目的を達成するため、請求項2に記載したデータ利用システムは、複数のデータベースサーバと、各データベースサーバにネットワークを介して接続されたアプリケーションサーバとからなるデータ利用システムであって、上記の各データベースサーバは、DB管理システムと、各種テーブルが格納される外部記憶装置を備えており、上記の各テーブルには、データの更新及び削除が禁止される制約が設けられており、上記アプリケーションサーバは、登録処理部及び検索処理部を備えており、上記登録処理部は、複数のデータベースサーバがそれぞれ管理している異なるテーブルに対し相互に関連する複数データの組合せの追加を求める登録リクエストが入力された場合に、対応のテーブルを備えた各データベースサーバに対応データの追加登録を求めるSQLを発行する処理と、何れかのデータベースサーバの外部記憶装置に設けられた関連テーブルに対して各追加データのIDの登録を求めるSQLを生成し、当該関連テーブルを管理するデータベースサーバに発行する処理を実行し、上記検索処理部は、複数のデータベースサーバの外部記憶装置に格納されている異なるテーブルから相互に関連する複数データの組合せの抽出を求める検索条件が入力された場合に、上記関連テーブルを参照して抽出対象となる各データのIDを特定する処理と、対応のデータベースサーバが管理している各テーブルを参照し、必要なデータの組合せが揃っているか否かを確認する処理と、必要なデータの組合せが全て揃っている場合には各データベースサーバにSQLを発行して対応データの抽出を指令し、必要なデータの組合せが揃っていない場合には当該データの組合せを抽出対象から除外する処理を実行することを特徴としている。
 請求項3に記載したデータ利用システムは、請求項2のシステムを前提とし、さらに、上記の各データベースサーバは複数のDB系統に分類されており、同一のDB系統に属する複数のデータベースサーバの外部記憶装置には、相互に等しいデータを保持した共通のテーブルがそれぞれ格納されており、異なるDB系統に属するデータベースサーバの外部記憶装置には、異なるデータを保持した別個のテーブルがそれぞれ格納されており、上記アプリケーションサーバは、追加データ受付部と、複数の上記登録処理部と、検索条件分割処理部と、複数の上記検索処理部と、複数のデータ加工処理部と、検索結果統合処理部とを備え、上記追加データ受付部は、複数のDB系統に属する異なるテーブルに対し相互に関連する複数データの組合せの追加を求める登録リクエストが入力された場合に、入力された複数データの組合せのコピーと、異なるDB系統に属する複数のデータベースサーバの特定情報を含むデータ追加リクエストを上記の各登録処理部に割り当てる処理を実行し、各登録処理部は、対応データの追加登録を求めるSQLを自己に割り当てられた各データベースサーバに発行する処理と、各追加データのIDの登録を求めるSQLを生成し、各データベースサーバの中で上記関連テーブルを管理するデータベースサーバに発行する処理を実行し、上記検索条件分割処理部は、異なるDB系統に属する複数のテーブルから相互に関連する複数データの組合せの抽出を求める検索条件が入力された場合に、この検索条件を解析して複数の検索条件に分割すると共に、分割された各検索条件及び異なるDB系統に属する各データベースサーバの特定情報を上記複数の検索処理部に割り当てる処理を実行し、各検索処理部は、自己に割り当てられた検索条件に対応したSQLを生成し、自己に割り当てられた各データベースサーバに発行する処理と、各データベースサーバから一定量の検索結果データが送信される度に、必要な演算処理を上記の各データ加工処理部に割り当てる処理と、各データ加工処理部から部分的な加工処理結果データが返される度に、これをメモリに格納すると共に、データベースサーバから送信されたデータをメモリ上から削除する処理と、データベースサーバからのデータ送信が完了し、部分的な検索結果データに基づく部分的な加工処理結果データが全て揃った時点で、これらを集計して上記検索結果統合処理部に集計結果を出力する処理を実行し、上記検索結果統合処理部は、各検索処理部から渡された集計結果を集計し、検索結果として出力する処理を実行することを特徴としている。
 請求項4に記載したデータ利用システムは、請求項1または3のシステムを前提とし、さらに上記検索条件分割処理部は、入力された検索条件が時間的な範囲を含んでいる場合に、これをより短い時間的な範囲に分割することを特徴としている。
 請求項5に記載したデータ利用システムは、請求項1または3のシステムを前提とし、さらに上記検索条件分割処理部は、入力された検索条件が地域的な範囲を含んでいる場合に、これをより狭い地域的な範囲に分割することを特徴としている。
 請求項6に記載したデータ利用システムは、請求項1~5のシステムを前提とし、さらに、インデックス生成部及びインデックス記憶部を有するインデックスサーバを備えており、また上記の各データベースサーバは、暫定記憶領域及び永続記憶領域を備えており、上記DB管理システムは、上記アプリケーションサーバから送信された追加データを上記暫定記憶領域に格納する処理と、所定の時間間隔で暫定記憶領域内の追加データを上記永続記憶領域に移動する処理を実行し、上記インデックスサーバのインデックス生成部は、所定の時間間隔で上記データベースサーバの暫定記憶領域に格納された追加データを取得する処理と、この追加データに基づいてインデックスを生成し、上記インデックス記憶部に格納する処理を実行し、上記アプリケーションサーバの検索処理部は、自己に割り当てられた検索条件に対応した上記SQLを生成するに際し、上記インデックスサーバのインデックス記憶部を参照し、検索条件に該当する各データの主キーを取得する処理と、この主キーによって取得データを指定したSQLを生成する処理を実行することを特徴としている。
 請求項7に記載したデータ利用システムは、請求項1、3~6のシステムを前提とし、さらに、上記の各データベースサーバはメモリ上に設けられた更新ログ記憶領域を備えており、各データベースサーバのOSが、上記アプリケーションサーバから送信された追加データを上記更新ログ記憶領域に順次格納する処理を実行することを特徴としている。
 上記第3の目的を達成するため、請求項8に記載した時限データの履歴管理システムは、特定の有効期間と値を備えた時限データを格納しておくDBサーバと、このDBサーバにアクセスしてデータの参照及び追加を依頼する履歴管理部とを備えたシステムであって、上記DBサーバは、有効期間の適用対象及びその値を固有の基本IDに関連付けて格納する基本テーブルと、上記適用対象及び値の有効期間の始期を、対応の基本ID及び固有の適用開始IDに関連付けて登録する適用開始テーブルと、上記適用対象及び値の有効期間の終期を、対応の基本ID及び固有の適用終了IDに関連付けて登録する適用終了テーブルと、上記適用開始IDを格納する適用開始取消テーブルと、上記適用終了IDを格納する適用終了取消テーブルとを備え、上記履歴管理部は、(1)適用対象、値、有効期間を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加すると共に、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルに追加すると共に、この基本データの基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加し、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼する処理を実行し、(2)適用対象、値、有効期間の少なくとも一つを検索条件として特定した時限データの参照リクエストが入力された場合に、上記DBサーバに対して、上記検索条件にマッチする基本データ、適用開始データ、適用終了データ、適用開始取消データ、適用終了取消データの送信を依頼し、DBサーバから送信された時限データの中で、適用開始取消データ及び適用終了取消データが登録されたものを除外した上で、検索結果として出力する処理を実行し、(3)特定の時限データの削除リクエストが入力された場合に、上記DBサーバに対し、当該時限データに係る適用開始データの適用開始IDを備えた適用開始取消データを上記適用開始取消テーブルに追加すると共に、当該時限データに係る適用終了データの適用終了IDを備えた適用終了取消データを上記適用終了取消テーブルに追加することを依頼する処理を実行し、(4)適用対象、値、有効期間を特定した時限データの修正リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加すると共に、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルにを追加すると共に、この基本データの基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加し、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼する処理を実行することを特徴としている。
 請求項9に記載した時限データの履歴管理システムは、請求項8に記載のシステムであって、さらに上記DBサーバは、上記適用開始ID及び適用終了IDを関連付けて登録する適用期間テーブルを備えており、上記履歴管理部は、(1)適用対象、値、有効期間の始期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルに追加すると共に、この基本データの基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加することを依頼する処理を実行し、(2)上記基本ID、適用開始ID及び有効期間の終期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、当該基本ID及び上記終期を備えた適用終了データを上記適用終了テーブルに追加すると共に、上記適用開始ID及び上記適用終了データの適用終了IDを上記適用期間テーブルに追加することを依頼する処理を実行し、(3)適用対象、値、有効期間の終期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルに追加すると共に、この基本データの基本ID及び有効期間の終期を備えた適用開終了データを上記適用終了テーブルに追加することを依頼する処理を実行し、(4)上記基本ID、適用終了ID及び有効期間の始期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、当該基本ID及び上記始期を備えた適用開始データを上記適用開始テーブルに追加すると共に、上記適用終了ID及び上記適用開始データの適用開始IDを上記適用期間テーブルに追加することを依頼する処理を実行することを特徴としている。
 請求項10に記載した時限データの履歴管理システムは、請求項9に記載のシステムであって、さらに、上記履歴管理部は、適用対象、値、有効期間の少なくとも一つを検索条件として特定した時限データの参照リクエストが入力された場合において、DBサーバから送信された適用開始データ中で、そのIDが何れかの適用開始取消データに含まれているものを除外すると共に、そのIDが何れかの適用開始取消データに含まれていないものを有効適用開始データと認定する処理と、DBサーバから送信された適用終了データ中で、そのIDが何れかの適用終了取消データに含まれているものを除外すると共に、そのIDが何れかの適用終了取消データに含まれていないものを有効適用終了データと認定する処理と、上記有効適用開始データの中で、そのIDがDBサーバから送信された何れかの適用期間データに含まれているものを除外すると共に、そのIDが何れかの適用期間データに含まれていないものについて有効適用開始(終了無し)データと認定する処理と、上記有効適用開始データの中で、そのIDがDBサーバから送信された何れかの適用期間データに含まれているものについて、対応の適用終了IDを追加した有効適用開始+終了IDデータを生成する処理と、上記有効適用終了データの中で、そのIDが上記有効適用開始+終了IDデータに含まれているものについて、当該有効適用終了データの終期を追加した有効適用開始・終了データを生成する処理と、上記有効適用終了データの中で、そのIDが上記有効適用開始+終了IDデータに含まれているものを除外すると共に、そのIDが上記有効適用開始+終了IDデータに含まれていないものについて有効適用終了(開始無し)データと認定する処理とを実行することを特徴としている。
 請求項11に記載した時限データの履歴管理システムは、請求項8~10に記載のシステムであって、さらに、同一の適用対象について相互に重複する有効期間を備えた複数の時限データが存在する場合に、上記履歴管理部は、上記適用開始データ及び適用終了データに設定された登録日時が最も新しい時限データを重複している期間について有効と認定することを特徴としている。
請求項12に記載した時限データの履歴管理システムは、請求項8~11に記載のシステムであって、さらに、上記適用対象の種類に対応した具体的なテーブル名及び各テーブルが備える上記適用対象の種類に対応した具体的な項目名等のテーブル設定情報に基づいて、少なくとも具体的なテーブル名、具体的なデータ項目及び各データ項目のデータ型を定義したクラスをテーブル毎に生成し、所定の記憶手段に格納する型生成手段と、上記履歴管理部の処理ロジックを記述したプログラム部品を格納しておく記憶手段と、上記プログラム部品に上記の各クラスを引数として与えることにより、各テーブルの操作に特化した履歴管理部を生成する手段とを備えたことを特徴としている。
 上記第4の目的を達成するため、請求項13に記載したデータ処理システムは、相互に値が異なる複数の同種データを、第1の結合対象データとして格納しておく第1の結合対象記憶手段と、相互に値が異なる複数の同種データを、上記第1の結合対象データとは種類を異にする第2の結合対象データとして格納しておく第2の結合対象記憶手段と、特定の第1の結合対象データのIDと、当該第1のデータの結合対象となるべき特定の第2の結合対象データのIDを記録した関連データを格納しておく関連記憶手段と、上記第1の結合対象記憶手段から取り出された特定の第1の結合対象データのIDを備えた関連データを、上記関連記憶手段から取り出すと共に、当該関連データに記録された第2の結合対象データのIDを、上記第1の結合対象データに追加した中間データを生成する第1の結合処理を実行する手段と、上記第2の結合対象記憶手段から取り出された第2の結合対象データの中で、当該中間データに追加されたIDが記録されたものを特定すると共に、当該中間データに第2の結合対象データの少なくとも一部のデータ項目の値を追加した結合データを生成する第2の結合処理を実行する手段とを備えたことを特徴としている。
 請求項14に記載したデータ処理システムは、請求項13のシステムであって、さらに、特定の第1の結合対象データのIDを備えた関連データが存在しない場合に、当該第1の結合対象データを対応する第2の結合対象データが存在しないデータとして分離する第1の除外処理を実行する手段と、特定の第2の結合対象データのIDを備えた中間データが存在しない場合に、当該第2の結合対象データを対応する第1の結合対象データが存在しないデータとして分離する第2の除外処理を実行する手段とを備えたことを特徴としている。
 請求項1に記載のデータ利用システムの場合、データベースサーバが管理する各テーブルの正規化が極限まで追求され、構造の単純化が実現される一方で、テーブルから抽出したデータの加工処理(ソートやマッチング、コントロールブレイク等)はアプリケーションサーバ側で実行され、データベースサーバはデータの出し入れに専念できるため、テーブル数の増大やテーブル間の関係の複雑化に伴いSQLの発行数が増大しても、データベースサーバ側の負担増を抑制することが可能となる。
 また、データベースサーバが物理的に複数台用意され、検索処理時には検索条件が各データベースサーバに分散される仕組みであるため、個々のデータベースサーバにおけるデータ抽出処理が軽減される結果、システム全体の処理速度を向上させることができる。
 しかも、アプリケーションサーバにおいては、入力された検索条件が複数に分割され、それぞれ複数の検索処理部を介してデータベースサーバにデータの検索依頼が送信されると共に、データベースサーバから各検索処理部に対して返された検索結果データに対しても、一定量単位で複数のデータ加工処理部による並列処理が実行されるため、データベースサーバから大量のデータが送信される場合であっても、多数のCPUコアを用いることで効率的な処理が可能となる。また、このようにデータベースサーバからの検索結果データが全て揃うまで待機することなく、一定量のデータが揃った時点で部分的な加工処理に移行することにより、データベースサーバ側のDISK/IOによる遅延を緩和することも可能となる。
 これまで、DNA解析や気象解析のように純粋な演算処理を主体とした科学技術計算と異なり、データベースに蓄積された大量のデータを参照する必要のある業務系処理の場合には、データベースサーバからの応答を待つDISK/IOがボトルネックとなるため、アプリケーションサーバ側のCPUコアの数を増やしたとしても、直ちに処理速度の向上には結びつかないという問題があった。
 これに対し、上記のような仕組みをアプリケーションサーバに設けることにより、テーブルの正規化の追求に伴うデータベースサーバ側の負担増を、アプリケーションサーバ側の処理の効率化によってカバーすることが可能となった。
 請求項2に記載のデータ利用システムにあっては、複数のデータベースサーバに対してそれぞれ異なるデータを同時に追加登録する際には各データの登録の成否を問題にすることなく、各データを検索する際に関連テーブルを参照して関連データが揃っているか否かを確認し、揃っていない場合には当該データの組合せの追加登録がなかったものとして処理する方式を採用している。
 このため、従来のようにXAインターフェースの2相コミットを利用することなく、データ相互間の整合性を検索時に確保することが可能となる。
 このデータ利用システムにおいては、テーブルに対する登録処理としてはデータの追加のみが許容され、データの更新や削除が禁止されているため、上記のようなデータ間の整合性確保方式を採用することが可能となる。
 すなわち、データの内容変更は必ずデータの追加という形で表現されることから、検索処理部は関連テーブルを参照した結果、あるべきデータが存在しないと判明した時点で、追加処理の失敗と判断することが可能となる。
 請求項3に記載のデータ利用システムの場合、各データベースサーバが複数のDB系統に分類されると共に、同一のDB分類に属する複数のデータベースサーバは相互に共通のテーブルを備えており、検索処理時には検索条件が各データベースサーバに分散される仕組みであるため、個々のデータベースサーバにおけるデータ抽出処理が軽減される結果、システム全体の処理速度を向上させることができる。
 しかも、アプリケーションサーバにおいては、入力された検索条件が複数に分割され、それぞれ複数の検索処理部を介してデータベースサーバにデータの検索依頼が送信されると共に、データベースサーバから各検索処理部に対して返された検索結果データに対しても、一定量単位で複数のデータ加工処理部による並列処理が実行されるため、データベースサーバから大量のデータが送信される場合であっても、多数のCPUコアを用いることで効率的な処理が可能となる。また、このようにデータベースサーバからの検索結果データが全て揃うまで待機することなく、一定量のデータが揃った時点で部分的な加工処理に移行することにより、データベースサーバ側のDISK/IOによる遅延を緩和することも可能となる。
 請求項6に記載のデータ利用システムの場合、インデックス(二次索引)の作成処理が外部の独立したインデックスサーバに移譲されているため、これに纏わるデータベースサーバ側の負担を解消することができる。
 しかも、データ参照時には個々のデータの主キーを指定した形のSQLがアプリケーションサーバから発行されるため、データベースサーバ側でテーブルをソートする必要がなくなり、その分、データベースサーバの負荷を低減することができる。
 請求項7に記載のデータ利用システムの場合、データベースサーバの更新ログがメモリ上に格納される機構を備えているため、更新ログをディスク上に格納する場合に比べて、データベースサーバ側のDISK/IOを低減することができる。
 この更新ログ記憶領域は、各データベースサーバのOSによってメモリ上に設定されると共に、更新ログの格納処理もOSの機能によって実現される仕組みであるため、データベースサーバ用のアプリケーションプログラムが機能停止しても、OSがダウンしない限り復旧は可能である。
 しかも、データベースサーバが物理的に複数台用意されると共に、各データベースサーバにおいては同一の追加データが更新ログとして更新ログ記憶領域に蓄積される仕組みであるため、停電等の事故によって一のデータベースサーバにおいて更新ログが消えてしまった場合でも、他のデータベースサーバに格納された更新ログによって容易に復旧可能となる。
 請求項8に記載した時限データの履歴管理システムの場合、それぞれ極めて簡素なデータ項目を備えた基本テーブル、適用開始テーブル、適用終了テーブル、適用開始取消テーブル、適用終了取消テーブルに対し、履歴管理部が定型的な処理を実行することによって、時限データの追加、参照、削除、修正が実現される。このため、汎用的な履歴管理システムとして、様々な業務システムに組み込むことが容易となる。
 しかも、時限データを削除する場合に、該当の時限データをテーブル上から物理的に削除するのではなく、適用開始取消テーブルに適用開始データのIDを登録すると共に、適用終了取消テーブルに適用終了データのIDを登録することによって論理的に削除する方式を採用している。また、時限データを修正する場合でも、該当の時限データ自体を修正するのではなく、修正後の時限データを新たな時限データとして追加することで、論理的に修正する方式を採用している。この結果、処理の簡素化及び汎用化が実現されると共に、時限データの履歴を削除履歴や変更履歴をも含めて完全な形で保全することが可能となり、データの再利用性と再現性が向上する。
 請求項9及び10に記載した時限データの履歴管理システムの場合、適用開始データと適用終了データ間の関連付けを行うテーブルを備えているため、適用開始データと適用終了データを異なるタイミングで登録しても有効期間を正しく管理することができるようになり、時限データの履歴管理に柔軟性を付与することが可能となる。
 請求項11に記載した時限データの履歴管理システムの場合、同一の適用対象について有効期間が重複する複数の時限データが併存していても、登録日時の新しいものが優先適用されるため、時限データ間の有効期間の整合性を考慮することなく、また一々既存の時限データについて修正や削除を施すことなく、必要に応じて次々と時限データを登録することが可能となり、時限データの有効期間を柔軟に設定することが可能となる。
 請求項12に記載した時限データの履歴管理システムの場合、商品の売価や割引率、あるいは国別の消費税率といった適用対象の種類に応じて具体的なテーブルが生成される場合に、各テーブルの設定情報に基づいて対応のクラスが自動生成されると共に、各クラスの定義内容を汎用のプログラム部品に適用することにより、当該適用対象の種類に特化した履歴管理部が自動生成される仕組みを備えている。
 しかも、プログラム部品は汎用性があるため一度テストしておけば済み、具体的なテーブルに対応したクラスも人手を介すことなく自動生成されるため、具体的な履歴管理部を生成する都度、連結テストを実施する必要がない。
 以上のことから、この時限データの履歴管理システムを様々な業務システム中に組み込むことが、極めて容易となる。
 請求項13及び14に記載したデータ処理システムによれば、関連記憶手段に第1の結合対象データと第2の結合対象データの対応関係が「1対1」で規定されているため、これを参照することにより、複数のデータを「多対多」の関係で総当たり的に照合する場合に比べて、コンピュータの処理量を大幅に削減することが可能となる。
 図1は、この発明に係るデータ利用システム10の全体構成を示す模式図であり、ロードバランサ13と、Webサーバ12と、複数のAPサーバ14と、複数のDBサーバ16とを備えている。
 Webサーバ12には、インターネット17を介してクライアント端末18が接続されている。
 各DBサーバ16は、全DBサーバ16間に共通するデータを格納した複数のテーブル(テーブル群19)と、DB管理システム(RDBMS)とを備えており、DBサーバ16の中の少なくとも一部は、データ保全の観点から遠隔地に配置されている。
 最初に、本システム10における処理内容について大まかに説明し、個々の具体的な構成や処理内容については後に詳説する。
 まず、クライアント端末18にはWebサーバ12からデータ利用画面が送信され、Webブラウザ上に表示される(図示省略)。
 そして、ユーザがこのデータ利用画面を通じて検索条件を指定し、データの検索をリクエストすると、Webサーバ12からAPサーバ14に対して検索リクエストが送信される。この際、ロードバランサ13を介して、最も負荷の小さい一のAPサーバ14に対して、検索リクエストが振り分けられる。
 この検索リクエストを受け取ったAPサーバ14は、検索条件を論理的に複数に分割し、分割された検索条件に対応した複数のSQLをそれぞれ別個のDBサーバ16に発行し、検索条件に合致するデータの抽出を依頼する。
 これを受けた各DBサーバ16は、SQLで指定されたデータを抽出し、APサーバ14に送信する。
 APサーバ14は、各DBサーバ16から受け取ったデータを統合し、Webサーバ12に送信する。
 これに対しWebサーバ12は、APサーバ14から受け取った検索結果データを表示する画面(図示省略)を生成し、クライアント端末18に送信する。
 また、クライアント端末18からデータ追加のリクエストがWebサーバ12に送信された場合、ロードバランサ13によって選択された一のAPサーバ14に当該リクエストが送信される。
 これを受けたAPサーバ14は、各DBサーバ16に対して同一のSQLを発行し、同データの追加を依頼する。
 これに対し各DBサーバ16は、上記追加データを対応のテーブルに格納する処理を実行する。
 図2は、クライアント端末18から送信された検索リクエストが、Webサーバ12及びAPサーバ14を経由してDBサーバ16に送信される場面での機能構成を表しており、APサーバ14は、検索条件分割処理部20と、複数の検索処理部22を備えている。
 また図3は、DBサーバ16から検索結果が送信される場面での機能構成を表しており、APサーバ14は、各検索処理部22単位で複数割り当てられたデータ加工処理部24と、検索結果統合処理部26を備えている。
 図4は、クライアント端末18から送信されたデータ追加のリクエストが、DBサーバ16に送信される場面での機能構成を表しており、APサーバ14は、追加データ受付部27と、複数の登録処理部28を備えている。
 APサーバ14内に設けられた上記の検索条件分割処理部20、複数の検索処理部22、複数のデータ加工処理部24、検索結果統合処理部26、追加データ受付部27、複数の登録処理部28は、APサーバ14に搭載された多数のCPUコアが、専用のアプリケーションプログラムに従って所定の処理を実行することで実現されるのであるが、この際、OSによって複数のスレッドが起動されて各CPUコアに割り当てられることにより、マルチタスク処理が実現される。
 図5は、各CPUコア30とスレッド32との対応関係を表しており、各スレッド32にはスレッドプール34が設けられ、そこに配置された複数のタスク36をスレッド32が順次処理していくイメージが描かれている。
 この図におけるスレッド32が、図2~図4に表された検索条件分割処理部20、複数の検索処理部22、複数のデータ加工処理部24、検索結果統合処理部26、追加データ受付部27、複数の登録処理部28として機能し、これらの機能構成部が実行する具体的な処理がタスク36に相当する。
 各スレッド32は、スレッドプール34に蓄積されたタスクを古い順に次々と実行していき、自己のスレッドプール34が空になった場合には、他のスレッド32のスレッドプール34に蓄積されたタスク36を、新しい順に実行していく。
 つぎに、図6~図9のフローチャートに従い、このシステム10における処理手順を詳細に説明する。
 まず、図6に従い、検索条件分割処理部20による処理手順を説明する。
 すなわち、クライアント端末18から送信された検索条件をWebサーバ12経由でAPサーバ14が受信すると(S10)、検索条件分割処理部20は検索条件を解析し、検索条件の内容に応じて複数の検索条件に分割する(S12)。
 ここで分割の基準となるのは、時間(日、週、月、年等)や地域(都道府県、市町村等)など、検索対象データを論理的に複数に区分できるものが該当する。
 例えば、「2010年における全チェーン店の売上を集計する」という検索条件が与えられた場合に、「2010年1月分の全チェーン店の売上」、「2010年2月の全チェーン店の売上」、「2010年3月の全チェーン店の売上」…というように、年を月単位に12分割することが該当する。
 また、各チェーン店の所在地データに着目し、「2010年における東京所在チェーン店の売上」、「2010年における北海道所在チェーン店の売上」、「2010年における沖縄所在チェーン店の売上」…というように、全国を都道府県単位に47分割することも該当する。
 もちろん、「2010年1月分の東京所在チェーン店の売上」や「2010年1月の北海道所在チェーン店の売上」のように、月×都道府県単位で564分割することもできる。
 これらの分割基準は、クライアント端末18から発せられると予測される検索条件や、対象となるデータの量等に鑑みて、事前に幾つかの分割パターンがプログラム設計者によって策定され、検索条件分割処理部20を実現するためのプログラム中にコーディングされている。
 ここでは、都道府県単位で47分割されたものとして話を進める。
 すなわち、検索条件分割処理部20は、47個の検索処理部22に対して、上記都道府県単位の検索処理と、対応DBサーバ16を割り当てる(S14)。
 つぎに図7に従い、各検索処理部22における処理手順を説明する。
 まず検索処理部22は、自己に割り当てられた検索処理に必要な都道府県を指定したSQLを自動生成し、自己に割り当てられた特定のDBサーバ16に対して発行する(S20)。
 ここで検索処理部22は、対応のDBサーバ16から全ての検索結果データが送信されるのを待つことなく、予め設定された一定量(例えばレコード1,000件分)のデータが送信された時点で(S22/Y)、必要な演算処理を複数のデータ加工処理部24に割り当てる(S24)。
 この結果、一部のデータ加工処理部24は、受信データをキー項目でソートすると共に、キー項目の値に基づいて複数のデータに分割する処理を実行する。また、他のデータ加工処理部24は、分割されたデータに基づく値の集計処理や、当該値を指定したデータの抽出をDBサーバ16に依頼する処理などを実行する。
 受信データの分割手法については後に例示するが、検索条件の内容に応じて論理的に分割する検索条件分割処理部20による分割と異なり、受信データの値や分量に応じた分割手法となる。データ加工処理部24による具体的な処理についても、後に例示する。
 検索処理部22は、データ加工処理部24から処理結果データが返信された時点で(S26/Y)、この単位データ量当たりの処理結果をメモリに格納すると共に、DBサーバ16から送信されたデータをメモリ上から削除する(S28)。
 各検索処理部22は、DBサーバ16からのデータ送信が完了するまで、DBサーバ16から送信されるデータが一定量に達する度にS24~S28の処理を繰り返す(S30/N、S22/Y)。
 そして、DBサーバ16からのデータ送信が完了し、S24~S28の最後の処理が完了した時点で(S30/Y)、検索処理部22はこれまでの部分的な処理結果の集計値を集計し(S32)、検索結果統合処理部26に集計結果を出力する(S34)。
 つぎに図8に従い、検索結果統合処理部26による処理手順を説明する。
 まず検索結果統合処理部26は、各検索処理部22から集計結果が送信される度に、全ての検索処理部22からの集計結果が揃ったか否かをチェックし(S40、S42)、全てが揃った段階で全検索処理部の集計結果を集計する(S44)。
 そして、その最終的な集計結果をWebサーバ12に送信する(S46)。
 Webサーバ12は、この集計結果を含むWebファイルを生成し、クライアント端末18に送信することになる。
 つぎに図9に従い、データ追加時におけるAPサーバ14側の処理手順を説明する。
 まず、クライアント端末18から送信されたデータ追加のリクエストをWebサーバ12経由でAPサーバ14が受信すると(S50)、追加データ受付部27がDBサーバ16の数に対応した登録処理部28を起動させ、それぞれに担当DBサーバ16の特定情報及び追加データを渡す(S52)。
 これを受けた各登録処理部28は、自己が担当するDBサーバ16に対して上記の追加データの登録を求めるSQLを発行する(S54)。
 これを受けた各DBサーバ16は、対応のテーブルに対して一斉にデータを追加する。この結果、各DBサーバ16が管理するデータの同一性が確保される。
 図10は、各DBサーバ16に格納されたテーブル群の具体例を示しており、顧客管理テーブル40と、予約管理テーブル42と、売上管理テーブル44と、予約取消管理テーブル46と、請求管理テーブル48とによって、各店舗の売り上げが管理されている。
 顧客管理テーブル40は、「顧客ID(主キー)」及び「地域」のデータ項目を備えている。
 また、予約管理テーブル42は、「予約ID(主キー)」、「店ID」、「顧客ID(外部キー)」、「金額」及び「予約年月日」のデータ項目を備えている。
 売上管理テーブル44は、「予約ID(主キー/外部キー)」及び「売上年月日」のデータ項目を備えている。
 予約取消管理テーブル46は、「予約ID(主キー/外部キー)」及び「予約取消年月日」のデータ項目を備えている。
 請求管理テーブル48は、「請求ID(主キー)」、「請求年月日」及び「予約ID(外部キー)」のデータ項目を備えている。
 上記の各テーブル40~48には、以下の(1)~(3)の制約が予め課せられている。
(1)キー項目は一つに限定される。
 したがって、複数の項目の組合せによってキー項目を構成すること(複合キー)は、禁止される。
(2)各テーブルにはレコードの追加のみが許容され、既存レコードの値の更新・削除は禁止される。
 したがって、値に変更が生じた場合など、発生タイミングの異なる情報は別テーブルに格納されることとなる。
(3)各テーブルのカラムには、NULL値禁止制約、フラグ値禁止制約、区分値禁止制約が課せられる。
 まず「NULL値禁止制約」とは、データ項目の値としてNULL(値なし)を充填することが禁止されることを意味しており、このようなNULL値の充填を想定したデータ項目の設定自体が許容されないことになる。
 つぎに「フラグ値禁止制約」とは、データ項目の値としてフラグ値(「1/0」、「ON/OFF」、「TRUE/FALSE」等の2値データ)を充填することが禁止されることを意味しており、このようなフラグ値の充填を想定したデータ項目の設定自体が許容されないことになる。
 「区分値禁止制約」とは、データ項目の値として区分値(「1:正社員」、「2:パート」、「3:アルバイト」等)を充填することが禁止されることを意味しており、このような区分値の充填を想定したデータ項目の設定自体が許容されないことになる。
 これらの制約ルールは、新規テーブルの設計時やSQL発行時に、DBサーバ16のデータベース管理システム(RDBMS)によって適否がチェックされ、制約ルールに違反する処理の実行が拒絶されることにより、その実効性が担保される。
 図10より明らかなように、各テーブルは単一のデータ項目によって主キー(PK)が構成されている。
 また、「予約取消」に関するデータも、通常であれば予約管理テーブル42において「予約取消フラグ」等のデータ項目が設けられ、各レコードに「1/0」等のフラグ値を充填することで状態が管理されるところであるが、予約取消管理テーブル46を予約管理テーブル42とは別個に設けることにより、予約取消の状態管理がなされている。すなわち、この予約取消管理テーブル46に登録された予約IDが「予約取消」状態にあることとなり、レコードの有無によって予約取消の有無が表現されている。
 各テーブルには上記(2)の制約(値の更新禁止)が課せられているため、例えばある顧客の「地域」に変動が生じた場合でも、顧客管理テーブル40における該当レコードの「地域」の値が書き換えられることはない。
 図示は省略したが、このような場合には例えば「顧客ID」、「変更地域」、「変更年月日」等のデータ項目を備えた「顧客地域変更管理テーブル」が新たに設けられて、当該顧客の顧客ID、変更後の地域、変更年月日が格納される。
 この結果、顧客の地域別に売上を集計する必要が生じた場合、APサーバ14側では顧客管理テーブル40を参照して各顧客の地域情報を取得した後、顧客地域変更管理テーブルを参照して地域変更の生じた顧客を特定し、変更後の地域に差し替える処理を実行することになる。
 このようなテーブルがDBサーバ16において管理されている場合に、クライアント端末18から「A店の8月分の請求額を地域毎に集計せよ」という内容の検索リクエストが送信された場合、検索条件分割処理部20は、まず「8月=31日間」というカレンダー情報に従い、「8月1日分」、「8月2日分」、「8月3日分」…「8月31日分」というように、検索条件を31分割する。
 つぎに検索条件分割処理部20は、これらの分割された検索条件(「A店の8月1日分の請求額を地域毎に集計せよ」等)を31個の検索処理部22に割り当てる。
 これを受けた各検索処理部22は、自己に割り当てられた請求日を指定した、請求管理テーブル48から請求データを取得するためのSQLを生成し、自己が担当するDBサーバ16に発行する。
 そして、DBサーバ16から該当日の請求年月日を備えた請求データが送信されると、検索処理部22は一定量のデータ(例えば1,000件のレコード相当分)単位で受信データを分割し、複数のデータ加工処理部24に以下の処理を割り当てる。
 (1)各請求データの「予約ID」を指定したSQLを生成してDBサーバ16に発行し、「予約管理テーブル42」から対応の予約データを取得する。
 (2)送信された予約データの中で、該当店舗の「店ID」を有するデータのみを抽出し、他の店IDのデータを除外する。
 (3)各予約データの「顧客ID」を指定したSQLを生成してDBサーバ16に発行し、顧客管理テーブル40から対応の顧客データを取得する。
 (4)顧客データの「地域」毎に、予約データ中の「金額」の値を集計する。
 これら(1)~(4)の処理は、具体的にはタスク36として各データ加工処理部24のスレッドプール34に配置される。
 検索処理部22は、データ加工処理部24から上がってきた1,OOO件単位の処理結果データをメモリに格納すると共に、DBサーバ16から送信されたデータをメモリ上から削除する。そして、1日分の処理結果データが揃った時点で、全処理結果データを集計する。この集計結果は、検索結果統合処理部26に出力される。
 検索結果統合処理部26は、全検索処理部22から8月1日~8月31日までの全集計結果が集まった時点でこれらを集計し、Webサーバ12に出力する。
 このシステム10の場合、DBサーバ16からのフェッチが完了するまでAPサーバ14が待つことはなく、一定量のデータを受信する度に複数のデータ加工処理部24による処理が開始される仕組みであるため、DBサーバ16のDISK/IOによるボトルネックを解消することができる。
 また、APサーバ14における部分的な集計が完了する度に、DBサーバ16から送信されたデータが占めていたメモリが解放され、データ量が格段に小さな集計結果データのみがメモリに格納される仕組みであるため、APサーバ14のメモリが大きなデータに占拠され続けることを回避できる。
 さらに、各検索処理部22は、それぞれ別個のDBサーバ16に対しSQLを分散して発行するため、個々のDBサーバ16における処理の負担が必然的に低減することとなり、全体の処理速度を高速化することができる。
 上記の通り、各DBサーバ16は同じ内容のデータを保持しているため、検索処理部22にDBサーバ16を割り振る際にはDBサーバ16毎の特性を考慮することなく、機械的に対応付けることができる。
 なお、処理速度の向上という観点からは、分割した検索条件と等しい数の検索処理部22及びDBサーバ16を用意することが望ましいが、検索処理部及びDBサーバ16に数はこれに限定されるものではない。
 例えば、分割された検索条件が31個あり、検索処理部が31個設けられたにもかかわらず、DBサーバ16が物理的に10台しか用意されていない場合には、各DBサーバ16に対して3~4個の検索条件が割り振られることになる。この場合でも、1台のDBサーバ16のみで全てを処理する場合に比べ、大幅な高速化が期待できる。
 ここで、図11を参照して、DBサーバ16から送信された一定量単位のデータに対する分割手順について説明する。
 まず一のデータ加工処理部24は、DBサーバ16から送信されたデータを2等分する位置を探索し、そこから前方不一致検索によってキー項目の変わり目を探しだし、データを2分割させる。
 例えば、(a)のデータ列はキー項目の値が1~6があるが、データ加工処理部24は「3」と「4」との間を境にこれを2分割させ、(b)及び(c)のデータ列を生成する。
 つぎに、他のデータ加工処理部24は、(b)のデータ列を「2」と「3」との間で2分割させ、(d)及び(e)のデータ列を生成する。
 この時点で、(e)のデータ列のキー項目の値は「3」のみとなるため、データ加工処理部24はそれ以上の分割を停止する。この(e)のデータ列については、他のデータ加工処理部24によって必要な計算処理等が実行される。
 これに対し、(d)のデータ列の場合には「1」と「2」の間で2分割可能であるため、データ加工処理部24はここでデータ列を2分割させ、(h)及び(i)のデータ列を生成する。
 この時点で、(h)のデータ列のキー項目の値は「1」のみとなるため、データ加工処理部24はそれ以上の分割を停止する。この(h)のデータ列については、他のデータ加工処理部24によって必要な計算処理等が実行される。
 同様に、(i)のデータ列のキー項目の値は「2」のみとなるため、データ加工処理部24はそれ以上の分割を停止する。この(i)のデータ列については、他のデータ加工処理部24によって必要な計算処理等が実行される。
 一方、(c)のデータ列については、他のデータ加工処理部24が「5」と「6」との間で2分割させ、(f)及び(g)のデータ列を生成する。
 この時点で、(g)のデータ列のキー項目の値は「6」のみとなるため、データ加工処理部24はそれ以上の分割を停止する。この(g)のデータ列については、他のデータ加工処理部24によって必要な計算処理等が実行される。
 これに対し、(f)のデータ列の場合には「4」と「5」の間で2分割可能であるため、データ加工処理部24はここでデータ列を2分割させ、(j)及び(k)のデータ列を生成する。
 この時点で、(j)のデータ列のキー項目の値は「4」のみとなるため、データ加工処理部24はそれ以上の分割を停止する。この(j)のデータ列については、他のデータ加工処理部24によって必要な計算処理等が実行される。
 同様に、(k)のデータ列のキー項目の値は「5」のみとなるため、データ加工処理部24はそれ以上の分割を停止する。この(k)のデータ列については、他のデータ加工処理部24によって必要な計算処理等が実行される。
 図11の例では、説明の便宜上簡略化されたデータ列を例示したが、各データ加工処理部24は、実際にはDBサーバ16から送信された一定量(例えばレコード1,000件分)のデータ列に対して、ソートやマッチング、コントロールブレイクの都度、上記の分割処理を実行する。
 この結果、大量のデータに対して複数のデータ加工処理部24による並列処理が可能となり、APサーバ14に複数搭載されたCPUコアの有効利用が可能となる。
 このデータ加工処理部24による分割処理に際し、分割の回数(階層の深さ)に一定の限度を設けることもできる。
 上記のように、データ加工処理部24は検索処理部22から渡されたデータ列の特定のデータ項目の値を指定してDBサーバ16にSQLを発行し、検索処理を依頼する場合があるため、必然的にDBサーバ16からの応答待ち(I/O Wait)が発生することになる。
 そこで図12に示すように、各スレッド32にI/O Waitを伴う処理用の第1のスレッドプール50と、I/O Waitを伴わない処理用の第2のスレッドプール52を設けることが望ましい。
 この結果、第1のスレッドプール50に配置されたタスク36の実行によってI/O Waitが発生した場合、スレッド32は第2のスレッドプール52に配置されたタスク36を待ち時間の間に処理することが可能となり、処理の効率化を図ることが可能となる。
 この発明にあっては、上記のようにDBサーバ16が管理する各テーブルの構造が極限まで単純化される分、テーブルの数が増え、SQLの発行数自体は増大するが、演算処理は多数のCPUコアを用いた並列処理によって高速化されたAPサーバ14側で行われ、DBサーバ16は単純化されたデータの管理(インサートとセレクト)に専念でき、データの更新や削除から解放されるため、DBサーバ16の負担は大幅に軽減される。
 しかも、DBサーバ16は筐体レベルで複数台用意され、検索時にはデータの抽出処理がそれぞれに分散される。
 このため、テーブルの正規化の追求に伴いDBサーバ16側の処理速度が低下することを、有効に回避できる。
 また、フラグ値や区分値のように、特殊なビジネスルールに基づいた値の格納が禁止される結果、データモデルの見通しが良好となり、テスト・データの作成効率が向上するという効果も期待できる。
 図13に示すように、各DBサーバ16と各APサーバ14との間にインデックスサーバ60を設けることにより、このシステム10における検索処理をより高速化することができる。
 この場合、各DBサーバ16は、DB管理システム(RDBMS)61と、当日分データ記憶領域(暫定記憶領域)62と、過去分データ記憶領域(永続記憶領域)63とを備える。
 また、インデックスサーバ60は、インデックス生成部64と、インデックス記憶部65と、インデックス提供部66とを備えている。
 インデックス生成部64及びインデックス提供部66は、インデックスサーバ60のCPUが専用のプログラムに従って動作することにより実現され、インデックス記憶部65は、インデックスサーバ60のSSD(Solid State Drive)内に設けられている。
 APサーバ14の登録処理部28から送信された追加データは、DBサーバ16のDB管理システム61によって当日分データ記憶領域62に一旦格納された後、夜間バッチ処理によって過去分データ記憶領域63に移される。
 また、インデックスサーバ60のインデックス生成部64は、夜間バッチ処理により、DB管理システム61から当日分データ記憶領域62内に格納された追加データを取得し、追加分のインデックスを作成した後、インデックス記憶部65に格納する。
 この場合、APサーバ14の各検索処理部22は、各DBサーバ16に対してSQLを発行するに際し、インデックスサーバ60のインデックス提供部66を介してインデックス記憶部65を参照し、過去分データ記憶領域63に格納されたデータに関しては、検索条件の範囲に含まれる個々のデータの主キーを取得した後、個々の主キーを特定したSQLを生成する。
 例えば、Webサーバ12から送信された検索条件が、特定店舗における過去1年分の売上データを取得するものであった場合、検索処理部22はこの条件に合致する全データの主キーをインデックスサーバ60から取得した上で、SQL中にこれらの主キーを記述してDBサーバ16に発行する。
 このため、DBサーバ16のDB管理システム61は、データの検索処理を行うことなく、過去分データ記憶領域63に格納された各テーブルから主キーによって指定されたデータをダイレクトに取り出し、検索処理部22に迅速に返すことが可能となる。
 しかも、インデックスはハードディスクよりも高速な動作が可能なSSDに格納されているため、APサーバ14がインデックスを参照する際のDISK/IOを低減することができる。
 なお、インデックスは上記の通り夜間バッチにて生成されるため、当日分データについてはインデクスが用意されていない。このため、当日分データを取得する必要がある場合、検索処理部22は主キーを指定することなく、検索条件を指定したSQLをDBサーバ16に発行する。
 このシステム10においては、上記の通り、個々のレコードに関して更新や削除が生じることがなく、新規レコードの追加のみが許される仕組みを採用しているため、DBサーバ16において当日分データと過去分データを明確に分離することが可能となる。
 図14は、各DBサーバ16の内部構造をより詳細に示すものであり、メモリ上に設けられたバッファ・キャッシュ領域70と、DB管理システム(RDBMS)61と、OS(Linux)72と、テーブル記憶領域74と、更新ログ記憶領域76とが描かれている。
 ここでテーブル記憶領域74は、ハードディスク(HDD)内に設けられており、上記した顧客管理テーブル40や予約管理テーブル42等が格納されている。また更新ログ記憶領域76は、OSによってメモリ(tmpfs)内に設けられている。
 この図に示されているように、DBサーバ16においては一般に、テーブル内のデータはブロック78単位でテーブル記憶領域74からバッファ・キャッシュ領域70に取り出されると共に、バッファ・キャッシュ領域70に書き込まれたデータはブロック78単位でテーブル記憶領域74に格納される。
 このため、上記のように各テーブルに格納されるレコードの構造が極限まで簡素化されていると、1つのブロック78に収納できるレコード数を増やすことが可能となり、その分、DBサーバ16における処理の効率化を実現することが可能となる。
 また、更新ログ79をハードディスクよりも高速に動作するメモリ上に設けられた更新ログ記憶領域76に格納することにより、その分DISK/IOを削減することが可能となり、DBサーバ16における処理のさらなる高速化を実現可能となる。
 ところで、更新ログ79はDBサーバ16に何らかのトラブルが発生した場合に、データを復旧させるための最後の拠り所となる重要な構成要素であるため、通常は電源OFFによってデータが消失してしまうメモリ上に設けられることはない。
 これに対し、このシステム10の場合には、上記のようにDBサーバ16が物理的に複数台設けられており、各DBサーバ16には同一内容のデータが保存される仕組みを備えているため、データ消失の危険を有効に分散させることが可能となる。
 しかも、各テーブルにはデータの更新や削除が許容されないというルールが適用されているため、一のDBサーバ16の更新ログが消失してしまい、他のDBサーバ16の更新ログに基づいてデータを復旧させる必要性が生じた場合であっても、ハードディスクに格納された既存のデータとの間で整合性を確保する必要がなく、新たに追加された当日分のデータのみを追記させれば済むという利点も生じる。因みに、この復旧が完了するまでの間、当該DBサーバ16についてはWRITE ONLY状態(データの書き込み可/読み込み不可)に置かれる。
 なお、上記の更新ログ記憶領域76は、上記のように各DBサーバ16のOSによってメモリ上に設定されると共に、更新ログの格納処理もOSの機能によって実現される仕組みであるため、DBサーバ用のアプリケーションプログラムがクラッシュ等しても、OSがダウンしない限り当該DBサーバ内で復旧可能である。
 上記の実施形態においては、各DBサーバ16に共通のデータがそれぞれ格納されていたが、この発明はこれに限定されるものではない。
 例えば、図15に示すように、各DBサーバ16を複数のDB系統に分類すると共に、同一のDB系統に属するDBサーバ16の外部記憶装置19には、相互に共通するデータを格納した複数のテーブルが格納されるように構成することもできる。
 この場合、DB系統を異にするDBサーバ16間では、それぞれ異なるテーブルが外部記憶装置19に格納されている。
 同一のDB系統に属するDBサーバ16の中の少なくとも一部は、データ保全の観点から遠隔地に配置されている。
 図においては2つのDB系統(DBα系統及びDBβ系統)が例示されているが、さらに多くのDB系統を設けることができる。
 この場合、図10に示した各テーブルは、同一DB系統に属するDBサーバ16にまとめて格納されていている場合もあるが、異なるDB系統に属するDBサーバ16に分散配置されていてもよい。
 このように、DBサーバ16が異なる複数のDB系統に分かれており、DB系統毎に異なるテーブルが配置されていると、登録処理部28は、データの追加処理に際して異なるDB系統に属する複数のDBサーバ16に対してデータの追加を同時に依頼する場合が生じる。
 例えば、ユーザの氏名や住所等を管理する基本属性テーブルと、各ユーザの勤務先や趣味等を管理する派生属性テーブルが別個のDB系統に属している場合、新規会員登録に際し各登録処理部28は、2つのDB系統に属する対応のDBサーバ16に対して、それぞれ対応レコードの追加をリクエストするSQLを同時に発行することになる。
 このような場合、図16(a)に示すように、一方のDB系統に属するDBサーバ16においてデータの追加が成功すると同時に、他方のDB系統に属するDBサーバ16におけるデータの追加が失敗するというケースが当然に生じうる。
 そして、この直後に登録会員の検索リクエストが発せられると、図16(b)に示すように、一方のDB系統のデータのみが存在し、他方のDB系統のデータが欠落したデータの組合せが返されてしまう。
 このような不正な結果が返されることを防止するため、従来は一方のデータベースに対するコミットが失敗した場合には、コミットに成功した方のデータを削除することにより、更新前の状態に戻すロールバック処理が実行されていた。
 これに対し、このシステム10の場合には、データ追加時におけるデータの不整合は許容すると共に、データ参照時にこれを正す方式を採用している。
 以下において、このデータ間の整合性確保方式について説明する。
 まず、二つのDB系統に格納されたテーブルに対して同時にデータの追加を行う必要がある場合、登録処理部28は何れか一方のDBサーバ16内に設けられた関連テーブルに対して、本来の追加データとは別に、双方のデータの関連性を示すデータを登録する。
 図17はその一例を示すものであり、DBα系統に属するDBサーバ(α2)16内には、商品ID、商品コード、商品名、登録日時のデータ項目を備えた商品テーブル80の他に、商品ID及び店舗IDのデータ項目を備えた関連テーブル81が設けられている。
 また、DBβ系統に属するDBサーバ(β2)16内には、店舗ID、店舗コード、店舗名、登録日時のデータ項目を備えた店舗テーブル82が設けられている。
 上記の商品ID及び店舗IDは、システム10によって採番されるユニークな人工キーである。
 ここで、追加データ受付部27から登録処理部28に対して商品データと店舗データの追加が指令されると、登録処理部28は、関連テーブル81に商品IDと店舗IDを格納することを指令するSQLを生成すると共に、商品テーブル80に商品データの追加を指令するSQLを生成し、DBサーバ(α2)16に発行する。
 同時に登録処理部28は、店舗テーブル82に店舗データの追加を指令するSQLを生成し、DBサーバ(β2)16に発行する。
 この時点で登録処理部28は、DBサーバ(α2)16及びDBサーバ(β2)16においてデータの追加が成功したか失敗したかについて関知しない。
 この直後に、上記商品データ及び店舗データを含む検索条件を指定した検索リクエストがクライアント端末18から発せられると、検索処理部22はまずDBサーバ(α2)16の関連テーブル81を参照し、商品ID及び店舗IDを特定する(S60)。
 つぎに検索処理部22は、DBサーバ(α2)16の商品テーブル80及びDBサーバ(β2)16の店舗テーブル82を参照し、上記の商品ID及び店舗IDに対応するデータの登録があるか否かを確認する(S62)。
 ここで、必要なデータの組合せが揃っていると判定した場合(S64/Y)、検索処理部22は対応の商品データ及び店舗データを取得するためのSQLをDBサーバ(α2)16及びDBサーバ(β2)16に発行する(S66)。
 これに対し、何れか一方のデータのみが存在し、他方のデータが欠落している場合には、当該データの追加はなかったものと認定し、両データを取得対象から除外する(S68)。
 なお、何れかのテーブルに対するデータの追加が失敗した場合には、その旨の通知がDBサーバ16からAPサーバ14、Webサーバ12を経由してクライアント端末18に戻される。
 これに対しユーザは、同一データの組合せの追加登録を再度リクエストすることになる。この結果、前回の追加登録処理が成功している方のテーブルには、同一データが重複登録される結果となるが、この場合には登録日時の新しいものが有効として取り扱われ、登録日時の古いデータの存在は無視される。
 図18は、データ間の整合性確保方式に係る他の例を示すものであり、DBα系統に属するDBサーバ(α2)16内には、ユーザID、氏名、登録日時のデータ項目を備えた会員テーブル83と、住所ID、ユーザID、住所、登録日時のデータ項目を備えた住所テーブル84が設けられている。
 また、DBβ系統に属するDBサーバ(β2)16内には、トランザクションID、購入金額、ユーザID、購入日時のデータ項目を備えた購入テーブル85の他に、住所ID及びトランザクションIDのデータ項目を備えた関連テーブル86が設けられている。
 上記のユーザID、住所ID及びトランザクションIDは、システム10によって採番されるユニークな人工キーである。
 ここで、追加データ受付部27から登録処理部28に対して会員の住所データの追加と同時に購入データの追加が指令されると、登録処理部28は、関連テーブル86に住所IDとトランザクションIDを格納することを指令するSQLを生成すると共に、購入テーブル85に購入データの追加を指令するSQLを生成し、DBサーバ(β2)16に発行する。
 同時に登録処理部28は、住所テーブル84に住所データの追加を指令するSQLを生成し、DBサーバ(α2)16に発行する。
 この時点で登録処理部28は、DBサーバ(α2)16及びDBサーバ(β2)16においてデータの追加が成功したか失敗したかについて関知しない。
 この直後に、上記住所データ及び購入データを含む検索条件を指定した検索リクエストがクライアント端末18から発せられると、検索処理部22はまずDBサーバ(β2)16の関連テーブル86を参照し、住所ID及びトランザクションIDを特定する(S70)。
 つぎに検索処理部22は、DBサーバ(β2)16の購入テーブル85及びDBサーバ(α2)16の住所テーブル84を参照し、上記のトランザクションID及び住所IDに対応するデータの登録があるか否かを確認する(S72)。
 ここで、必要なデータの組合せが揃っていると判定した場合(S74/Y)、検索処理部22は対応の購入データ及び住所データを取得するためのSQLをDBサーバ(α2)16及びDBサーバ(β2)16に発行する(S76)。
 これに対し、何れか一方のデータのみが存在し、他方のデータが欠落している場合には、当該データの追加はなかったものと認定し、両データを取得対象から除外する(S78)。
 何れかのテーブルに対するデータの追加が失敗した場合には、上記と同様、その旨の通知がクライアント端末18に戻される。
 これに対しユーザは、同一データの組合せの追加登録を再度リクエストする。
 ここで、先の追加登録リクエストにおいて住所データの追加登録が成功していた場合には、住所テーブル84において同一住所データが重複登録された状態となるが、上記と同様、登録日時の新しいものを有効として取り扱い、登録日時の古いデータの存在を無視することにより、データの一元性は確保される。
 同様に、先の追加登録リクエストにおいて購入データの追加登録が成功していた場合には、購入テーブル85において同一購入データが重複登録された状態となるが、購入日時の新しいものを有効として取り扱い、購入日時の古いデータの存在を無視することにより、データの一元性は確保される。
 このシステム10においては、テーブルに対する登録処理としてはデータの追加のみが許容され、データの更新や削除が禁止されているため、上記のようなデータ間の整合性確保方式を採用することが可能となる。
 すなわち、データの内容変更は必ずデータの追加という形で表現されることから、検索処理部22は関連テーブルを参照した結果あるべきデータが存在しないと判明した時点で、追加処理の失敗と判断することができる。
 これに対し、仮にデータの削除が許容されるという前提の下では、データの不存在がデータの削除によるものか、データの追加が失敗したことによるものかを判断不能となる。
 なお、APサーバ14上で稼動するアプリケーションが複数のデータベースを同時更新中にクラッシュした場合、データベース間の不整合が出る可能性が生じる。この場合、APサーバ14の障害を検知した時点で、障害発生時刻近傍でデータベース間の不整合(レコードの不足)が発生していないか確認すると共に、不整合が認められた場合には必要なフォローを行う必要がある。
 上記の通り、APサーバ14上には複数の検索処理部22が起動され、各検索処理部22は自己に割り当てられた異なるDB系統に属する複数のDBサーバ16に対してそれぞれSQLを発行する仕組みを備えているため、多数のCPUコアを用いることで効率的な分散処理が可能となる。
 また、検索結果に基づいて各種のデータ加工処理を実行する必要性がある場合には、検索処理部22毎に複数のデータ加工処理部24が起動されるため、やはり多数のCPUコアを用いた効率的な分散処理が可能となる。
 しかも、DBサーバ16からの検索結果データが全て揃うまで待機することなく、一定量単位でデータ加工処理部24による並列処理が実行されるため、データベースサーバ側のDISK/IOによる遅延を緩和することも可能となる。
 同様に、登録処理部28も複数存在し、各登録処理部28は自己に割り当てられた異なるDB系統に属する複数のDBサーバ16に対してそれぞれSQLを発行する仕組みを備えているため、データの追加登録時にも多数のCPUコアを用いた効率的な分散処理が可能となる。
 上記においては、2つのDB系統に属する各テーブルについてデータの追加を行う場合について説明したが、3つ以上のDB系統に属する各テーブルについてデータの追加を行う場合にも適用可能であることはいうまでもない。
 図19は、この発明に係る時限データの第1の履歴管理システム110の全体構成を示すものであり、Webサーバ112と、APサーバ114と、DBサーバ116とを備えている。
 各サーバ間は、通信ネットワークを介して接続されている。
 また、Webサーバ112には、通信ネットワークを介して、ユーザの操作するクライアント端末117が接続される。
 クライアント端末117は、PC等のコンピュータよりなり、OSやWebブラウザ、テキストエディタ等のプログラムを搭載している。
 APサーバ114は、データ参照部118と、データ更新部120と、売価履歴管理部122と、テーブル設定部124と、型生成部126と、型格納部127と、コンパイラ128と、データアクセス汎用部品130とを備えている。
 上記のデータ参照部118、データ更新部120、売価履歴管理部122、テーブル設定部124、型生成部126、コンパイラ128は、APサーバ114のCPUが、専用のアプリケーションプログラムに従って所定の処理を実行することで実現される。また、型格納部127は、APサーバ114の外部記憶装置内に設けられている。データアクセス汎用部品130も、同外部記憶装置内に格納されている。
 DBサーバ116は、データベース管理システム(RDBMS)132と、売価基本テーブル134と、売価適用開始テーブル136と、売価適用終了テーブル138と、売価適用開始取消テーブル140と、売価適用終了取消テーブル142とを備えている。
 図20は、上記の各テーブルの具体的構成を示すものである。
 まず、売価基本テーブル134は、「売価基本ID(主キー)」、「商品ID(外部キー)」、「売価」及び「登録日時」のデータ項目を備えている。
 また、売価適用開始テーブル136は、「売価適用開始ID(主キー)」、「売価基本ID(外部キー)」、「適用開始日」及び「登録日時」のデータ項目を備えている。有効期限が時間単位で設定される場合には、適用開始日の代わりに、「適用開始日時」のデータ項目が設けられる。
 売価適用終了テーブル138は、「売価適用終了ID(主キー)」、「売価基本ID(外部キー)」、「適用終了日」及び「登録日時」のデータ項目を備えている。有効期限が時間単位で設定される場合には、適用終了日の代わりに、「適用終了日時」のデータ項目が設けられる。
 売価適用開始取消テーブル140は、「売価適用開始ID(主キー/外部キー)」及び「登録日時」のデータ項目を備えている。
 売価適用終了取消テーブル142は、「売価適用終了ID(主キー/外部キー)」及び「登録日時」のデータ項目を備えている。
 上記の各テーブルには、上記と同様、以下の制約が予め課せられている。
(1)キー項目は一つに限定される。
(2)各テーブルにはレコードの追加のみが許容され、既存レコードの値の更新やレコードの削除は禁止される。
(3)各テーブルのカラムには、NULL値禁止制約、フラグ値禁止制約、区分値禁止制約が課せられる。
 これらの制約ルールは、新規テーブルの設計時やSQL発行時に、データベース管理システム132によって適否がチェックされ、制約ルールに違反する処理の実行が拒絶されることにより、その実効性が担保される。
 図20より明らかなように、上記のルールに従い、各テーブルは単一のデータ項目によって主キー(PK)が構成されている。
 また、「売価適用開始取消」に関するデータも、通常であれば売価適用開始テーブル136において「売価適用開始取消フラグ」等のデータ項目が設けられ、各レコードに「1/0」等のフラグ値を充填することで状態が管理されるか、あるいは売価取消開始レコード自体が削除されるところであるが、売価適用開始取消テーブル140を売価適用開始テーブル136とは別個に設けることにより、売価適用開始取消の状態管理がなされている。要するに、この売価適用開始取消テーブル140に登録された売価適用開始IDが「取消」状態にあることとなり、レコードの有無によって取消の有無が表現されている。
 同様に、「売価適用終了取消」に関するデータも、通常であれば売価適用終了テーブル138において「売価適用終了取消フラグ」等のデータ項目が設けられ、各レコードに「1/0」等のフラグ値を充填することで状態が管理されるか、あるいは売価取消終了レコードが削除されるところであるが、売価適用終了取消テーブル142を売価適用終了テーブル138とは別個に設けることにより、売価適用終了取消の状態管理がなされている。
 ここで、クライアント端末117からの検索リクエストを受け取ったWebサーバ112は、検索条件入力画面をクライアント端末117に送信する。
 図21(a)は、クライアント端末117のWebブラウザ上に表示された検索条件入力画面150を示しており、同画面150は商品ID、年月日、売価の項目を備えている。
 これに対しユーザが、商品IDとして「A」を、年月日として「2010/10/03」を入力して検索ボタン152をクリックすると、これらの検索条件がWebサーバ112経由でAPサーバ114に送信される。
 これを受けたデータ参照部118は、売価履歴管理部122に上記の検索条件を渡し、検索処理を依頼する。
 これに対し売価履歴管理部122は、まず売価基本テーブル134から「商品ID:A」に係る売価基本データの取得を依頼する内容のSQLをDBサーバ116に対して発行する。
 つぎに売価履歴管理部122は、DBサーバ116から受信したデータから売価基本IDを抽出し、売価適用開始テーブル136及び売価適用終了テーブル138から対応の売価基本IDに係るデータの取得を依頼する内容のSQLをDBサーバ116に対して発行する。
 つぎに売価履歴管理部122は、DBサーバ116から受信したデータから売価適用開始IDを抽出し、売価適用開始取消テーブル140から対応の売価適用開始IDに係るデータの取得を依頼する内容のSQLをDBサーバ116に対して発行する。同時に、DBサーバ116から受信したデータから売価適用終了IDを抽出し、売価適用終了取消テーブル142から対応の売価適用終了IDに係るデータの取得を依頼する内容のSQLをDBサーバ116に対して発行する。
 つぎに売価履歴管理部122は、DBサーバ116から送信された各データを解析し、「2010年10月3日」における「商品ID:A」の売価を特定する。
 図22は、DBサーバ116から送信されたデータに基づいて生成された商品ID:Aの売価適用情報を時系列に沿って並べた模式図である。
 図中、鎖線で表示された(1)の売価適用情報は、売価が800円、適用開始日(始期)が「2010/09/01」、適用終了日(終期)が「2011/03/31」、登録日が「2010/04/01」であるが、同日付で削除されているため、対象外情報であることを示している。
 この売価適用情報が「削除」されていることは、具体的には、売価適用開始取消テーブル140及び売価適用終了取消テーブル142に、対応の売価適用開始ID及び売価適用終了IDが登録されていることから判定される(詳細は後述)。
 これに対し、実線で表示された(2)の売価適用情報は、売価が700円、適用開始日が「2010/09/01」、適用終了日が「2011/03/31」、登録日が「2010/04/01」であり、削除されていないことを示している。
 同様に、実線で表示された(3)の売価適用情報は、売価が600円、適用開始日が「2010/10/01」、適用終了日が「2010/12/25」、登録日が「2010/08/15」であり、削除されていないことを示している。
 同じく実線で表示された(4)の売価適用情報は、売価が500円、適用開始日が「2010/11/01」、適用終了日が「2010/12/25」、登録日が「2010/10/25」であり、削除されていないことを示している。
 同じく実線で表示された(5)の売価適用情報は、売価が500円、適用開始日が「2010/11/01」、適用終了日が「2011/01/31」、登録日が「2010/12/25」であり、削除されていないことを示している。
 売価履歴管理部122は、各売価適用開始データ及び売価適用終了データの登録日時を比較し、同一の登録日時を備えた両データを抽出することにより、有効期間の始期と終期を備えた売価適用情報を生成する。
 ここで、削除されていない(2)~(5)の売価適用情報を参照すると、「2010年10月3日」が適用期間中に含まれる売価適用情報として、(2)及び(3)が該当することがわかる。
 ただし、このように適用期間が重複している複数の売価適用情報が併存する場合には、登録日時が後の売価適用情報が優先されるルールに従い、売価履歴管理部122は(3)の売価適用情報の「600円」を「2010年10月3日」における有効な売価と認定し、データ参照部118に出力する。
 データ参照部118は、この検索結果データをWebサーバ112に送信する。
 この結果、Webサーバ112からクライアント端末117に対して、検索結果画面が送信される。
 図21(b)は、クライアント端末117のWebブラウザ上に表示された検索結果画面154を示すものであり、「売価」の項目に「600」(円)の値が表示されている。
 因みに、クライアント端末117から送信された検索条件が「商品ID:A/年月日:2011/02/15」であった場合には、(2)の売価適用情報に従い、「700円」の売価がクライアント端末117に表示されることとなる。
 また、図示は省略したが、ユーザが図21(a)の検索条件入力画面150において「商品ID:A」及び「売価:600」を入力して検索ボタン152をクリックした場合には、商品ID:Aに係る売価600の売価履歴情報がリストアップされた検索結果画面が、クライアント端末117のディスプレイに表示される。
 これによりユーザは、商品ID:Aの商品を売価600円で販売した期間を認識することが可能となる。
 図23(a)に示すように、検索条件入力画面150において「商品ID:A」のみを特定し、年月日をブランクとした検索条件が入力された場合、図23(b)に示すように、商品ID:Aに係る全ての有効な売価適用情報(削除されたものは除く)がリストアップされた検索結果画面156が、クライアント端末117のWebブラウザ上に表示される。
 リストアップされた各売価適用情報は、No、売価、適用開始、適用終了、登録日時の表示項目を備えている。
 この表示用データも、売価履歴管理部122によって生成される。
 ここで、ユーザがNO. 0014のチェックボックスにチェックを入れて修正ボタン158をクリックすると、図24に示すように、商品ID、売価、適用開始、適用終了の項目を備えた当該売価適用情報の詳細画面160が、クライアント端末117のWebブラウザ上に表示される。
 これに対しユーザが、売価を「500→550」に書き換えた上で登録ボタン162をクリックすると、売価履歴管理部122はデータ修正のための処理を実行する。
 まず売価履歴管理部122は、DBサーバ116に対して「商品ID:A/売価:550円」の売価基本データが既に登録されているか否かを照会するSQLを発行する。
 ここで、「商品ID:A/売価:550円」の売価基本データが売価基本テーブル134に存在した場合、当該売価基本データの売価基本IDに関連付けた売価適用開始データ(適用開始日:2010/11/01)を売価適用開始テーブル136に追加することを求めるSQLと、同売価基本IDを指定した売価適用終了データ(適用終了日:2010/12/25)を売価適用終了テーブル138に追加することを求めるSQLを、DBサーバ116に発行する。
 これに対し、「商品ID:A/売価:550円」の売価基本データが売価基本テーブル134に存在しなかった場合、この売価基本データを売価基本テーブル134に追加することを求めるSQLをDBサーバ116に発行する。
 つぎに売価履歴管理部122は、DBサーバ116から上記売価基本データの売価基本IDを取得した後、当該売価基本IDを指定した売価適用開始データ(適用開始日:2010/11/01)を売価適用開始テーブル136に追加することを求めるSQLと、同売価基本IDを指定した売価適用終了データ(適用終了日:2010/12/25)を売価適用終了テーブル138に追加することを求めるSQLを、DBサーバ116に発行する。
 上記の結果、「商品ID:A/売価:550円/適用開始日:2010/11/01/適用終了日:2010/12/25」の売価適用情報が、DBサーバ116に新たに追加される。この段階では、「商品ID:A/売価:500円/適用開始日:2010/11/01/適用終了日:2010/12/25」の売価適用情報と重複することになるが、上記の通り、登録日時が新しい方が優先適用されるため、論理的な修正が実現されたことになる。もちろん、ユーザは重複する従前の売価適用情報について売価適用開始取消データ及び売価適用終了取消データを登録することにより、これを論理的に削除することもできる。
 ユーザは、売価と共に適用開始日及び適用終了日の修正を同時にリクエストすることも当然に可能である。
 ユーザが、図23(b)の検索結果画面156において、NO.0014のチェックボックスにチェックを入れて削除ボタン164をクリックした場合には、売価履歴管理部122は売価履歴データの削除のための処理を実行する。
 まず売価履歴管理部122は、DBサーバ116に対して、NO.0014の売価適用情報に係る売価適用開始IDを売価適用開始取消テーブル140に格納することを求めるSQLを、DBサーバ116に発行する。
 同時に売価履歴管理部122は、DBサーバ116に対して、上記売価適用情報に係る売価適用終了IDを売価適用終了取消テーブル142に格納することを求めるSQLを、DBサーバ116に発行する。
 以上の結果、売価基本ID:0014の売価履歴データは、論理的に削除された状態となる。
 ユーザが、図23(b)の検索結果画面156において追加ボタン166をクリックするか、あるいは図示しないメニュー画面において「売価データの追加」ボタンをクリックすると、Webサーバ112から新規登録画面がクライアント端末117に送信され、Webブラウザ上に表示される。
 図示は省略したが、この新規登録画面は図24に示した詳細画面160と同様、商品ID、売価、適用開始、適用終了の項目を備えている。ただし、各項目には文字列が充填されてはおらず、空白となされている。
 これに対しユーザが、商品ID、売価、適用開始日、適用終了日を入力した上で登録ボタンをクリックすると、売価履歴管理部122はデータ追加のための処理を実行する。
 まず売価履歴管理部122は、DBサーバ116に対して、入力された商品ID及び売価を備えた売価基本データが既に登録されているか否かを照会するSQLを発行する。
 ここで、該当の売価基本データが売価基本テーブル134に存在した場合、売価履歴管理部122は、当該売価基本データの売価基本ID及び入力された売価適用開始日を備えた売価適用開始データを売価適用開始テーブル136に追加することを求めるSQLと、同売価基本ID及び入力された売価適用終了データを売価適用終了テーブル138に追加することを求めるSQLを、DBサーバ116に発行する。
 これに対し、該当の売価基本データが売価基本テーブル134に存在しなかった場合、売価履歴管理部122はDBサーバ116に対して、この売価基本データを売価基本テーブル134に追加することを求めるSQLを発行する。
 つぎに売価履歴管理部122は、DBサーバ116から上記売価基本データの売価基本IDを取得した後、当該売価基本ID及び入力された売価適用開始日を備えた売価適用開始データを売価適用開始テーブル136に追加することを求めるSQLと、同売価基本ID及び入力された売価適用終了日を備えた売価適用終了データを売価適用終了テーブル138に追加することを求めるSQLを、DBサーバ116に発行する。
 売価履歴管理部122は、上記の通り、データ参照部118から出力されたデータの参照要求やデータ更新部120から出力されたデータの更新要求に応じて必要なSQLをDBサーバ116に発行すると共に、DBサーバ116から取得したデータの加工・分析処理を実行する。
 そして、DBサーバ116に格納された各テーブルにアクセスするためには、それぞれのテーブル構成(「売価基本テーブル」等のテーブル名や、「売価」等のカラム名)を認識している必要がある。このため、売価履歴管理部122は文字通り売価履歴の管理機能に特化されたものであり、これを税率履歴管理システムなどとして流用することはできない。
 しかしながら、具体的なテーブル名やカラム名を除いた処理ロジックの部分(例えば、クライアント端末から特定の時限データについて削除のリクエストがあった場合には、適用開始取消データと適用終了取消データを追加する等)に関しては、どのような種類の時限データについても共通に適用可能といえる。
 このため、この第1の履歴管理システム110にあっては、各テーブルの設定時に当該テーブルの構成にマッチした「…履歴管理部」を、自動生成する機能を備えている。
 まずユーザは、クライアント端末117からテーブル設定部124にアクセスし、新規テーブルの作成をリクエストする。この結果、テーブル設定画面がクライアント端末117に送信され、Webブラウザ上に表示される(図示省略)。
 ユーザは、このテーブル設定画面上で、テーブルの名称(売価基本テーブル等)、データ項目名(売価基本ID等)、データ型、桁数等を指定し、テーブル設定部124に送信する。
 テーブル設定部124は、送信された設定データをDBサーバ116に送信し、新規テーブルの生成を依頼する。
 これを受けたデータベース管理システム132は、この設定データに従って新規のテーブル(売価基本テーブル134、売価適用開始テーブル136、売価適用終了テーブル138、売価適用開始取消テーブル140、売価適用終了取消テーブル142)をDBサーバ116の記憶装置内に生成する。
 つぎに、型生成部126が起動し、テーブル設定部124から受け取った各テーブルの設定データに基づいて、DBサーバ116内に生成された各テーブルに対応したクラス(型)を生成する。具体的には、売価基本クラス170、売価適用開始クラス171、売価適用終了クラス172、売価適用開始取消クラス173、売価適用終了取消クラス174が生成され、型格納部127に格納される。
 これらクラスの実体は、対応テーブルの名称、データ項目、データ型、桁数等が記述されたプログラムである。
 つぎに、コンパイラ128が起動し、型格納部127内の各クラスをデータアクセス汎用部品130に引数として与えることにより、売価履歴管理部122を生成する。
 すなわち、データアクセス汎用部品130は、「…履歴管理部」が共通して実行すべき処理ロジックの部分のコードを備えたプログラム部品であり、これに対して処理対象となる売価基本テーブル等の具体的な構成を組み込むことにより、当該売価履歴データの管理に特化した売価履歴管理部122が生成される。
 上記した売価基本クラス170、売価適用開始クラス171、売価適用終了クラス172、売価適用開始取消クラス173、売価適用終了取消クラス174は、テーブルの設計データに基づいて型生成部126が自動生成するものであるため、人為的なミスが生じる余地がなく、本来的にテスト不要といえる。
 また、データアクセス汎用部品130のコーディング自体は人間の手によってなされるものであるが、汎用的に使い回すことができるため、事前に厳重なテストを施し、バグを徹底的に潰しておけば、「…履歴管理部」を生成する都度、テストを実施する必要がない。
 以上のことから、操作対象となる各テーブルの構成に特化した各種履歴管理部を生成する度にテストを実施する必要がないということになる。
 つぎに、図25に基づいて、この第1の履歴管理システム110を各国における消費税率の履歴管理に用いる例を説明する。
 この場合、まずユーザは、クライアント端末117からテーブル設定部124にアクセスし、新規テーブルの作成をリクエストする。この結果、テーブル設定画面がクライアント端末117に送信され、Webブラウザ上に表示される(図示省略)。
 ユーザは、このテーブル設定画面上で、テーブルの名称(税率基本テーブル等)、データ項目名(税率基本ID等)、データ型、桁数等を指定し、テーブル設定部124に送信する。
 テーブル設定部124は、送信された設定データをDBサーバ116に送信し、新規テーブルの生成を依頼する。
 これを受けたデータベース管理システム132は、この設定データに従って税率の履歴管理に特化したテーブルとして、税率基本テーブル176、税率適用開始テーブル177、税率適用終了テーブル178、税率適用開始取消テーブル179、税率適用終了取消テーブル180を、DBサーバ116の記憶装置内に生成する。
 図26は、上記の各テーブルの具体的構成を示すものである。
 まず、税率基本テーブル176は、「税率基本ID(主キー)」、「国ID(外部キー)」、「税率」及び「登録日時」のデータ項目を備えている。
 また、税率適用開始テーブル177は、「税率適用開始ID(主キー)」、「税率基本ID(外部キー)」、「適用開始日」及び「登録日時」のデータ項目を備えている。
 税率適用終了テーブル178は、「税率適用終了ID(主キー)」、「税率基本ID(外部キー)」、「適用終了日」及び「登録日時」のデータ項目を備えている。
 税率適用開始取消テーブル179は、「税率適用開始ID(主キー/外部キー)」及び「登録日時」のデータ項目を備えている。
 税率適用終了取消テーブル180は、「税率適用終了ID(主キー/外部キー)」及び「登録日時」のデータ項目を備えている。
 上記の各テーブルには、上記と同様、以下の制約が予め課せられている。
(1)キー項目は一つに限定される。
(2)各テーブルにはレコードの追加のみが許容され、既存レコードの値の更新やレコードの削除は禁止される。
(3)各テーブルのカラムには、NULL値禁止制約、フラグ値禁止制約、区分値禁止制約が課せられる。
 つぎに、型生成部126が起動し、テーブル設定部124から受け取った各テーブルの設定データに基づいて、DBサーバ116内に生成された各テーブルに対応したクラス(型)を生成する。具体的には、税率基本クラス181、税率適用開始クラス182、税率適用終了クラス183、税率適用開始取消クラス184、税率適用終了取消クラス185が生成され、型格納部127に格納される。
 つぎに、コンパイラ128が起動し、型格納部127内の各クラスをデータアクセス汎用部品130に引数として与えることにより、税率履歴データの管理に特化した税率履歴管理部186を生成する。
 これ以降、この第1の履歴管理システム110は税率履歴管理システムとして機能し、税率基本テーブル176、税率適用開始テーブル177、税率適用終了テーブル178、税率適用開始取消テーブル179、税率適用終了取消テーブル180に対応のデータが蓄積されていく。
 ここで、クライアント端末117からの検索リクエストを受け取ったWebサーバ112は、検索条件入力画面をクライアント端末117に送信する。
 図27(a)は、クライアント端末117のWebブラウザ上に表示された検索条件入力画面187を示しており、同画面187は国ID、年月日、税率の項目を備えている。
 これに対しユーザが、国IDとして「JP」を、年月日として「2009/01/03」を入力して検索ボタン188をクリックすると、これらの検索条件がWebサーバ112経由でAPサーバ114に送信される。
 これを受けたデータ参照部118は、税率履歴管理部186に上記の検索条件を渡し、検索処理を依頼する。
 これに対し税率履歴管理部186は、まず税率基本テーブル176から「国ID:JP」に係る税率基本データの取得を依頼する内容のSQLをDBサーバ116に対して発行する。
 つぎに税率履歴管理部186は、DBサーバ116から受信したデータから税率基本IDを抽出し、税率適用開始テーブル177及び税率適用終了テーブル178から対応の税率基本IDに係るデータの取得を依頼する内容のSQLをDBサーバ116に対して発行する。
 つぎに税率履歴管理部186は、DBサーバ116から受信したデータから税率適用開始IDを抽出し、税率適用開始取消テーブル179から対応の税率適用開始IDに係るデータの取得を依頼する内容のSQLをDBサーバ116に対して発行する。同時に、DBサーバ116から受信したデータから税率適用終了IDを抽出し、税率適用終了取消テーブル180から対応の税率適用終了IDに係るデータの取得を依頼する内容のSQLをDBサーバ116に対して発行する。
 つぎに税率履歴管理部186は、DBサーバ116から送信された各データを解析し、「2009年1月3日」におけるJP(日本)の税率を特定する。
 データ参照部118は、この検索結果データをWebサーバ112に送信する。
 この結果、Webサーバ112からクライアント端末117に対して、検索結果画面が送信される。
 図27(b)は、クライアント端末117のWebブラウザ上に表示された検索結果画面189を示すものであり、「税率」の項目に「5」(%)の値が表示されている。
 その他、詳細な説明は省略するが、税率履歴管理部186は上記の売価履歴管理部122と同様、クライアント端末117からのリクエストに応じて、税率適用データの論理的な修正や削除、あるいは追加処理を実行する。
 各種業務システムの中では、様々な時限データが取り扱われており、これまでは個々の時限データ毎に履歴を管理するための仕組みが場当たり的に設計されてきた。
 これに対し、第1の履歴管理システム110の場合には、時限データの履歴管理のためのテーブルを、「基本テーブル」、「適用開始テーブル」、「適用終了テーブル」、「適用開始取消テーブル」、「適用終了取消テーブル」の5つに統一すると共に、履歴管理の処理ロジックをデータアクセス汎用部品130として共通化しておき、これに具体的なテーブル構成を適用することにより、各種の時限データに特化した履歴管理部を自動生成する仕組みを備えている。
 この結果、個別に履歴管理システムを構築したりテストを実施したりする手間が省けることはもちろん、時限データの種類を問わず共通の仕組みを備えることにより、メンテナンス性が向上する利点が生じる。
 上記した時限データの履歴管理システムは、クライアント端末117からのリクエストに応じてデータの検索や更新が実行される例を示したが、履歴管理部は他のコンピュータシステムからのリクエストに応じて上記の各種処理を実行することも当然に可能である。
 上記においては、5つのテーブル(基本テーブル、適用開始テーブル、適用終了テーブル、適用開始取消テーブル、売価適用終了取消テーブル)によって、様々な時限データの履歴を管理する方式について説明したが、さらに、適用開始データと適用終了データとを直に関連付ける関連テーブルとしての「適用期間テーブル」を追加することにより、より柔軟な履歴管理を実現することができる。
 図28はその具体例を示すものであり、この時限データの第2の履歴管理システム190は、DBサーバ116内に、売価基本テーブル134、売価適用開始テーブル136、売価適用終了テーブル138、売価適用開始取消テーブル140、売価適用終了取消テーブル142の他に、売価適用期間テーブル191を設けた点に特徴を備えている。
 図29に示すように、売価適用期間テーブル191は、「売価適用開始ID(主キー/外部キー)」、「売価適用終了ID(外部キー)」及び「登録日時」のデータ項目を備えている。ただし、「売価適用終了ID」を主キーとしてもよい。
 他のテーブルの構成は、図20に示したものと同じである。
 このような、売価適用開始IDと売価適用終了IDとの関連性を管理するためのテーブルを備えない第1の履歴管理システム110の場合、売価適用開始データと売価適用終了データとの関連付けはそれぞれの「登録日時」に基づいて行われていたため、両データは必ず同一のタイミングで登録される必要性があった。
 これに対し、売価適用開始ID及び売価適用終了IDの項目を備えた売価適用期間テーブル191を設けることにより、両データを別個のタイミングで登録しても、有効期間を正しく管理することが可能となる。
 例えば、図30(a)に示すように、ユーザが新規登録画面195において商品ID、売価、適用開始日のみを特定して登録ボタン196をクリックした場合、売価履歴管理部122は上記と同様の手順で、DBサーバ116に対して「商品ID:A/売価:700/適用開始日:2010/09/01」の売価適用情報の登録を求める。
 これを受けたDBサーバ116のデータベース管理システム132は、上記と同様、「商品ID:A/売価:700」の売価基本データが存在しない場合に限り、売価基本テーブル134に当該売価基本データのレコードを追加する。
 つぎにデータベース管理システム132は、売価適用開始テーブル136に売価基本ID及び適用開始日(2010/09/01)を備えたレコードを追加する。
 図31(1)は、「適用開始日」のみが登録された売価履歴データを示している。
 後日、ユーザのクライアント端末117から「商品ID:A」が検索条件として入力された場合、図示は省略したが、商品ID:Aに係る全ての有効な売価適用情報がリストアップされた検索結果画面が、クライアント端末117のWebブラウザ上に表示される。
 そして、このリスト中からユーザが「商品ID:A/売価:700/適用開始日:2010/09/01」の売価適用情報にチェックを入れ、修正ボタンをクリックすると、図30(b)に示すように、当該売価適用情報の詳細画面160が表示される。
 これに対しユーザが、ブランクとなっている「適用終了」の項目に「2011/03/31」を入力して登録ボタン162をクリックすると、売価履歴管理部122はデータ修正のための処理を実行する。
 まず売価履歴管理部122は、「商品ID:A/売価:700」の売価基本データに係る売価基本IDと、「2011/03/31」の適用終了日を備えた売価適用終了データを、売価適用終了テーブル138に追加することを求めるSQLを、DBサーバ116に発行する。
 つぎに売価履歴管理部122は、当該売価適用終了データに係る売価適用終了IDと、「適用開始日:2010/09/01」の売価適用開始データに係る売価適用開始IDを備えた売価適用期間データを、売価適用期間テーブル191に追加することを求めるSQLを、DBサーバ116に発行する。
 この結果、図31(2)に示すように、売価適用情報の「適用開始日」及び「適用終了日」が揃った状態となる。
 この売価適用情報の適用開始日と適用終了日の関連付けは、売価履歴管理部122が、DBサーバ116から送信された各売価適用開始データの適用開始IDと売価適用終了データの適用終了IDが一の売価適用期間データ中に揃って登録されているか否かをチェックすることにより、実現される。
 この第2の履歴管理システム190の場合、上記のように参照時に売価履歴管理部122が売価適用期間テーブル191をチェックし、売価適用開始データと売価適用終了データとの関連付けを行う必要が生じるが、最初に開始日を登録しておき、後から終了日を追加登録することが可能となり、時限データのより柔軟な管理運用が可能となる。
 もちろん、テーブル数が増加する分、上記の通り、売価履歴管理部122の処理内容が複雑化することは否めないが、これに対応した処理ロジックがコーディングされたデータアクセス汎用部品130を用意しておくことで、上記と同様、具体的な履歴管理部を自動生成することができるため、個々のプログラム開発の負担を抑えることができる。
 すなわち、クライアント端末117から売価適用期間テーブルを含めた各テーブルの設定データが送信されると、テーブル設定部124はこれをDBサーバ116に送信し、新規テーブルの生成を依頼する。
 これを受けたデータベース管理システム132は、この設定データに従って新規のテーブル(売価基本テーブル134、売価適用開始テーブル136、売価適用終了テーブル138、売価適用開始取消テーブル140、売価適用終了取消テーブル142、売価適用期間テーブル191)をDBサーバ116の記憶装置内に生成する。
 つぎに型生成部126が起動し、テーブル設定部124から受け取った各テーブルの設定データに基づいて、DBサーバ116内に生成された各テーブルに対応したクラス(型)を生成する。具体的には、売価基本クラス170、売価適用開始クラス171、売価適用終了クラス172、売価適用開始取消クラス173、売価適用終了取消クラス174、売価適用期間テーブル191が生成され、型格納部127に格納される。
 つぎにコンパイラ128が起動し、型格納部127内の各クラスを、6つのテーブル構成に対応したデータアクセス汎用部品130に引数として与えることにより、6つのテーブル構成に対応した売価履歴管理部122を生成する。
 上記のように、ユーザが図30(a)の新規登録画面195において適用開始日のみを入力し、適用終了日を入力したかった場合、売価適用期間データは売価適用終了データの追加時に売価適用期間テーブル191に登録される。
 これに対し、ユーザが図30(a)の新規登録画面195において適用開始日と適用終了日を同時に入力した場合、売価履歴管理部122はDBサーバ116に対し、最初から売価適用期間データを売価適用期間テーブル191に登録することを依頼する。
 もっとも、ユーザが図30(a)の新規登録画面195において適用開始日と適用終了日を同時に入力した場合には、売価適用期間データを売価適用期間テーブル191に登録することなく、5つのテーブル構成を前提とした第1の履歴管理システム110の場合と同様、売価履歴管理部122が適用開始データ及び適用終了データの登録日時の同一性に基づいて適用開始日と適用終了日のマッチングを行うように、この第2の履歴管理システム190を構成することもできる。
 売価適用開始データを一旦登録した後、対をなす売価適用終了データが登録される前に当該売価適用開始データ自体が不要になった場合には、当該売価適用開始データに係る売価適用開始IDを売価適用開始取消テーブル140に登録すればよい。
 上記においては、先に売価適用開始日が登録された後、売価適用終了日が追加されるパターンを例示したが、図32(1)に示すように、先に売価適用終了日を登録しておき、図32(2)に示すように、後で売価適用開始日を追加することも当然に可能である。
 もちろん、上記のように売価適用開始データと売価適用終了データとを直に関連付ける「売価適用期間テーブル191」を設けなくとも、売価適用開始日を先に登録しておき、後から対応の売価適用終了日を実質的に追加することは可能である。
 例えば、図33(1)に示すように、2011年4月1日に「商品ID:B/売価:1700円/適用開始日:2011/09/01」の売価適用開始データが先に登録されていた場合において、翌日(2011年4月2日)に「商品ID:B/売価:1700円/適用終了日:2012/03/31」の売価適用終了データを追加する必要性が生じた際には、図33(2)に示すように、「商品ID:B/売価:1700円/適用開始日:2011/09/01」の売価適用開始データと、「商品ID:B/売価:1700円/適用終了日:2012/03/31」の売価適用終了データを同時に登録する。
 この結果、「商品ID:B/売価:1700円/適用開始日:2011/09/01」の売価適用開始データが重複することになるが、登録日時の新しい情報が優先されるルールに基づき、図33(1)の売価適用開始データは参照対象から除外されるため、実質的に売価適用終了日の追加が実現される。
 ただし、このように登録日時ベースで売価適用開始データと売価適用終了データとの関連付けを実現する場合には、売価履歴管理部122の処理量が拡大するという問題が生じる。
 以下、図34のフローチャートに従い、この場合における売価履歴管理部122の処理手順を説明する。
 まず売価履歴管理部122は、売価適用開始データ201と売価適用開始取消データ202を照合し、売価適用開始取消データ202が登録されている売価適用開始データ201を排除すると共に、売価適用開始取消データ202が登録されていない売価適用開始データ201を有効売価適用開始データ203として取り出す除外処理(except)204を実行する。
 この際、売価履歴管理部122は、売価適用開始データ201及び売価適用開始取消データ202に割り振られた売価適用開始IDに基づいて、照合対象を特定する。
 上記の有効売価適用開始データ203は、少なくとも売価適用開始ID、売価基本ID、適用開始日を含んでいる。
 同様に売価履歴管理部122は、売価適用終了データ205と売価適用終了取消データ206を照合し、売価適用終了取消データ206が登録されている売価適用終了データ205を排除すると共に、売価適用終了取消データ206が登録されていない売価適用終了データ205を有効売価適用終了データ207として取り出す除外処理(except)208を実行する。
 この際、売価履歴管理部122は、売価適用終了データ205及び売価適用終了取消データ206に割り振られた売価適用終了IDに基づいて、照合対象を特定する。
 上記の有効売価適用終了データ207は、少なくとも売価適用終了ID、売価基本ID、適用終了日を含んでいる。
 つぎに売価履歴管理部122は、有効売価適用開始データ203と有効売価適用終了データ207を照合すると共に、その照合結果に基づいて有効売価適用開始・終了データ209、有効売価適用開始(終了無し)データ210、有効売価適用終了(開始無し)データ211を出力するマッチング処理212を実行する。
 このマッチング処理212において、売価履歴管理部122は、対応する有効売価適用開始データ203及び有効売価適用終了データ207が揃っている場合には、両データに基づいて有効売価適用開始・終了データ209を生成し、データ参照部118に出力する。
 この有効売価適用開始・終了データ209は、少なくとも売価基本ID、適用開始日及び適用終了日を含んでいる。
 また売価履歴管理部122は、対応する有効売価適用終了データ207が見つからない有効売価適用開始データ203がある場合には、当該データを有効売価適用開始(終了無し)データ210としてデータ参照部118に出力する。
 さらに売価履歴管理部122は、対応する有効売価適用開始データ203が見つからない有効売価適用終了データ207がある場合には、当該データを有効売価適用終了(開始無し)データ211としてデータ参照部118に出力する。
 上記マッチング処理212に際しては、上記のように各有効売価適用開始データ203及び有効売価適用終了データ207の登録日時の異同に基づいてデータ間の対応関係が認定されるため、図35に示すように、多数の有効売価適用開始データ203と有効売価適用終了データ207が存在した場合に、売価履歴管理部122は各有効売価適用開始データ203の登録日時と有効売価適用終了データ207の登録日時を総当たり式に照合し、一致したもの同士を対応付ける必要が生じ、最大で「売価適用開始データ数×価適用終了データ数」回分の照合が必要となる。
 また、このマッチング処理212における照合の回数が最大となった場合を想定して事前に必要十分なメモリ領域が確保される関係上、売価履歴管理部122におけるマッチング処理212は単独のCPUコアが担当する必要が生じ、マルチコアCPUを用いた分散処理による効率化に馴染まないという問題もあった。
 これに対し、上記のように予め売価適用開始データと売価適用終了データの対応関係を1対1で関連付けた売価適用期間テーブル191を設けておくことで、売価履歴管理部122の処理量を大幅に低減することが可能となる。
 以下、図36のフローチャートに従い、この場合における売価履歴管理部122の処理手順を説明する。
 まず売価履歴管理部122は、売価適用開始データ201と売価適用開始取消データ202を照合し、売価適用開始取消データ202が登録されている売価適用開始データ201を排除すると共に、売価適用開始取消データ202が登録されていない売価適用開始データ201を有効売価適用開始データ203として取り出す除外処理(except)204を実行する。
 この際、売価履歴管理部122は、売価適用開始データ201及び売価適用開始取消データ202に割り振られた売価適用開始IDに基づいて照合対象を特定する。
 上記の有効売価適用開始データ203は、少なくとも売価適用開始ID、売価基本ID、適用開始日を含んでいる。
 同様に売価履歴管理部122は、売価適用終了データ205と売価適用終了取消データ206を照合し、売価適用終了取消データ206が登録されている売価適用終了データ205を排除すると共に、売価適用終了取消データ206が登録されていない売価適用終了データ205を有効売価適用終了データ207として取り出す除外処理(except)208を実行する。
 この際、売価履歴管理部122は、売価適用終了データ205及び売価適用終了取消データ206に割り振られた売価適用開始IDに基づいて照合対象を特定する。
 上記の有効売価適用終了データ207は、少なくとも売価適用終了ID、売価基本ID、適用終了日を含んでいる。
 つぎに売価履歴管理部122は、有効売価適用開始データ203と売価適用期間データ215を照合し、対応の売価適用期間データ215が存在する有効売価適用開始データ203に関しては、有効売価適用開始+終了IDデータ216を生成する結合処理(join)217を実行する。
 この際、売価履歴管理部122は、有効売価適用開始データ203及び売価適用期間データ215に格納された売価適用開始IDに基づいて照合対象を特定する。
 上記の有効売価適用開始+終了IDデータ216は、少なくとも売価適用開始ID、売価基本ID、適用開始日、売価適用終了IDを含んでいる。
 同時に売価履歴管理部122は、有効売価適用開始データ203と売価適用期間データ215を照合し、対応の売価適用期間データ215が存在する有効売価適用開始データ203を排除すると共に、対応の売価適用期間データ215が存在しない有効売価適用開始データ203を有効売価適用開始(終了無し)データ210として出力する除外処理(except)218を実行する。
 この際、売価履歴管理部122は、有効売価適用開始データ203及び売価適用期間データ215に格納された売価適用開始IDに基づいて照合対象を特定する。
 つぎに売価履歴管理部122は、有効売価適用終了データ207と有効売価適用開始+終了IDデータ216を照合し、対応の有効売価適用開始+終了IDデータ216が存在する有効売価適用終了データ207に関しては、有効売価適用開始・終了データ209を生成する結合処理(join)219を実行する。
 この際、売価履歴管理部122は、有効売価適用終了データ207及び有効売価適用開始+終了IDデータ216に格納された売価適用終了IDに基づいて照合対象を特定する。
 上記の有効売価適用開始・終了データ209は、少なくとも売価基本ID、適用開始日及び適用終了日を含んでいる。
 つぎに売価履歴管理部122は、有効売価適用終了データ207と有効売価適用開始+終了IDデータ216を照合し、対応の有効売価適用開始+終了IDデータ216が存在する有効売価適用終了データ207を排除すると共に、対応の有効売価適用開始+終了IDデータ216が存在しない有効売価適用終了データ207を有効売価適用終了(開始無し)データ211として出力する除外処理(except)220を実行する。
 この際、売価履歴管理部122は、有効売価適用終了データ207及び有効売価適用開始+終了IDデータ216に格納された売価適用終了IDに基づいて照合対象を特定する。
 以上の処理の結果、売価履歴管理部122からは、有効売価適用開始・終了データ209、有効売価適用開始(終了無し)データ210、有効売価適用終了(開始無し)データ211と、売価基本IDに対応した商品ID及び売価がデータ参照部218に出力され、Webサーバ212を通じてクライアント端末217に検索結果画面が送信される。
 図37は、この検索結果画面222を示すものであり、NO.0022及びNO.0025は適用開始日と適用終了日が揃った有効売価適用開始・終了データ209に対応しており、NO.0023は有効売価適用開始(終了無し)データ210に、NO.0024は有効売価適用終了(開始無し)データ211に対応している。
 上記の通り、売価履歴管理部122は、各データの売価適用開始ID同士または売価適用終了ID同士を突き合わせることにより、照合対象を「1対1」で一意に特定することができる。
 このため、複数のデータを「多対多」の関係で総当たり式に照合する場合に比べて、処理量を大幅に削減することが可能となる。
 また、複数のデータを多対多の関係で照合する場合には、予め最大限の組合せパターンに対応したメモリ領域を確保した上で、1つのCPUコアが処理を担当する必要があるため、売価履歴管理部122の処理効率の向上にも限界があった。
 これに対し、上記のように照合処理を複数の除外処理と結合処理に分解することにより、処理毎に別個のCPUコアを割り当てることが可能となり、マルチコアCPUを利用した処理の効率化を促進することが可能となる。
 この実施形態は、請求項13及び14に記載した発明の実施例でもある。
 具体的には、請求項13における「相互に値が異なる複数の同種データを、第1の結合対象データとして格納しておく第1の結合対象記憶手段」には、「複数の売価適用開始データを格納した売価適用開始テーブル136」が該当する。
 また、請求項13における「相互に値が異なる複数の同種データを、上記第1の結合対象データとは種類を異にする第2の結合対象データとして格納しておく第2の結合対象記憶手段」には、「複数の売価適用終了データを格納した売価適用終了テーブル138」が該当する。
 また、請求項13における「特定の第1の結合対象データのIDと、当該第1のデータの結合対象となるべき特定の第2の結合対象データのIDを記録した関連データを格納しておく関連記憶手段」には、「売価適用開始IDと売価適用終了IDを格納しておく売価適用期間テーブル191」が該当する。
 また、請求項13における「上記第1の結合対象記憶手段から取り出された特定の第1の結合対象データのIDを備えた関連データを、上記関連記憶手段から取り出すと共に、当該関連データに記録された第2の結合対象データのIDを、上記第1の結合対象データに追加した中間データを生成する第1の結合処理を実行する手段」には、中間データとしての「有効売価適用開始+終了IDデータ216」を生成する結合処理217を実行する売価履歴管理部122が該当する。
 また、請求項13における「上記第2の結合対象記憶手段から取り出された第2の結合対象データの中で、当該中間データに追加されたIDが記録されたものを特定すると共に、当該中間データに第2の結合対象データの少なくとも一部のデータ項目の値を追加した結合データを生成する第2の結合処理を実行する手段」には、有効売価適用開始・終了データ209を生成する結合処理219を実行する売価履歴管理部122が該当する。
 また、請求項14における「特定の第1の結合対象データのIDを備えた関連データが存在しない場合に、当該第1の結合対象データを対応する第2の結合対象データが存在しないデータとして分離する第1の例外処理を実行する手段」には、有効売価適用開始データ203を有効売価適用開始(終了無し)データ210として分離・出力する除外処理218を実行する売価履歴管理部122が該当する。
 また、請求項14における「特定の第2の結合対象データのIDを備えた中間データが存在しない場合に、当該第2の結合対象データを対応する第1の結合対象データが存在しないデータとして分離する第2の除外処理を実行する手段」には、有効売価適用終了データ207を有効売価適用終了(開始無し)データ211として分離・出力する除外処理220を実行する売価履歴管理部122が該当する。
 なお、関連テーブルを設け、多対多のマッチング処理を1対1の結合処理及び1対1の除外処理に分解することにより、処理の効率化やCPUのマルチコア化に対応可能とする技術は、時限データの履歴管理システムにおける適用開始データと適用終了データ間の対応付けに限定されるものではなく、他のデータ間の関連付けにも広く適用可能であることは言うまでもない。
この発明に係るデータ利用システムの全体構成を示す模式図である。 この発明に係るデータ利用システムの、検索リクエストがDBサーバに送信される場面での機能構成を示すブロック図である。 この発明に係るデータ利用システムの、DBサーバから検索結果が送信される場面での機能構成を示すブロック図である。 この発明に係るデータ利用システムの、クライアント端末から送信されたデータ追加のリクエストが、DBサーバに送信される場面での機能構成を示すブロック図である。 CPUコアとスレッドとの対応関係を示す模式図である。 検索条件分割処理部による処理手順を示すフローチャートである。 検索処理部による処理手順を示すフローチャートである。 検索結果統合処理部による処理手順を示すフローチャートである。 クライアント端末から送信されたデータ追加のリクエストがDBサーバに送信される際の処理手順を示すフローチャートである。 DBサーバに格納されたテーブルを例示する図である。 データ加工処理部によるデータ分割の手順を示す模式図である。 スレッド毎に複数のスレッドプールを設けた例を示す模式図である。 この発明に係るデータ利用システムにインデックスサーバを追加した例を示すブロック図である。 DBサーバの内部構造を示す模式図である。 DBサーバの構成を示す概念図である。 異なるDB系統に属する複数のDBサーバ間でデータの不整合が生じる例を示す説明図である。 この発明に係るデータ間の整合性確保方式を示す説明図である。 この発明に係るデータ間の整合性確保方式を示す説明図である。 この発明に係る時限データの第1の履歴管理システムの全体構成を示すブロック図である。 DBサーバに格納された各テーブルの具体例を示す図である。 検索条件入力画面及び検索結果画面を示す図である。 売価履歴情報の一例を示す模式図である。 検索条件入力画面及び検索結果画面を示す図である。 売価適用情報の詳細画面を示す図である。 この発明に係る時限データの第1の履歴管理システムの変形例を示すブロック図である。 DBサーバに格納された各テーブルの具体例を示す図である。 検索条件入力画面及び検索結果画面を示す図である。 この発明に係る時限データの第2の履歴管理システムの全体構成を示すブロック図である。 DBサーバに格納された各テーブルの具体例を示す図である。 新規登録画面及び詳細画面を示す図である。 売価適用情報の一例を示す模式図である。 売価適用情報の一例を示す模式図である。 売価適用情報の一例を示す模式図である。 登録日時ベースで売価適用開始データと売価適用終了データとの関連付けを実現する場合の処理手順を示すフローチャートである。 登録日時ベースで売価適用開始データと売価適用終了データとの関連付けを実現する場合の処理内容を示す模式図である。 売価適用期間データを用いて売価適用開始データと売価適用終了データとの関連付けを実現する場合の処理手順を示すフローチャートである。 検索結果画面を示す図である。
 10  データ利用システム
 12   Webサーバ
 13  ロードバランサ
 14  APサーバ
 16  DBサーバ
 17  インターネット
 18  クライアント端末
 19  テーブル群
 20  検索条件分割処理部
 22  検索処理部
 24  データ加工処理部
 26  検索結果統合処理部
 27  追加データ受付部
 28  登録処理部
 30  CPUコア
 32  スレッド
 34  スレッドプール
 36  タスク
 40  顧客管理テーブル
 42  予約管理テーブル
 44  売上管理テーブル
 46  予約取消管理テーブル
 48  請求管理テーブル
 50  第1のスレッドプール
 52  第2のスレッドプール
 60  インデックスサーバ
 61  DB管理システム
 62  当日分データ記憶領域
 63  過去分データ記憶領域
 64  インデックス生成部
 65  インデックス記憶部
 66  インデックス提供部
 70  バッファ・キャッシュ領域
 74  テーブル記憶領域
 76  更新ログ記憶領域
 78  ブロック
 79  更新ログ
 80  商品テーブル
 81  関連テーブル
 82  店舗テーブル
 83  会員テーブル
 84  住所テーブル
 85  購入テーブル
 86  関連テーブル
110 時限データの第1の履歴管理システム
 212  Webサーバ
 114  APサーバ
 116  DBサーバ
 217  クライアント端末
 218  データ参照部
 220  データ更新部
 122 売価履歴管理部
 124  テーブル設定部
 126  型生成部
 127  型格納部
 128  コンパイラ
 130  データアクセス汎用部品
 132  データベース管理システム
 134  売価基本テーブル
 136  売価適用開始テーブル
 138  売価適用終了テーブル
 140  売価適用開始取消テーブル
 142  売価適用終了取消テーブル
 150  検索条件入力画面
 152  検索ボタン
 154  検索結果画面
 156  検索結果画面
 158  修正ボタン
 160  詳細画面
 162  登録ボタン
 164  削除ボタン
 166  追加ボタン
 170  売価基本クラス
 171  売価適用開始クラス
 172  売価適用終了クラス
 173  売価適用開始取消クラス
 174  売価適用終了取消クラス
 176  税率基本テーブル
 177  税率適用開始テーブル
 178  税率適用終了テーブル
 179  税率適用開始取消テーブル
 180  税率適用終了取消テーブル
 181  税率基本クラス
 182  税率適用開始クラス
 183  税率適用終了クラス
 184  税率適用開始取消クラス
 185  税率適用終了取消クラス
 186  税率履歴管理部
 187  検索条件入力画面
 188  検索ボタン
 189  検索結果画面
 190  時限データの第2の履歴管理システム
 191  売価適用期間テーブル
 193  売価適用期間クラス
 195  新規登録画面
 196  登録ボタン
201  売価適用開始データ
202  売価適用開始取消データ
203  有効売価適用開始データ
205  売価適用終了データ
206  売価適用終了取消データ
207  有効売価適用終了データ
209  有効売価適用開始・終了データ
210  有効売価適用開始(終了無し)データ
211  有効売価適用終了(開始無し)データ
212  マッチング処理
215  売価適用期間データ
216  有効売価適用開始+終了IDデータ
217  結合処理
218  除外処理
219  結合処理
220  除外処理
222  検索結果画面 

Claims (14)

  1.  複数のデータベースサーバと、各データベースサーバにネットワークを介して接続されたアプリケーションサーバとからなるデータ利用システムであって、
     上記の各データベースサーバは、DB管理システムとデータ記憶領域を備えており、
     各データベースサーバのデータ記憶領域には、データベースサーバ相互間に共通するデータを保持した共通のテーブルがそれぞれ複数格納されており、
     上記の各テーブルには、キー項目が一つに限定される制約と、データの更新及び削除が禁止される制約が設けられており、
     上記アプリケーションサーバは、検索条件分割処理部と、複数の検索処理部と、複数のデータ加工処理部と、検索結果統合処理部と、追加データ受付部と、複数の登録処理部を備え、
     上記検索条件分割処理部は、入力された検索条件を解析して複数の検索条件に分割すると共に、各検索条件及び対応データベースサーバを上記複数の検索処理部に割り当てる処理を実行し、
     上記の各検索処理部は、自己に割り当てられた検索条件に対応したSQLを生成し、自己に割り当てられたデータベースサーバに発行する処理と、データベースサーバから一定量の検索結果データが送信される度に、必要な演算処理を上記の各データ加工処理部に割り当てる処理と、各データ加工処理部から部分的な加工処理結果データが返される度に、これをメモリに格納すると共に、データベースサーバから送信されたデータをメモリ上から削除する処理と、データベースサーバからのデータ送信が完了し、部分的な検索結果データに基づく部分的な加工処理結果データが全て揃った時点で、これらを集計して上記検索結果統合処理部に集計結果を出力する処理を実行し、
     上記検索結果統合処理部は、各検索処理部から渡された集計結果を集計し、検索結果として出力する処理を実行し、
     上記追加データ受付部は、入力された追加データのコピーと、対応データベースサーバの特定情報を含むデータ追加リクエストを上記の各登録処理部に割り当てる処理を実行し、
     上記の各登録処理部は、上記追加データの登録を求めるSQLを生成し、自己に割り当てられたデータベースサーバに発行する処理を実行することを特徴とするデータ利用システム。
  2.  複数のデータベースサーバと、各データベースサーバにネットワークを介して接続されたアプリケーションサーバとからなるデータ利用システムであって、
     上記の各データベースサーバは、DB管理システムと、各種テーブルが格納される外部記憶装置を備えており、
     上記の各テーブルには、データの更新及び削除が禁止される制約が設けられており、
     上記アプリケーションサーバは、登録処理部及び検索処理部を備えており、
     上記登録処理部は、複数のデータベースサーバがそれぞれ管理している異なるテーブルに対し相互に関連する複数データの組合せの追加を求める登録リクエストが入力された場合に、対応のテーブルを備えた各データベースサーバに対応データの追加登録を求めるSQLを発行する処理と、何れかのデータベースサーバの外部記憶装置に設けられた関連テーブルに対して各追加データのIDの登録を求めるSQLを生成し、当該関連テーブルを管理するデータベースサーバに発行する処理を実行し、
     上記検索処理部は、複数のデータベースサーバの外部記憶装置に格納されている異なるテーブルから相互に関連する複数データの組合せの抽出を求める検索条件が入力された場合に、上記関連テーブルを参照して抽出対象となる各データのIDを特定する処理と、対応のデータベースサーバが管理している各テーブルを参照し、必要なデータの組合せが揃っているか否かを確認する処理と、必要なデータの組合せが全て揃っている場合には各データベースサーバにSQLを発行して対応データの抽出を指令し、必要なデータの組合せが揃っていない場合には当該データの組合せを抽出対象から除外する処理を実行することを特徴とするデータ利用システム。
  3.  上記の各データベースサーバは、複数のDB系統に分類されており、
     同一のDB系統に属する複数のデータベースサーバの外部記憶装置には、相互に等しいデータを保持した共通のテーブルがそれぞれ格納されており、異なるDB系統に属するデータベースサーバの外部記憶装置には、異なるデータを保持した別個のテーブルがそれぞれ格納されており、
     上記アプリケーションサーバは、追加データ受付部と、複数の上記登録処理部と、検索条件分割処理部と、複数の上記検索処理部と、複数のデータ加工処理部と、検索結果統合処理部とを備え、
     上記追加データ受付部は、複数のDB系統に属する異なるテーブルに対し相互に関連する複数データの組合せの追加を求める登録リクエストが入力された場合に、入力された複数データの組合せのコピーと、異なるDB系統に属する複数のデータベースサーバの特定情報を含むデータ追加リクエストを上記の各登録処理部に割り当てる処理を実行し、
     各登録処理部は、対応データの追加登録を求めるSQLを自己に割り当てられた各データベースサーバに発行する処理と、各追加データのIDの登録を求めるSQLを生成し、各データベースサーバの中で上記関連テーブルを管理するデータベースサーバに発行する処理を実行し、
     上記検索条件分割処理部は、異なるDB系統に属する複数のテーブルから相互に関連する複数データの組合せの抽出を求める検索条件が入力された場合に、この検索条件を解析して複数の検索条件に分割すると共に、分割された各検索条件及び異なるDB系統に属する各データベースサーバの特定情報を上記複数の検索処理部に割り当てる処理を実行し、
     各検索処理部は、自己に割り当てられた検索条件に対応したSQLを生成し、自己に割り当てられた各データベースサーバに発行する処理と、各データベースサーバから一定量の検索結果データが送信される度に、必要な演算処理を上記の各データ加工処理部に割り当てる処理と、各データ加工処理部から部分的な加工処理結果データが返される度に、これをメモリに格納すると共に、データベースサーバから送信されたデータをメモリ上から削除する処理と、データベースサーバからのデータ送信が完了し、部分的な検索結果データに基づく部分的な加工処理結果データが全て揃った時点で、これらを集計して上記検索結果統合処理部に集計結果を出力する処理を実行し、
     上記検索結果統合処理部は、各検索処理部から渡された集計結果を集計し、検索結果として出力する処理を実行することを特徴とする請求項2に記載のデータ利用システム。
  4.  上記検索条件分割処理部は、入力された検索条件が時間的な範囲を含んでいる場合に、これをより短い時間的な範囲に分割することを特徴とする請求項1または3に記載のデータ利用システム。
  5.  上記検索条件分割処理部は、入力された検索条件が地域的な範囲を含んでいる場合に、これをより狭い地域的な範囲に分割することを特徴とする請求項1または3に記載のデータ利用システム。
  6.  請求項1~5の何れかに記載のデータ利用システムであって、
     インデックス生成部及びインデックス記憶部を有するインデックスサーバを備えており、
     また上記の各データベースサーバは、暫定記憶領域及び永続記憶領域を備えており、
     上記DB管理システムは、上記アプリケーションサーバから送信された追加データを上記暫定記憶領域に格納する処理と、所定の時間間隔で暫定記憶領域内の追加データを上記永続記憶領域に移動する処理を実行し、
     上記インデックスサーバのインデックス生成部は、所定の時間間隔で上記データベースサーバの暫定記憶領域に格納された追加データを取得する処理と、この追加データに基づいてインデックスを生成し、上記インデックス記憶部に格納する処理を実行し、
     上記アプリケーションサーバの検索処理部は、自己に割り当てられた検索条件に対応した上記SQLを生成するに際し、上記インデックスサーバのインデックス記憶部を参照し、検索条件に該当する各データの主キーを取得する処理と、この主キーによって取得データを指定したSQLを生成する処理を実行することを特徴とするデータ利用システム。
  7.  上記の各データベースサーバは、メモリ上に設けられた更新ログ記憶領域を備えており、
     各データベースサーバのOSが、上記アプリケーションサーバから送信された追加データを上記更新ログ記憶領域に順次格納する処理を実行することを特徴とする請求項1、3~6の何れかに記載のデータ利用システム。
  8.  特定の有効期間と値を備えた時限データを格納しておくDBサーバと、
     このDBサーバにアクセスしてデータの参照及び追加を依頼する履歴管理部とを備えた時限データの履歴管理システムであって、
     上記DBサーバは、
     有効期間の適用対象及びその値を固有の基本IDに関連付けて格納する基本テーブルと、
     上記適用対象及び値の有効期間の始期を、対応の基本ID及び固有の適用開始IDに関連付けて登録する適用開始テーブルと、
     上記適用対象及び値の有効期間の終期を、対応の基本ID及び固有の適用終了IDに関連付けて登録する適用終了テーブルと、
     上記適用開始IDを格納する適用開始取消テーブルと、
     上記適用終了IDを格納する適用終了取消テーブルとを備え、
     上記履歴管理部は、
    (1)適用対象、値、有効期間を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加すると共に、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルに追加すると共に、この基本データの基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加し、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼する処理を実行し、
    (2)適用対象、値、有効期間の少なくとも一つを検索条件として特定した時限データの参照リクエストが入力された場合に、上記DBサーバに対して、上記検索条件にマッチする基本データ、適用開始データ、適用終了データ、適用開始取消データ、適用終了取消データの送信を依頼し、DBサーバから送信された時限データの中で、適用開始取消データ及び適用終了取消データが登録されたものを除外した上で、検索結果として出力する処理を実行し、
    (3)特定の時限データの削除リクエストが入力された場合に、上記DBサーバに対し、当該時限データに係る適用開始データの適用開始IDを備えた適用開始取消データを上記適用開始取消テーブルに追加すると共に、当該時限データに係る適用終了データの適用終了IDを備えた適用終了取消データを上記適用終了取消テーブルに追加することを依頼する処理を実行し、
    (4)適用対象、値、有効期間を特定した時限データの修正リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加すると共に、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルにを追加すると共に、この基本データの基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加し、同基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼する処理を実行することを特徴とする時限データの履歴管理システム。
  9.  上記DBサーバは、上記適用開始ID及び適用終了IDを関連付けて登録する適用期間テーブルを備えており、
     上記履歴管理部は、
    (1)適用対象、値、有効期間の始期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルに追加すると共に、この基本データの基本ID及び有効期間の始期を備えた適用開始データを上記適用開始テーブルに追加することを依頼する処理を実行し、
    (2)上記基本ID、適用開始ID及び有効期間の終期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、当該基本ID及び上記終期を備えた適用終了データを上記適用終了テーブルに追加すると共に、上記適用開始ID及び上記適用終了データの適用終了IDを上記適用期間テーブルに追加することを依頼する処理を実行し、
    (3)適用対象、値、有効期間の終期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、上記基本テーブルに当該適用対象及び値を備えた基本データが存在するか否かを照会し、当該基本データが存在する場合には、その基本ID及び有効期間の終期を備えた適用終了データを上記適用終了テーブルに追加することを依頼し、上記基本データが存在しない場合には、上記適用対象及び値を備えた基本データを上記基本テーブルに追加すると共に、この基本データの基本ID及び有効期間の終期を備えた適用開終了データを上記適用終了テーブルに追加することを依頼する処理を実行し、
    (4)上記基本ID、適用終了ID及び有効期間の始期を特定した時限データの追加リクエストが入力された場合に、上記DBサーバに対し、当該基本ID及び上記始期を備えた適用開始データを上記適用開始テーブルに追加すると共に、上記適用終了ID及び上記適用開始データの適用開始IDを上記適用期間テーブルに追加することを依頼する処理を実行することを特徴とする請求項8に記載の時限データの履歴管理システム。
  10.  上記履歴管理部は、適用対象、値、有効期間の少なくとも一つを検索条件として特定した時限データの参照リクエストが入力された場合において、
     DBサーバから送信された適用開始データ中で、そのIDが何れかの適用開始取消データに含まれているものを除外すると共に、そのIDが何れかの適用開始取消データに含まれていないものを有効適用開始データと認定する処理と、
     DBサーバから送信された適用終了データ中で、そのIDが何れかの適用終了取消データに含まれているものを除外すると共に、そのIDが何れかの適用終了取消データに含まれていないものを有効適用終了データと認定する処理と、
     上記有効適用開始データの中で、そのIDがDBサーバから送信された何れかの適用期間データに含まれているものを除外すると共に、そのIDが何れかの適用期間データに含まれていないものについて有効適用開始(終了無し)データと認定する処理と、
     上記有効適用開始データの中で、そのIDがDBサーバから送信された何れかの適用期間データに含まれているものについて、対応の適用終了IDを追加した有効適用開始+終了IDデータを生成する処理と、
     上記有効適用終了データの中で、そのIDが上記有効適用開始+終了IDデータに含まれているものについて、当該有効適用終了データの終期を追加した有効適用開始・終了データを生成する処理と、
     上記有効適用終了データの中で、そのIDが上記有効適用開始+終了IDデータに含まれているものを除外すると共に、そのIDが上記有効適用開始+終了IDデータに含まれていないものについて有効適用終了(開始無し)データと認定する処理と、
     を実行することを特徴とする請求項9に記載の時限データの履歴管理システム。
  11.  同一の適用対象について相互に重複する有効期間を備えた複数の時限データが存在する場合に、上記履歴管理部は、上記適用開始データ及び適用終了データに設定された登録日時が最も新しい時限データを重複している期間について有効と認定することを特徴とする請求項8~10の何れかに記載の時限データの履歴管理システム。
  12.  上記適用対象の種類に対応した具体的なテーブル名及び各テーブルが備える上記適用対象の種類に対応した具体的な項目名等のテーブル設定情報に基づいて、少なくとも具体的なテーブル名、具体的なデータ項目及び各データ項目のデータ型を定義したクラスをテーブル毎に生成し、所定の記憶手段に格納する型生成手段と、
     上記履歴管理部の処理ロジックを記述したプログラム部品を格納しておく記憶手段と、
     上記プログラム部品に上記の各クラスを引数として与えることにより、各テーブルの操作に特化した履歴管理部を生成する手段と、
     を備えたことを特徴とする請求項8~11の何れかに記載の時限データの履歴管理システム。
  13.  相互に値が異なる複数の同種データを、第1の結合対象データとして格納しておく第1の結合対象記憶手段と、
     相互に値が異なる複数の同種データを、上記第1の結合対象データとは種類を異にする第2の結合対象データとして格納しておく第2の結合対象記憶手段と、
     特定の第1の結合対象データのIDと、当該第1のデータの結合対象となるべき特定の第2の結合対象データのIDを記録した関連データを格納しておく関連記憶手段と、
     上記第1の結合対象記憶手段から取り出された特定の第1の結合対象データのIDを備えた関連データを、上記関連記憶手段から取り出すと共に、当該関連データに記録された第2の結合対象データのIDを、上記第1の結合対象データに追加した中間データを生成する第1の結合処理を実行する手段と、
     上記第2の結合対象記憶手段から取り出された第2の結合対象データの中で、当該中間データに追加されたIDが記録されたものを特定すると共に、当該中間データに第2の結合対象データの少なくとも一部のデータ項目の値を追加した結合データを生成する第2の結合処理を実行する手段と、
     を備えたことを特徴とするデータ処理システム。
  14.  特定の第1の結合対象データのIDを備えた関連データが存在しない場合に、当該第1の結合対象データを対応する第2の結合対象データが存在しないデータとして分離する第1の除外処理を実行する手段と、
     特定の第2の結合対象データのIDを備えた中間データが存在しない場合に、当該第2の結合対象データを対応する第1の結合対象データが存在しないデータとして分離する第2の除外処理を実行する手段と、
     を備えたことを特徴とする請求項13に記載のデータ処理システム。
PCT/JP2012/056407 2012-03-13 2012-03-13 データ利用システム、時限データの履歴管理システム及びデータ処理システム WO2013136442A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2014504532A JP5878232B2 (ja) 2012-03-13 2012-03-13 データ処理システム
PCT/JP2012/056407 WO2013136442A1 (ja) 2012-03-13 2012-03-13 データ利用システム、時限データの履歴管理システム及びデータ処理システム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/056407 WO2013136442A1 (ja) 2012-03-13 2012-03-13 データ利用システム、時限データの履歴管理システム及びデータ処理システム

Publications (1)

Publication Number Publication Date
WO2013136442A1 true WO2013136442A1 (ja) 2013-09-19

Family

ID=49160411

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/056407 WO2013136442A1 (ja) 2012-03-13 2012-03-13 データ利用システム、時限データの履歴管理システム及びデータ処理システム

Country Status (2)

Country Link
JP (1) JP5878232B2 (ja)
WO (1) WO2013136442A1 (ja)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015108903A (ja) * 2013-12-03 2015-06-11 日本電信電話株式会社 分散情報連携システムとそのデータ操作方法及びプログラム
CN104765800A (zh) * 2015-03-30 2015-07-08 浪潮集团有限公司 一种基于大数据的高效搜索方法
JP2015165357A (ja) * 2014-03-03 2015-09-17 株式会社野村総合研究所 データ管理システム
RU2686028C2 (ru) * 2015-03-30 2019-04-23 Номура Рисерч Инститьют, Лтд. Система обработки данных
JP2022097397A (ja) * 2020-12-18 2022-06-30 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド 質問回答システムの更新処理方法及び装置
KR20230017548A (ko) * 2021-07-28 2023-02-06 비전과가치 주식회사 쇼핑몰 데이터 가공 시스템 및 그의 데이터 가공 방법

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844604A (ja) * 1994-07-26 1996-02-16 Mitsubishi Electric Corp データベース比較方法
JPH1097544A (ja) * 1996-09-20 1998-04-14 Hitachi Ltd データベース処理システム
JP2001159993A (ja) * 1999-12-03 2001-06-12 Hitachi Ltd 任意時刻の状態を参照できるデータの記憶方法及び装置
JP2004062566A (ja) * 2002-07-30 2004-02-26 Jmnet Inc データベースシステム及びそれを構成するマスターノード装置及びプログラム
JP2007108912A (ja) * 2005-10-12 2007-04-26 Matsushita Electric Ind Co Ltd データ管理装置、データ管理方法およびデータ管理プログラム
JP2007310845A (ja) * 2006-05-22 2007-11-29 Nomura Research Institute Ltd データ処理システム
JP2009282719A (ja) * 2008-05-21 2009-12-03 Ntt Docomo Inc データベースシステム及びデータベースサーバ装置
JP2012048332A (ja) * 2010-08-25 2012-03-08 Hitachi Ltd データベース処理方法、データベース処理システム及びデータベースサーバ
JP2012059215A (ja) * 2010-09-13 2012-03-22 Nomura Research Institute Ltd データ検索システム及びプログラム

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000267908A (ja) * 1999-03-18 2000-09-29 Nec Corp データベース管理システム及びその管理方法並びに管理プログラムを格納した記憶媒体
JP4373166B2 (ja) * 2003-09-18 2009-11-25 大日本印刷株式会社 商品情報データベース
JP4611830B2 (ja) * 2005-07-22 2011-01-12 優 喜連川 データベース管理システム及び方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844604A (ja) * 1994-07-26 1996-02-16 Mitsubishi Electric Corp データベース比較方法
JPH1097544A (ja) * 1996-09-20 1998-04-14 Hitachi Ltd データベース処理システム
JP2001159993A (ja) * 1999-12-03 2001-06-12 Hitachi Ltd 任意時刻の状態を参照できるデータの記憶方法及び装置
JP2004062566A (ja) * 2002-07-30 2004-02-26 Jmnet Inc データベースシステム及びそれを構成するマスターノード装置及びプログラム
JP2007108912A (ja) * 2005-10-12 2007-04-26 Matsushita Electric Ind Co Ltd データ管理装置、データ管理方法およびデータ管理プログラム
JP2007310845A (ja) * 2006-05-22 2007-11-29 Nomura Research Institute Ltd データ処理システム
JP2009282719A (ja) * 2008-05-21 2009-12-03 Ntt Docomo Inc データベースシステム及びデータベースサーバ装置
JP2012048332A (ja) * 2010-08-25 2012-03-08 Hitachi Ltd データベース処理方法、データベース処理システム及びデータベースサーバ
JP2012059215A (ja) * 2010-09-13 2012-03-22 Nomura Research Institute Ltd データ検索システム及びプログラム

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015108903A (ja) * 2013-12-03 2015-06-11 日本電信電話株式会社 分散情報連携システムとそのデータ操作方法及びプログラム
JP2015165357A (ja) * 2014-03-03 2015-09-17 株式会社野村総合研究所 データ管理システム
CN104765800A (zh) * 2015-03-30 2015-07-08 浪潮集团有限公司 一种基于大数据的高效搜索方法
RU2686028C2 (ru) * 2015-03-30 2019-04-23 Номура Рисерч Инститьют, Лтд. Система обработки данных
JP2022097397A (ja) * 2020-12-18 2022-06-30 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド 質問回答システムの更新処理方法及び装置
JP7293544B2 (ja) 2020-12-18 2023-06-20 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド 質問回答システムの更新処理方法及び装置
KR20230017548A (ko) * 2021-07-28 2023-02-06 비전과가치 주식회사 쇼핑몰 데이터 가공 시스템 및 그의 데이터 가공 방법
KR102624467B1 (ko) * 2021-07-28 2024-01-15 비전과가치 주식회사 쇼핑몰 데이터 가공 시스템 및 그의 데이터 가공 방법

Also Published As

Publication number Publication date
JP5878232B2 (ja) 2016-03-08
JPWO2013136442A1 (ja) 2015-08-03

Similar Documents

Publication Publication Date Title
Bacon et al. Spanner: Becoming a SQL system
US9576028B2 (en) Managing data queries
He et al. Comet: batched stream processing for data intensive distributed computing
Silva et al. SQL: From traditional databases to big data
WO2013136442A1 (ja) データ利用システム、時限データの履歴管理システム及びデータ処理システム
JP5727258B2 (ja) 分散型データベースシステム
US20120059792A1 (en) Techniques for the Logical Replication of High-Level Procedures
JP5608633B2 (ja) データ利用システム
JP5238915B1 (ja) 分散型データベースシステム
CN110019251A (zh) 一种数据处理系统、方法及设备
US20120291014A1 (en) System and method for testing the development and updates in a test system using production/live data
JP2015514258A (ja) データ選択および識別
CN112579586A (zh) 数据处理方法、装置、设备及存储介质
Challawala et al. MySQL 8 for Big Data: Effective Data Processing with MySQL 8, Hadoop, NoSQL APIs, and Other Big Data Tools
Bidoit et al. Processing XML queries and updates on map/reduce clusters
JP5474743B2 (ja) プログラム開発支援システム
Vanier et al. Advanced MySQL 8: Discover the full potential of MySQL and ensure high performance of your database
Schönig Mastering PostgreSQL 12: Advanced techniques to build and administer scalable and reliable PostgreSQL database applications
JP5681781B2 (ja) データ利用システム
JP5604403B2 (ja) データ利用システム
Li et al. Efficient time-interval data extraction in MVCC-based RDBMS
US10572483B2 (en) Aggregate projection
Schönig Mastering PostgreSQL 11: Expert techniques to build scalable, reliable, and fault-tolerant database applications
Schonig Mastering PostgreSQL 9.6
Bruni et al. Optimizing DB2 queries with IBM DB2 analytics accelerator for z/OS

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12871232

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2014504532

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12871232

Country of ref document: EP

Kind code of ref document: A1