WO2015025401A1 - データベース管理システム及びデータベース管理方法 - Google Patents

データベース管理システム及びデータベース管理方法 Download PDF

Info

Publication number
WO2015025401A1
WO2015025401A1 PCT/JP2013/072404 JP2013072404W WO2015025401A1 WO 2015025401 A1 WO2015025401 A1 WO 2015025401A1 JP 2013072404 W JP2013072404 W JP 2013072404W WO 2015025401 A1 WO2015025401 A1 WO 2015025401A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
data table
comparison
determination process
database
Prior art date
Application number
PCT/JP2013/072404
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 PCT/JP2013/072404 priority Critical patent/WO2015025401A1/ja
Priority to JP2015532652A priority patent/JP6111337B2/ja
Priority to US14/771,369 priority patent/US9971793B2/en
Publication of WO2015025401A1 publication Critical patent/WO2015025401A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Definitions

  • the present invention generally relates to database management technology.
  • Patent Document 1 each time a new data table is input, an area different from the existing area is secured as the storage destination of the new data table, and the new data table is stored in the secured area.
  • Patent Documents 1 and 2 each time a new data table is input, a database area different from the existing database area storing the stored data table is secured, and the new data table is stored in the secured database area. After that, a process is performed to determine whether the target column of the new data table stored in the database area satisfies the unique constraint condition by comparing the data of the new data table with all stored data. Thus, it is conceivable to guarantee the uniqueness of the target column of the new data table. However, such processing has a high processing cost.
  • an object of the present invention is to reduce the processing cost of guaranteeing the uniqueness of the target column of the new data table in an environment where the new data table is stored in a database area different from the existing database area. There is to do.
  • the database management system accepts input of a new data table for the database, and each comparison source value registered in the target column of the new data table is stored in the data table already stored in the database. Performs a unique constraint determination process that determines whether each comparison value that is a value registered in the target column is different, and stores the result in the database if the determination result in the unique constraint determination process is true.
  • the new data table is stored in a second database area that is different from the first database area in which the already-completed data table is stored.
  • the present invention it is possible to reduce the processing cost of guaranteeing the uniqueness of a target column of a new data table in an environment in which the new data table is stored in a database area different from the existing database area. Can do.
  • FIG. 14 is a schematic diagram for explaining the outline of the present embodiment.
  • the server 10 is an example of a computer and includes a processor 21.
  • An external storage device 12 is connected to the server 10.
  • the external storage apparatus 12 stores a database 1000, and the database 1000 has a plurality of database areas 101.
  • the database area 101 is composed of one or more segments having a predetermined size.
  • the processor 21 secures the database area 101 based on the size of the input data table 210 (that is, determines the number of segments to be allocated). Then, the processor 21 stores the input data table 210 in the secured database area 101. This process is executed every time the data table 210 is input.
  • the server 10 may have an input device (for example, I / F (communication interface device)) (not shown), and the data table 210 may be input from the input device.
  • the data table 210 may be input from a client (not shown) or may be input (read out) from the external storage apparatus 12.
  • a unique constraint condition is set for the target column 111 among a plurality of columns included in the data table 210.
  • the “target column” is a target attribute column among one or more attributes (items) included in the data table 210.
  • the plurality of target columns respectively corresponding to the plurality of data tables 210 have the same target attribute.
  • the value registered in the target column is referred to as “target column value”.
  • the data table 210 has a plurality of records, a plurality of target column values are usually registered in the target column.
  • the “unique constraint condition” is a constraint condition that the target column values do not overlap each other.
  • the data tables 210-1 and 110-2 are already stored in the database areas 101-1 and 101-2, respectively.
  • the data table 210-3 is newly input to the server 10.
  • the data tables 210-1 and 210-2 constitute one table.
  • the processor 21 sets the target column value in the target column 111-3 of the input data table 210-3 (hereinafter referred to as “comparison source value”) to each target column of the stored data tables 210-1 and 210-2. Whether or not the unique constraint condition is satisfied for the value (that is, the comparison source value is the same as any target column value in the target columns 111-1 and 111-2 of the stored data tables 210-1 and 210-2) Whether they are different). When it is determined that the data table 210-3 satisfies the unique constraint condition, the data table 210-3 is added as a component of the table.
  • the determination of whether or not the data table 210-3 satisfies the unique constraint condition includes, for example, the following first stage determination process and second stage determination process.
  • the processor 21 determines that for each comparison source value, the same column value as the comparison source value corresponds to the column value range 120-1 corresponding to each of the stored data tables 210-1 and 210-2. And 120-2.
  • the column value range 120 is a range between the minimum value and the maximum value among the target column values (hereinafter referred to as “comparison destination values”) registered in the corresponding stored data table 210.
  • the column value range 120 includes a minimum value of comparison destination values and a maximum value of comparison destination values.
  • the processor 21 determines that comparison source values not included in any column value range 120 satisfy the unique constraint condition.
  • the comparison source value “1” is included in both the column value range 120-1 (“8” to “15”) and the column value range 120-2 (“5” to “10”). Since it does not, it satisfies the unique constraint condition.
  • the comparison source value “6” is included in the data column value range 120-2 (“5” to “10”), the determination process of the next second stage is performed (S20-1).
  • the comparison source value “14” is included in the column value range (“8” to “15”) 120-1, the next second stage determination process is performed (S20-2).
  • the processor 21 determines that the comparison source value determined to be included in the column value range in the first stage determination process (hereinafter referred to as “in-range comparison source value”) It is determined whether or not it matches any of the comparison destination values of the data table to be configured.
  • the in-range comparison source value that does not match any comparison destination value is determined to satisfy the unique constraint condition.
  • An in-range comparison source value that matches any of the comparison destination values is determined not to satisfy the unique constraint condition.
  • the in-range comparison source value “14” does not match any of the comparison destination values “8”, “12”, and “15” of the stored data table 210-1, and therefore satisfies the unique constraint condition.
  • the in-range comparison source value “6” does not match any of the comparison destination values “5”, “7”, and “10” of the data table 210-2 stored in the database area 101-1. Satisfy the constraints.
  • the processor 21 determines that the unique constraint condition is satisfied for all the comparison source values of the input data table 210-3, the processor 21 stores the input data table 210-3 in the database area for the data table 210-3 ( Any stored data table is stored in the database area 101-3. In FIG. 14, since all the comparison source values “1”, “6”, and “14” satisfy the unique constraint condition, the processor 21 stores the data table 210-3 in the database area 101-3. (S40). As a result, the data table 210-3 is newly inserted into the table composed of the data tables 210-1 and 210-2.
  • the processor 21 determines that any one comparison source value does not satisfy the unique constraint condition (for example, when at least one in-range comparison source value does not satisfy the unique constraint condition), the processor 21 is input.
  • the data table 210-3 is not stored in the database area.
  • the uniqueness of the target column 111 can be guaranteed in the data tables stored in the plurality of storage areas 101. Further, the processor 21 roughly finds a comparison source value that satisfies the unique constraint condition in the determination process of the first step, and only the comparison source value that is not determined to be the comparison source value that satisfies the unique constraint condition By making a detailed determination in the second stage determination process after the determination process, the uniqueness of the target column 111-3 can be determined in a short time.
  • processor 21 may determine whether or not the in-range comparison source value and the comparison target value match in the second-stage determination process as follows.
  • the processor 21 stores the upper N bits of binary numbers (N is a natural number) in the comparison table 130 for each of the comparison source value and the comparison target value.
  • the processor 21 determines whether or not the upper bit of the in-range comparison source value matches any of the upper N bits of the comparison target value.
  • An in-range comparison source value that does not match the upper N bits of any comparison destination value is determined to satisfy the unique constraint condition.
  • the processor 21 determines whether the in-range comparison source value matches the comparison destination value of the upper 3 bits. Determine whether or not. If none of these comparison destination values match, the in-range comparison source value is determined by the processor 21 if the unique constraint condition is satisfied. If the in-range comparison source value matches any of the comparison destination values, it is determined that the in-range comparison source value does not satisfy the unique constraint requirement. If there is an in-range comparison source value that does not satisfy the unique constraint condition, the processor 21 may not store the input data table 210-3 in the storage area 101, as in the second-stage determination process.
  • the processor 21 prepares a comparison table 130-3 storing the upper 3 bits “000”, “011”, and “111” of the comparison source values “1”, “6”, and “14”, respectively. . Since the comparison source value “1” was not included in any of the column value ranges 120-1 and 120-2 in the determination process at the first stage, the determination using the comparison value is not performed. Since the comparison source value “6” is included in the column value range 120-2 in the determination process at the first stage, the processor 21 matches the upper 3 bits “011” of the comparison source value “6” within the range. It is determined whether the upper 3 bits exist in the comparison table 130-2 corresponding to the column value range 120-2.
  • the processor 21 obtains the in-range comparison source value “6” and the comparison destination value whose upper 3 bits are “011”. Compare.
  • the comparison destination value whose upper 3 bits are “011” is only “7” in the data table 210-2, and the comparison destination value matching the in-range comparison source value “6” is stored in the data table 210-2. You can see that it doesn't exist. Therefore, it is determined that the in-range comparison source value “6” satisfies the unique constraint condition (S30-1).
  • the other in-range comparison source value “14” is processed in the same way, and it can be seen that the in-range comparison source value “14” does not match any of the comparison destination values in the data table 210-1. Therefore, it is determined that the in-range comparison source value “14” also satisfies the unique constraint condition (S30-2).
  • a modified example of the determination process at the second stage may be a method other than comparing the above-described upper N bits.
  • a modification of the determination process at the second stage may compare the hash values of the comparison source value and the comparison destination value. That is, the upper N bits or the hash value can be referred to as an information amount reduction value obtained by reducing the information amount of the attribute value of the target column, and a modified example of the determination process at the second stage is an information amount reduction value of the comparison source value. In other words, it can also be referred to as processing for comparing the information amount reduction value of the comparison destination value.
  • the plurality of data tables stored in the plurality of storage areas 101 are each an element of a database, for example, an element of a kind of table of a database schema.
  • the database may be stored in a storage device (for example, a memory or an auxiliary storage device) in the server 10 instead of the external storage apparatus 12.
  • FIG. 1 is a block diagram showing an example of a computer system 1 according to this embodiment.
  • the computer system 1 includes a server 10, an external storage device 12, and a client 11.
  • the server 10, the external storage device 12, and the client 11 can transmit and receive data bidirectionally through the communication network 13.
  • the client 11 serves as an input device that inputs information to the server 10 and a display device that displays information output from the server 10, but the server 10 has an input / output device, and the server 10 Information may be input or information may be output (displayed) via the input / output device.
  • the server 10 includes the I / F (for example, NIC (Network Interface Card)) 1401, the memory 20, and the processor 21 connected thereto.
  • I / F for example, NIC (Network Interface Card)
  • the memory 20 for example, a hard disk drive, a solid state drive, or the like.
  • Other types of storage devices may be employed instead of or in addition to the memory 20.
  • the memory 20 stores the database management system 30.
  • the database management system 30 may be loaded from an auxiliary storage device (not shown) or may be loaded from a remote device such as the external storage device 12.
  • the processor 21 executes the database management system 30 stored in the memory 20.
  • the processing may be described using the database management system 30 (or an element in the database management system 30) as the subject, but the subject of the processing performed by the database management system 30 is the processor 21 or the server 10. You can also.
  • the database management system 30 controls the database 1000 stored in the external storage device 12.
  • the client 11 can access the database 1000 through the database management system 30.
  • the external storage apparatus 12 includes an I / F (for example, NIC) 1501, a memory 1503, a storage device group 1504, and a processor 1502 connected thereto. Communication with the server 10 and the client 11 is possible through the I / F 1501.
  • the storage device group 1504 is composed of one or a plurality of storage devices, and stores the database 1000.
  • the memory 1503 stores an insertion data table 210, a management point management table 500, a segment information management table 600, a table information management table 700, a first intermediate table 800, and a second intermediate table 900.
  • the database 1000 includes one or more tables 3220 and may further include one or more indexes 3230.
  • the table 3220 is a set of one or more records, and the record is composed of one or more columns.
  • the index 3230 is a data structure created for one or more columns or the like of the table 3220, and is for speeding up access to the table 3220 by a selection condition including the column or the like targeted by the index 3230. is there.
  • the index 3230 is a data structure that holds information for specifying a record including the value in the table for each value of the target column.
  • a B-tree or the like is used as information for specifying a record, a physical address, a logical row ID, or the like may be used.
  • the database 1000 may include database statistics.
  • the database statistics include, for example, information included in the database 1000, such as information indicating the number of entries in the index 3230, information indicating the number of records in the table 3220, maximum value, average value, minimum value, and value distribution for each column. May contain information about.
  • the insertion data table 210 has data to be inserted into the table 3220.
  • the management point management table 500 manages operations for the database 1000.
  • the segment information management table 600 and the table information management table 700 are used when the database 1000 is operated.
  • the database related information is information including an insertion data table 210, a management point management table 500, a segment information management table 600, and a table information management table 700.
  • a segment is a unit of data storage area in the database 1000.
  • the database 1000 has a plurality of segments, and stores a data table in each segment.
  • Each segment is associated with an ID assigned by the database management system 30.
  • the segment information management table 600 manages information related to segments.
  • the database management system 30 manages the data storage location using the table information management table 700 and the segment information management table 600.
  • the insertion data table 210 is stored in the external storage apparatus 12 from the user (for example, administrator) of the database 1000 through the client 11, for example.
  • the first intermediate table 800 and the second intermediate table 900 are used in a unique constraint determination process described later.
  • the first intermediate data table 800 stores the result of the first stage determination process in the unique constraint determination process.
  • the second intermediate data table 900 stores the result of the second stage determination process executed after the first stage determination process.
  • the management point management table 500 includes a segment range in which the insertion data table 210 is inserted in a data table insertion process described later, a table to be inserted into the insertion data table 210, and a start time and an end of the data table insertion process. Manage time and information.
  • the management point management table 500 is controlled by the management table processing unit 34 of the database management system 30. When the data table insertion process is executed once, one record (management point record) is added to the management point management table 500.
  • the segment information management table 600 manages the state of segments in the database 1000.
  • the segment information management table 600 is managed by the database management system 30.
  • the table information management table 700 manages the state of the table 3220 of the database 1000.
  • the table information management table 700 is managed by the database management system 30.
  • the database management system 30 When the database management system 30 receives an insertion processing request or a data table deletion processing request from the client 11, the database management system 30 executes processing corresponding to the request.
  • the database management system 30 When the database management system 30 receives an access request from the client 11, the database management system 30 accesses the database 1000 of the external storage apparatus 12.
  • the database management system 30 includes a data operation request receiving unit 31, an information management table management unit 32, a table data insertion unit 33, and a management table processing unit 34.
  • the data operation request reception unit 31 receives an insertion processing request or a data table deletion processing request from the client 11.
  • the information management table management unit 32 manages data in each information management table of the external storage apparatus 12.
  • the table data insertion unit 33 performs data insertion processing on the table 3220 during the data table insertion processing.
  • the management table processing unit 34 manages processing for the management point management table 500.
  • the management table processing unit 34 includes a management point record search process 35, a management point record generation process 36, a management point record deletion process 37, and a management point record update process 38, as will be described later.
  • the memory 20 stores data used in data table insertion processing or data table deletion processing.
  • the memory 20 includes, for example, the total number of segments 40, the segment range 50, the table name 60, the current time stamp 70, the holding segment 80, the target column name list 90, and the column value range list as such data. 300 and the comparison value list 400 are stored.
  • the total number of segments 40 is the number of segments required for storing all data (insertion data table) during the data table insertion process.
  • the segment range 50 includes a segment range in which data is stored in the data table insertion process or a segment range in which data to be deleted is stored in the data table deletion process.
  • the segment range 50 has a start segment ID 51 indicating the ID of the first segment and an end segment ID 52 indicating the ID of the last segment.
  • the table name 60 has information for specifying the table 3220 that is the target of data insertion during the data table insertion process.
  • the current time stamp 70 has information on the current date and time.
  • the holding segment 80 holds the segment ID that last stored the data.
  • the target column name list 90 has a list of names of columns (target columns) that are targets of the unique constraint conditions in Table 3220.
  • the value in the target column registered in the target column name list 909 is the target column value referred to in this embodiment.
  • the column value range list 300 holds column value ranges for data tables already stored in each segment.
  • the column value range is a range between the minimum value and the maximum value of the target column value of the data table.
  • the comparison value list 400 holds a comparison value (information amount reduction value) calculated from the target column value for each stored data table (or each segment in which the data table is stored).
  • the comparison target LD list 410 and the index confirmation threshold 420 are used in the unique constraint determination process described later. Stores the result information of the second stage determination process executed after the first stage determination process.
  • the index confirmation threshold 420 is used for selecting a processing method for records stored in the second intermediate table in the processing after the determination processing in the second stage.
  • “LD” is an abbreviation for load data.
  • FIG. 2 is a flowchart showing an outline of the data table insertion process when there is no data list already stored in the database 1000.
  • the target attribute (target column) is “ORDER_ID”.
  • the data operation request accepting unit 31 accepts an insertion processing request 1100 from the client 11.
  • This insertion processing request 1100 includes information (for example, a file name) that identifies the insertion data table 210 stored in the external storage apparatus 12.
  • the data operation request accepting unit 31 activates the table data inserting unit 33.
  • the table data insertion unit 33 acquires the current date and time from the current time stamp 70 and sets it as the start date and time (S901).
  • the table data insertion unit 33 reads the insertion data table 210, calculates the number of segments necessary for storing the data to be inserted (S902), and stores the calculated number of segments in the total number of segments 3140.
  • the table data insertion unit 33 secures an insertion segment in the database 1000 based on the total number of segments 40, and stores a start segment ID 31 and an end segment ID 32 for data insertion in the segment range 50 on the memory 20 (S903). ).
  • the management table processing unit 34 secures storage areas for the column value range list 300 and the comparison value list 400 by the management point record generation processing 36 (S904).
  • the table data insertion unit 33 stores the target column value range in the insertion data table 210 specified by the insertion processing request 1100 in the column value range list 300 (S905).
  • the table data insertion unit 33 stores the comparison value (information amount reduction value) of the target column value in the insertion data table 210 designated by the insertion processing request 1100 in the comparison value list 400 (S906).
  • the management table processing unit 34 generates a new record (management point record) in the management point management table 500 by the management point record generation processing 36. Then, the management table processing unit 34 stores the start date and time of the record (management point record) generated in S904 in S_TIME 511 (see FIG. 4) of the management point management table 500 by the management point record generation processing 36, and batch data insertion
  • the start segment ID 51 is stored in S_SEG 513
  • the end segment ID 52 is stored in F_SEG 514
  • the name of the table 3220 into which the data batch insertion has been performed is stored in TABLE 515 (S907).
  • the table data insertion unit 33 adds the insertion data table 210 specified by the insertion processing request 1100 from the start segment ID 51 secured in the table 3220 of the database 1000 to the end segment ID 52 (S908).
  • the table data insertion unit 33 acquires the current date and time from the current time stamp 70 and sets it as the end date and time (S909).
  • the management table processing unit 34 stores the end date and time of the record (management point record) generated in S905 in the F_TIME 512 by the management point record update unit 38, and updates a new record in the management point management table 500. (S910).
  • the start date / time (S_TIME 511) and end date / time (F_TIME 512) of the data table insertion process the start segment (S_SEG 513) and end segment (F_SEG 514) of the data table for insertion, and the table name A new management point record storing (TABLE 515) is added to the management point management table 500.
  • the management point management table 500 includes a table name (TABLE 515), a start date / time (S_TIME 511) and an end date / time (F_TIME 512) of the data table insertion process, and a start segment (S_SEG 513) and end indicating the insertion position of the insertion data table.
  • the segment (F_SEG 514) is managed in a uniquely associated manner. Thereby, when the user deletes the data table at a later date, the storage position of the data table can be easily known by designating the start date and time and the end date and time of the data table insertion process as the search conditions.
  • FIG. 3 is a flowchart showing an outline of the data table insertion process when a data list already stored in the database 1000 exists.
  • the data operation request accepting unit 31 accepts an insertion processing request 1100 from the client 11.
  • This insertion processing request 1100 includes information (for example, a file name) that identifies the insertion data table 210 stored in the external storage apparatus 12.
  • the data operation request receiving unit 31 activates the table data inserting unit 33.
  • the table data insertion unit 33 acquires the current date and time from the current time stamp 70 and sets it as the start date and time (S1201).
  • the table data insertion unit 33 reads the insertion data table 210, calculates the number of segments necessary for storing the data to be inserted (S1202), and stores the calculated number of segments in the total number of segments 40.
  • the table data insertion unit 33 secures a segment having a value of the total number of segments 40 in the database 1000 and stores the data insertion start segment ID 51 and end segment ID 52 in the segment range 50 on the memory 20 (S1203). .
  • the management table processing unit 34 secures storage areas for the column value range list 300 and the comparison value list 400 by the management point record generation processing 36 (S1204).
  • the table data insertion unit 33 stores the target column value range of the data in the insertion data table 210 designated by the insertion processing request 1100 in the column value range list 300 (S1205).
  • the table data insertion unit 33 stores the comparison value (information amount reduction value) of the target column value of the data in the insertion data table 210 specified by the insertion processing request 1100 in the comparison value list 400 (S1206). ).
  • the table data insertion unit 33 compares the target column value in the insertion data table 210 specified by the insertion processing request 1100 with the column value range registered in the column value range list 300, and the target column value Is included in the column value range.
  • the table data insertion unit 33 registers the target column value and the LD_ID to which the target column value range including the target column value belongs in the first intermediate table 800. (S1207).
  • LD_ID is an ID (identifier) of the insertion data table, and LD is an abbreviation for load data.
  • the table data insertion unit 33 acquires the target column value and the LD_ID corresponding to the target column value from the first intermediate table 800. Then, the table data insertion unit 33 compares the comparison value corresponding to the target column value with a plurality of comparison values included in the comparison value list 400 corresponding to the LD_ID. Then, the table data insertion unit 33 registers the target column value matched in the comparison and the LD_ID to which the comparison value list 400 matched with the target column value belongs in the second intermediate table 900 (S1207).
  • the table data insertion unit 33 acquires the target column value and the LD_ID corresponding to the target column value from the second intermediate table 900. Then, the table data insertion unit 33 determines whether the target column value matches any of the target column values belonging to the LD_ID. If it matches any of them, the table data insertion unit 33 stops the data table insertion process and notifies the processing request issuer program that the unique constraint condition has not been satisfied. If they do not match, the table data insertion unit 33 executes the following process.
  • the management table processing unit 34 generates a new record (management point record) in the management point management table 500 by the management point record generation processing 36. Then, the management table processing unit 34 stores the start date and time of the record (management point record) generated in S1204 in S_TIME 511 (see FIG. 4) of the management point management table 500 by the management point record generation processing 36, and inserts the data.
  • the start segment ID 51 and the end segment ID 52 for storing the table 210 are stored in S_SEG 513 and F_SEG 514, respectively, and the name of the table 3220 in which the insertion data table is inserted is stored in TABLE 515 (S1208).
  • the table data insertion unit 33 stores the insertion data table 210 specified by the insertion processing request 1100 from the start segment ID 51 to the end segment ID 52 secured in the table 3220 of the database 1000 (S1209).
  • the table data insertion unit 33 acquires the current date and time from the current time stamp 70 and sets it as the end date and time (S1210).
  • management table processing unit 34 uses the management point record update unit 38 to store the end date and time of the record (management point record) generated in S1205 in the F_TIME 512, and updates a new record in the management point management table 500. (S1211).
  • the start date / time (S_TIME 511) and end date / time (F_TIME 512) of the data table insertion process the start segment (S_SEG 513) and end segment (F_SEG 514) of the data table for insertion, and the table name A new management point record storing (TABLE 515) is added to the management point management table 510.
  • the management point management table 500 includes a table name (TABLE 515), a start date / time (S_TIME 511) and an end date / time (F_TIME 512) of data table insertion processing, and a start segment (S_SEG 513) and an end segment ( F_SEG 514) is managed in association with each other.
  • a table name TABLE 515
  • S_TIME 511 start date / time
  • F_TIME 512 end date / time
  • F_SEG 513 and an end segment F_SEG 514
  • the storage of the insertion data table 210 is stopped.
  • the insertion data table 210 is stored when all target column values in the stored data table satisfy the unique constraint condition. Thereby, the uniqueness of the target column value of the insertion data table 210 can be guaranteed.
  • FIG. 4 is a diagram showing a configuration example of the management point management table 500.
  • the management table processing unit 34 generates and manages a management point management table 500 on the database 1000.
  • the management point management table 500 has a plurality of records. This record has S_TIME 511, F_TIME 512, S_SEG 513, F_SEG 514, TABLE 515, and LD_ID 516 as data attributes.
  • S_TIME 511 represents the date and time (start date and time) when the insertion process of the insertion data table 210 is started.
  • F_TIME 512 represents the date and time (end date and time) when the data table insertion processing is completed.
  • S_SEG 513 represents the ID (start segment ID) of the segment where insertion of the insertion data table 210 is started.
  • E_SEG 514 represents the ID (end segment ID) of the segment in which insertion of the insertion data table 210 is completed.
  • TABLE 515 represents the name or identifier (table name) of the table that is the target of the insertion processing of the insertion data table 210.
  • the LD_ID 516 represents an ID that can uniquely identify the insertion data table registered in the data table insertion process.
  • S_SEG 513 and F_SEG 514 may have a plurality of elements (repetition sequence) for one record.
  • the start date and time (S_TIME 511) of the data table insertion process is “2009/01/02 06: 06: 00: 16” and the end date and time (F_TIME 512) of the data table insertion process is “2009”. “January 02, 08:05:16”, the insertion data table start segment ID (S_SEG513) is “4501”, and the insertion data table end segment ID (F_SEG514) is “5000”.
  • the table name (TABLE 515) is “T1” and the LD_ID is “2”.
  • FIG. 5 is a diagram showing a configuration example of the segment information management table 600.
  • the segment information management table 600 is generated for each segment.
  • the segment information management table 600 has SEGMENT_ID 611, TABLE_NAME 612, NEXTSEG_ID 613, PREVSEG_ID 614, and REST 615 as data attributes.
  • SEGMENT_ID 611 represents a segment identifier SEGMENT_ID.
  • TABLE_NAME 612 represents the name of a table having a segment indicated by SEGMENT_ID 611.
  • NEXTSEG_ID 613 represents an identifier (SEGMENT_ID) of the segment next to the segment indicated by SEGMENT_ID 611.
  • PREVSEG_ID 614 represents the identifier (SEGMENT_ID) of the segment preceding the segment indicated by SEGMENT_ID 611.
  • REST 615 represents the amount of data (number of pages) that can be stored in the segment indicated by SEGMENT_ID 611.
  • FIG. 6 is a diagram illustrating a configuration example of the table information management table 700.
  • the table information management table 700 is generated for each table stored in the database 1000.
  • the table information management table 700 has TABLE_NAME 711, TABLE_ID 712, and SEGMENT 713 as data attributes.
  • TABLE_NAME 711 represents a table name which is a table name.
  • TABLE_ID 712 represents an identifier of the table.
  • SEGMENT 713 represents the range of segments used in the table. SEGMENT 713 may represent a range of multiple segments.
  • the table information management table 700 shown in FIG. 6 indicates that the table indicated by TABLE_ID 712 uses the range of segment ID “1 to 2000” and the range of segment ID “4501 to 5000”.
  • FIG. 7 is a diagram illustrating a configuration example of the column value range list 300.
  • the column value range list 300 has a column value range (minimum value and maximum value) in the data table corresponding to the LD_ID as a record for each LD_ID.
  • the column value range list 300 includes LD_ID 301, UC_ID 302, MIN 303, and MAX 304 as data attributes.
  • LD_ID 301 represents an ID for uniquely identifying the insertion data table 210 as described above.
  • the UC_ID 302 represents an ID for uniquely identifying the target column.
  • MIN 303 represents the minimum value among the target list values of the target list (UC_ID 302) in the insertion data table corresponding to the LD_ID 301.
  • MAX 304 represents the maximum value among the target list values of the target list (UC_ID 302).
  • FIG. 7 shows that in the insertion data table 210 of LD_ID 301 “0”, the minimum value is “1” and the maximum value is “10” among the plurality of target column values corresponding to UC_ID 302 “0”. Show.
  • FIG. 8 is a diagram showing a configuration example of the comparison value list 400.
  • the comparison value list 400 has LD_ID 401 and HASH_V 402 indicating a comparison value as data attributes for each LD_ID.
  • LD_ID 401 represents an ID for uniquely identifying the insertion data table 210 as described above.
  • HASH_V 402 represents a comparison value of each target column value included in the data table corresponding to the LD_ID 401.
  • the comparison value may be a hash bitmap value, for example, and may be a value of the upper 3 bits of a value (bit string) expressing the target column value in binary number.
  • FIG. 17 is a diagram illustrating a configuration example of the comparison target LD list 410.
  • the comparison target LD list 410 has, for each LD_ID, the number of column values stored in the second intermediate table in the data table corresponding to the LD_ID as a record.
  • the comparison target LD list 410 includes LD_ID 411, UC_ID 412, and comparison target number 413 as data attributes.
  • LD_ID 411 represents an ID for uniquely identifying the insertion data table 210 as described above.
  • UC_ID 412 represents an ID for uniquely identifying the target column.
  • the comparison target number 413 represents the number stored in the second intermediate table among the target list values of the target list (UC_ID 412) in the insertion data table corresponding to the LD_ID 411.
  • FIG. 17 shows that one column value is stored in the second intermediate table among a plurality of target column values corresponding to UC_ID 412 “0” in the insertion data table 210 of LD_ID 411 “0”. .
  • FIG. 8 shows that the comparison value of each target column value is “0”, “2”, “5” in the data table of LD_ID 401 “0”.
  • FIG. 9 is a flowchart showing an example of a data table insertion process when there is no data table already stored in the database 1000.
  • FIG. 9 is a detailed description of the processing of FIG.
  • This process is started, for example, when the data operation request receiving unit 31 receives the insertion target table name and the insertion target insertion data table 210 name from the client 11.
  • the table data insertion unit 33 acquires the current date and time from the current time stamp 70 (S101).
  • the table data insertion unit 33 refers to the number of records and the capacity of the specified insertion data table 210, and calculates the number of segments required to add the insertion data table 210 to the specified table 3220 (S102). ). Then, the table data insertion unit 33 stores the calculated number of segments in the total number of segments 40 on the memory 20.
  • the table data insertion unit 33 secures a segment for storing the insertion data table 210 in the area of the database 1000 of the external storage device 12 (S103).
  • the table data insertion unit 33 stores the first segment ID in the start segment ID 51 of the segment range 50 and the last segment ID in the end segment ID 52 for the secured segment.
  • the management table processing unit 34 secures storage areas for the column value range list 300 and the comparison value list 400 by the management point record generation processing 36 (S104).
  • the table data insertion unit 33 stores the minimum value and the maximum value of the target column value in the insertion data table 210 in the column value range list 300 (S105). Details of this processing will be described later.
  • the insertion data table 210 may be a data table read from the external storage apparatus 12 or a data table input from the client 11.
  • the table data insertion unit 33 stores the comparison value of the target column value in the insertion data table 210 in the comparison target column value list 400 (S106). Details of this processing will be described later.
  • the management table processing unit 34 generates a new management point record by the management point record generation processing 36 and adds it to the management point management table 500.
  • the management point record generation processing 36 stores the value of the current time stamp 70 acquired in S101 in S_TIME 511 and the value of the start segment ID 51 acquired in S103 in S_SEG 513 for the newly generated management point record. Then, the value of the end segment ID 52 acquired in S103 is stored in F_SEG 514 (S107).
  • the table data insertion unit 33 stores the insertion data table 210 in the segment secured in S103 (S108). Then, the table data insertion unit 33 acquires the current time stamp 70 (S109).
  • the management table processing unit 34 stores the acquired current time stamp value in F_TIME 512 by the management point record update processing 38, and updates the record in the management point management table 500 added in S107 (S110).
  • the server 10 collectively adds the insertion data table 210 prepared by the user to the table 3220 and manages the start date and time and end date and time of data batch insertion as information for identifying the record added by the user. Register in the point management table 500.
  • FIG. 10 is an example of a flowchart showing details of setting processing of the target column value range list 300.
  • FIG. 10 shows details of the processing in S105 of FIG.
  • the table data insertion unit 33 acquires the minimum value and the maximum value of the target column registered in the target column name list 90 from the insertion data table 210 (S201).
  • the table data insertion unit 33 registers the LD_ID corresponding to the insertion data table 210 and the acquired minimum and maximum values in the column value range list 300 (S202), and returns to S105.
  • FIG. 11 is an example of a flowchart showing details of the setting process of the comparison target column value list 400.
  • FIG. 11 shows details of the processing in S106 of FIG.
  • the table data insertion unit 33 selects one of the unselected records (initially the first record) from the insertion data table 210 (S301).
  • the table data insertion unit 33 creates a hash bitmap value from the target column value registered in the target column name list 90 for the record selected in S301, and registers the hash bitmap value in the comparison value list. (S302).
  • the table data insertion unit 33 determines whether or not an unselected record exists in the insertion data table 210 (S303).
  • the table data insertion unit 33 returns to S301, and executes S301 to S303 for the remaining unselected records.
  • the table data insertion unit 33 ends the process. This is because all the records are registered in the comparison target column value list.
  • the server 10 confirms that the record of the insertion data table 210 satisfies the unique constraint condition, and then inserts the insertion data table into the target table 3220 at a time.
  • the management point management table 500 the start date and time, the end date and time, and the storage position (segment ID) related to the insertion data table are registered.
  • FIG. 12 is a flowchart showing an example of data table insertion processing when a data table already stored in the database 1000 exists.
  • FIG. 12 is a detailed description of the processing of FIG.
  • This process is started, for example, when the data operation request receiving unit 31 receives the insertion target table name and the insertion target insertion data table 210 name from the client 11.
  • the table data insertion unit 33 performs a unique constraint determination process on the insertion data table 210 (S407). Although details of this processing will be described later, when the unique constraint condition is satisfied by this unique constraint determination processing, the table data insertion unit 33 proceeds to the next S408.
  • the server 10 adds the insertion data table 210 prepared by the administrator or the like in a batch in the table 3220, and starts and ends the data table insertion processing as information for identifying the record added by the administrator.
  • the date and time is registered in the management point management table 500.
  • the storage of the insertion data table 210 is stopped.
  • the insertion data table 210 is stored when the unique constraint condition is satisfied for the target column value in the stored data table. Thereby, the uniqueness of the target column value of the insertion data table 210 can be guaranteed.
  • FIG. 13 is a flowchart showing an example of the unique constraint determination process for the insertion data table.
  • FIG. 13 corresponds to the details of the processing of S407 in FIG.
  • the table data insertion unit 33 selects one of the unselected records (initially the first record) from the insertion data table 210 (S1301).
  • the table data insertion unit 33 determines whether the target column value (comparison source value) corresponding to the target column name list 90 is included in any column value range registered in the column value range list 300. (S1302). When the comparison source value is not included in any column value range (S1302: NO), the table data insertion unit 33 proceeds to S1305.
  • the table data insertion unit 33 sets the comparison source value and the LD_ID to which the column value range including the comparison source value belongs to the first intermediate value. Register in the data table 800 and go to S1305.
  • the table data insertion unit 33 determines whether or not an unselected record exists in the insertion data table 210 (S1305). If there is an unselected record in the insertion data table (S1305: YES), the table data insertion unit 33 returns to S1301.
  • the table data insertion unit 33 proceeds to S1307. This is because the determination in S1302 is completed for all the records in the insertion data table.
  • the table data insertion unit 33 determines whether or not an unselected record exists in the first intermediate table 800 (S1307). First, a case where an unselected record exists in the first intermediate table 800 (S1307: YES) will be described.
  • the table data insertion unit 33 selects one of the unselected records from the first intermediate table 800 and creates a hash bitmap value (HASH_V) that is a comparison value from the target column value (comparison source value) of the selected record. (S1308). Then, the table data insertion unit 33 specifies the LD_ID related to the selected record, and the HASH_V of the comparison source value matches one of the plurality of HASH_Vs corresponding to the specified LD_ID in the comparison target column value list 400. It is determined whether or not. (S1309).
  • HASH_V hash bitmap value
  • the table data insertion unit 33 sets the comparison source value and the specified LD_ID to the second intermediate value. It registers in the table 900 (S1310), and returns to S1307.
  • the table data insertion unit 33 determines whether or not an unselected record exists in the second intermediate table 900 (S1311). If there is no unselected record (S1311: NO), it is determined that all target column values in the insertion data table satisfy the unique constraint condition (S1315), and the process proceeds to S408 in FIG. 12 (proceeds to S408).
  • the table data insertion unit 33 selects one of the unselected records from the second intermediate table 900 and compares the selected records. The original value is compared with a plurality of comparison destination values included in the LD_ID related to the selected record (S1312).
  • the table data insertion unit 33 determines whether or not the comparison source value matches any of the plurality of comparison destination values included in the LD_ID (S1313). When the comparison source value does not match any of the comparison destination values (S1313: NO), the table data insertion unit 33 returns to S1311.
  • the table data insertion unit 33 determines that the unique constraint condition is not satisfied (S1314), and stops registration of the insertion data table (END).
  • FIG. 15 is a flowchart showing an example of the unique constraint determination process for the insertion data table.
  • FIG. 15 corresponds to the details of the processing of S407 in FIG.
  • the table data insertion unit 33 selects one of the unselected records (initially the first record) from the insertion data table 210 (S1501).
  • the table data insertion unit 33 determines whether the target column value (comparison source value) corresponding to the target column name list 90 is included in any column value range registered in the column value range list 300. (S1502). When the comparison source value is not included in any column value range (S1502: NO), the table data insertion unit 33 proceeds to S1505.
  • the table data insertion unit 33 sets the comparison source value and the LD_ID to which the column value range including the comparison source value belongs to the first intermediate value. Register in the data table 800 and go to S1505.
  • the table data insertion unit 33 determines whether an unselected record exists in the insertion data table 210 (S1505). If there is an unselected record in the insertion data table (S1505: YES), the table data insertion unit 33 returns to S1501.
  • the table data insertion unit 33 proceeds to S1507. This is because the determination in S1502 is completed for all the records in the insertion data table.
  • the table data insertion unit 33 determines whether or not an unselected record exists in the first intermediate table 800 (S1507). First, a case where an unselected record exists in the first intermediate table 800 (S1507: YES) will be described.
  • the table data insertion unit 33 selects one of the unselected records from the first intermediate table 800 and creates a hash bitmap value (HASH_V) that is a comparison value from the target column value (comparison source value) of the selected record. (S1508). Then, the table data insertion unit 33 specifies the LD_ID related to the selected record, and the HASH_V of the comparison source value matches one of the plurality of HASH_Vs corresponding to the specified LD_ID in the comparison target column value list 400. It is determined whether or not. (S1509).
  • HASH_V hash bitmap value
  • the table data insertion unit 33 sets the comparison source value and the specified LD_ID to the second intermediate value. Registered in the table 900, the corresponding number of comparison targets in the comparison target LD list 410 is increased by 1 (S1510), and the process returns to S1507.
  • the table data insertion unit 33 determines whether or not an unselected record exists in the second intermediate table 900 (S1511). When there is no unselected record (S1511: NO), it is determined that all target column values in the insertion data table satisfy the unique constraint condition (S1515), and the process proceeds to S408 in FIG. 12 (proceeds to S408).
  • the table data insertion unit 33 When there is an unselected record in the second intermediate table 900 (S1511: YES), the table data insertion unit 33, for all the records in the second intermediate table 900, the comparison source value for each record and the LD_ID for that record Are compared with a plurality of comparison target values (S1512).
  • the table data insertion unit 33 determines whether or not the comparison source value matches any of the plurality of comparison destination values included in the LD_ID (S1513). If the comparison source value does not match any of the comparison destination values (S1513: NO), the table data insertion unit 33 returns to S1511.
  • the table data insertion unit 33 determines that the unique constraint condition is not satisfied (S1514), and stops registration of the insertion data table (END).
  • FIG. 16 is a flowchart showing an example of the unique constraint determination process for the insertion data table.
  • FIG. 16 corresponds to the details of the processing of S1512 of FIG.
  • the table data insertion unit 33 determines whether or not an unselected record exists in the comparison target LD list 410 (S1601). If there is no unselected record (S1601: NO), it is determined that all target column values in the insertion data table satisfy the unique constraint condition (S1603), and the process proceeds to S1513 in FIG. 15 (proceeds to S1513).
  • the table data insertion unit 33 selects one of the unselected records from the comparison target LD list 410 and compares the selected record with a comparison target. Whether the number 413 is greater than the search confirmation threshold 420 is compared (S1604). If the comparison target number 413 is equal to or smaller than the search confirmation threshold 420 (S1604: NO), it is determined whether or not an unselected record exists in the database area corresponding to the LD_ID 411 of the record selected from the comparison target LD list 410 (S1606). ).
  • the insertion data table that does not satisfy the unique constraint condition is not stored in the segment.
  • the insertion data table 210 is stored in the segment. Thereby, the uniqueness of the target column value of the insertion data table 210 can be guaranteed.
  • a database area may be secured for each target column type.
  • the target database “ORDER_ID” of the insertion data table 210 satisfies the unique constraint condition.
  • the insertion data table 210 may be stored in the second database area. That is, the same insertion data table 210 includes different database areas (for example, including at least one of the column value range list 300, the comparison value list 400, the first intermediate table 800, and the second intermediate table 900). May be stored. Alternatively, the insertion data table 210 may be stored in a common database area even if a plurality of types of target columns respectively satisfy the unique constraint conditions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 データベース管理システムは、データベースに対する新規のデータテーブルの入力を受け付け、その新規のデータテーブルのうちの対象カラムに登録されている各値である各比較元値が、データベースに格納済みのデータテーブルのうちの対象カラムに登録されている各値である各比較先値と異なっている否かを判定するユニーク制約判定処理を行い、ユニーク制約判定処理における判定の結果が真の場合に、データベースにおける、格納済みのデータテーブルが格納されている第1のデータベース領域とは異なる第2のデータベース領域に、新規のデータテーブルを格納する。

Description

データベース管理システム及びデータベース管理方法
 本発明は、概して、データベース管理技術に関する。
 近年、ペタバイト(以下「PByte」という)単位の大量のデータを管理するデータベースを用いてビックデータを解析するニーズが高まりつつある。このようなビックデータの解析においては、データの鮮度が重要であるため、数ギガ・バイト(以下、GByte)単位のデータを追加しながら検索処理を行いたいという要求がある。ここで、新たに追加されるデータテーブル(以下、「新規データテーブル」という)の格納先領域を、既存領域(格納済みデータテーブルの領域)と区別して構成する方法が知られている(例えば、特許文献1)。
 特許文献1によれば、新規データテーブルが入力される都度に、新規データテーブルの格納先として既存領域とは別の領域が確保され、確保された領域に新規データテーブルが格納される。
 この方法において、領域に格納された新規データテーブルの対象カラムがユニーク制約条件(ユニーク性を保証するための条件)を満たすか否かを判定するためには、新規データテーブルの対象カラムを、全ての既存領域内の格納済みデータテーブルの対象カラムと比較する必要がある(例えば、特許文献2)。
特開2012-150547号公報 米国特許公開第5551027号明細書
 特許文献1及び2によれば、新規データテーブルが入力される都度に格納済みデータテーブルを記憶した既存データベース領域とは別のデータベース領域を確保してその確保されたデータベース領域に新規データテーブルを格納し、その後に、データベース領域に格納された新規データテーブルの対象カラムがユニーク制約条件を満たすか否かを、新規データテーブルのデータを格納済みの全てのデータと比較して判定する処理を行うことで、新規データテーブルの対象カラムのユニーク性を保証することが考えられる。しかし、そのような処理は、処理コストが大きい。
 そこで、本発明の目的は、新規データテーブルが既存データベース領域とは別のデータベース領域に格納されるようになっている環境において新規データテーブルの対象カラムのユニーク性を保証することの処理コストを削減することにある。
 データベース管理システムは、データベースに対する新規のデータテーブルの入力を受け付け、その新規のデータテーブルのうちの対象カラムに登録されている各値である各比較元値が、データベースに格納済みのデータテーブルのうちの対象カラムに登録されている各値である各比較先値と異なっている否かを判定するユニーク制約判定処理を行い、ユニーク制約判定処理における判定の結果が真の場合に、データベースにおける、格納済みのデータテーブルが格納されている第1のデータベース領域とは異なる第2のデータベース領域に、新規のテータテーブルを格納する。
 本発明によれば、新規データテーブルが既存データベース領域とは別のデータベース領域に格納されるようになっている環境において新規データテーブルの対象カラムのユニーク性を保証することの処理コストを削減することができる。
実施形態に係る計算機システムの一例を示すブロック図である。 データベースに格納済みのデータリストが存在しない場合におけるデータテーブル挿入処理の概要を示すフローチャートである。 データベースに格納済みのデータテーブルが存在する場合におけるデータテーブル挿入処理の概要を示すフローチャートである。 管理点管理テーブルの構成例を示す図である。 セグメント情報管理テーブルの構成例を示す図である。 表情報管理テーブルの構成例を示す図である。 カラム値範囲リストの構成例を示す図である。 比較用値リストの構成例を示す図である。 データベースに格納済みのデータテーブルが存在しない場合におけるデータテーブル挿入処理の一例を示すフローチャートである。 カラム値範囲リストの設定処理の詳細を示すフローチャートの一例である。 比較用値リストの設定処理の詳細を示すフローチャートの一例である。 データベースに格納済みのデータリストが存在する場合におけるデータテーブル挿入処理の一例を示すフローチャートである。 挿入用データテーブルのユニーク制約判定処理の一例を示すフローチャートである。 実施形態の概要を説明する模式図である。 挿入用データテーブルのユニーク制約判定処理の一例を示すフローチャートである。 挿入用データテーブルのユニーク制約判定処理の一例を示すフローチャートである。 比較対象LD一覧の構成例を示す図である。
 以下、図面を参照しながら実施形態を説明する。なお、図面では、同種の要素の参照符号は、同一の親番号を含んでおり、同種の要素を区別しないで説明する場合には、参照符号のうちの親番号のみを用いて説明し、同種の要素を区別して説明する場合には、参照符号全体を用いて説明する。
 図14は、本実施形態の概要を説明する模式図である。
 サーバ10は、計算機の一例であり、プロセッサ21を有する。サーバ10に、外部ストレージ装置12が接続されている。
 外部ストレージ装置12は、データベース1000を記憶し、データベース1000が、複数のデータベース領域101を有する。データベース領域101は、所定のサイズの1又は2以上のセグメントによって構成される。
 プロセッサ21は、データテーブル210が入力されると、その入力されたデータテーブル210のサイズに基づいてデータベース領域101を確保する(つまり、割り当てるセグメント数を決定する)。そして、プロセッサ21は、その入力されたデータテーブル210をその確保したデータベース領域101に格納する。この処理は、データテーブル210が入力される毎に実行される。サーバ10が、図示しない入力デバイス(例えば、I/F(通信インターフェースデバイス))を有していて、データテーブル210は、その入力デバイスから入力されてよい。データテーブル210は、例えば、図示しないクライアントから入力されてもよいし、外部ストレージ装置12から入力されてよい(読み出されてよい)。
 以下、図14を参照して、一具体例を説明する。なお、データテーブル210が有する複数のカラムのうちの対象カラム111について、ユニーク制約条件が設定されているとする。ここで、「対象カラム」とは、データテーブル210が有する1以上の属性(項目)のうちの対象属性のカラムである。複数のデータテーブル210にそれぞれ対応した複数の対象カラムは、対象属性は同じである。また、以下、対象カラムに登録される値を「対象カラム値」という。データテーブル210が複数のレコードを有していれば、通常、対象カラムには、複数の対象カラム値が登録されている。また、「ユニーク制約条件」とは、対象カラム値が相互に重複しないという制約の条件である。また、データベース領域101-1及び101-2に、それぞれデータテーブル210-1及び110-2が既に格納されているとする。ここで、サーバ10に、新たにデータテーブル210-3が入力されたとする。データテーブル210-1及び210-2で1つの表が構成されている。
 プロセッサ21は、入力されたデータテーブル210-3の対象カラム111-3における対象カラム値(以下「比較元値」という)が、格納済みのデータテーブル210-1及び210-2の各々の対象カラム値に対してユニーク制約条件を満たしているか否か(すなわち、比較元値が、格納済みのデータテーブル210-1及び210-2の対象カラム111-1及び111-2における何れの対象カラム値とも異なっているか否か)を判定する。データテーブル210-3がユニーク制約条件を満たすと判定された場合に、データテーブル210-3が表の構成要素として追加される。データテーブル210-3がユニーク制約条件を満たすか否かの判定は、例えば、下記の1段階目の判定処理と2段階目の判定処理を含む。
 (1段階目の判定処理)プロセッサ21は、比較元値毎に、比較元値と同じ対象カラム値が、格納済みのデータテーブル210-1及び210-2のそれぞれ対応したカラム値範囲120-1及び120-2に含まれているか否かを判定する。カラム値範囲120とは、対応する格納済みのデータテーブル210に登録されている対象カラム値(以下「比較先値」という)のうちの最小値と最大値との間の範囲である。カラム値範囲120は、比較先値の最小値と比較先値の最大値を含む。プロセッサ21は、何れのカラム値範囲120にも含まれない比較元値を、ユニーク制約条件を満たすと判定する。具体的には、比較元値「1」は、カラム値範囲120-1(「8」~「15」)とカラム値範囲120-2(「5」~「10」)の何れにも含まれないので、ユニーク制約条件を満たす。一方、比較元値「6」は、データカラム値範囲120-2(「5」~「10」)に含まれるので、次の2段階目の判定処理の判定が行われる(S20-1)。同様に、比較元値「14」は、カラム値範囲(「8」~「15」)120-1に含まれるので、次の2段階目の判定処理が行われる(S20-2)。
 (2段階目の判定処理)プロセッサ21は、1段階目の判定処理でカラム値範囲に含まれると判定された比較元値(以下「範囲内比較元値」という)が、そのカラム値範囲を構成するデータテーブルの比較先値の何れかと一致するか否かを判定する。何れの比較先値とも一致しない範囲内比較元値は、ユニーク制約条件を満たすと判定される。何れかの比較先値と一致する範囲内比較元値は、ユニーク制約条件を満たさないと判定される。図14において、範囲内比較元値「14」は、格納済みのデータテーブル210-1の比較先値「8」、「12」及び「15」の何れとも一致しないので、ユニーク制約条件を満たす。同様に、範囲内比較元値「6」は、データベース領域101-1に格納済みのデータテーブル210-2の比較先値「5」、「7」及び「10」の何れとも一致しないので、ユニーク制約条件を満たす。
 プロセッサ21は、入力されたデータテーブル210-3の全ての比較元値についてユニーク制約条件を満たすと判定した場合、その入力されたデータテーブル210-3を、データテーブル210-3用のデータベース領域(何れの格納済みデータテーブルを記憶していないデータベース領域)101-3に格納する。図14において、全ての比較元値「1」、「6」及び「14」が、何れもユニーク制約条件を満たすので、プロセッサ21は、そのデータテーブル210-3をデータベース領域101-3に格納する(S40)。これにより、データテーブル210-1及び210-2で構成されていた表に、新たにデータテーブル210-3が挿入されたことになる。一方、プロセッサ21は、いずれか1つの比較元値がユニーク制約条件を満たさないと判定した場合(例えば、ユニーク制約条件を満たさない範囲内比較元値が1つでも存在する場合)、入力されたデータテーブル210-3をデータベース領域に格納しない。
 以上の処理により、複数の記憶領域101に格納されているデータテーブルにおいて、対象カラム111のユニーク性を保証することができる。また、プロセッサ21は、1段階目の判定処理で、ユニーク制約条件を満たす比較元値をおおまかに見つけ、ユニーク制約条件を満たす比較元値と判定されなかった比較元値についてのみ、1段階目の判定処理の後の2段階目の判定処理で詳細に判定を行うことで、対象カラム111-3のユニーク性を短時間で判定することができる。
 なお、プロセッサ21は、上記2段階目の判定処理における範囲内比較元値と比較先値との一致可否判定を、次のように行ってもよい。
 プロセッサ21は、比較元値及び比較先値のそれぞれについて、二進数の上位Nビット(Nは自然数)を比較用テーブル130に格納しておく。プロセッサ21は、範囲内比較元値の上位ビットと、比較先値の上位Nビットの何れかと一致するか否かを判定する。何れの比較先値の上位Nビットとも一致しない範囲内比較元値は、ユニーク制約条件を満たすと判定される。なお、図14では、対象カラム値を二進数で表した4ビット全てが記載されているが、実際に比較用テーブル130に格納されるビットは、下線が引かれた上位3ビット(N=3)であるとする。
 範囲内比較元値の上位3ビットと一致する比較先値の上位3ビットが存在する場合、プロセッサ21は、その範囲内比較元値と、上位3ビットの一致する比較先値とが一致するか否かを判定する。それらの何れの比較先値とも一致しない場合、その範囲内比較元値は、ユニーク制約条件を満たすとプロセッサ21により判定される。範囲内比較元値が何れかの比較先値と一致する場合、範囲内比較元値は、ユニーク制約要件を満たさないと判定される。ユニーク制約条件を満たさない範囲内比較元値が存在した場合、プロセッサ21は、上記2段階目の判定処理と同様、入力されたデータテーブル210-3を記憶領域101に格納しないとしてもよい。
 例えば、プロセッサ21は、比較元値「1」、「6」、「14」の上位3ビット「000」、「011」、「111」をそれぞれ格納した比較用テーブル130-3を用意しておく。比較元値「1」は、1段階目の判定処理においてカラム値範囲120-1及び120-2の何れにも含まれなかったので、比較用値を使用した判定は行われない。比較元値「6」は、1段階目の判定処理においてカラム値範囲120-2に含まれたので、プロセッサ21は、その範囲内比較元値「6」の上位3ビット「011」と一致する上位3ビットが、カラム値範囲120-2に対応する比較用テーブル130-2に存在するか否かを判定する。比較用テーブル130-2には、一致する上位3ビット「011」が存在するので、プロセッサ21は、範囲内比較元値「6」と、上位3ビットが「011」である比較先値とを比較する。ここで、上位3ビットが「011」である比較先値はデータテーブル210-2において「7」のみであり、範囲内比較元値「6」と一致する比較先値がデータテーブル210-2に存在しないことがわかる。このため、範囲内比較元値「6」は、ユニーク制約条件を満たすと判定される(S30-1)。一方、もう1つの範囲内比較元値「14」についても同様に処理され、範囲内比較元値「14」がデータテーブル210-1の何れの比較先値とも不一致であることがわかる。このため、範囲内比較元値「14」も、ユニーク制約条件を満たすと判定される(S30-2)。
 変形例において、まず上位Nビット同士を比較しているのは、一致可否判定を高速化するためである。これは、比較元値及び比較先値が大きい場合により効果的である。したがって、2段階目の判定処理の変形例は、上述の上位Nビット同士を比較する以外の方法であってもよい。例えば、2段階目の判定処理の変形例は、比較元値及び比較先値のハッシュ値同士を比較するとしてもよい。つまり、上位Nビット又はハッシュ値は、対象カラムの属性値の情報量を削減した情報量削減値ということができ、2段階目の判定処理の変形例は、比較元値の情報量削減値と、比較先値の情報量削減値とを比較する処理ということもできる。
 以上が、本実施形態の概要である。なお、複数の記憶領域101に格納される複数のデータテーブルは、それぞれ、データベースの一要素であり、例えば、データベーススキーマの一種の表の一要素である。データベースは、外部ストレージ装置12に代えて、サーバ10内の記憶デバイス(例えばメモリ又は補助記憶デバイス)に格納されてよい。
 以下、本実施形態を詳細に説明する。
 図1は、本実施形態に係る計算機システム1の一例を示すブロック図である。
 計算機システム1は、サーバ10と、外部ストレージ装置12と、クライアント11とを含む。サーバ10と、外部ストレージ装置12と、クライアント11とは、通信ネットワーク13を通じて双方向にデータを送受信できる。計算機システム1において、クライアント11がサーバ10に情報を入力する入力デバイス及びサーバ10が出力した情報を表示する表示デバイスのような役割を担うが、サーバ10が入出力デバイスを有し、サーバ10が、その入出力デバイスを介して、情報を入力したり、情報を出力(表示)したりしてよい。
 サーバ10は、前述したように、I/F(例えばNIC(Network Interface Card))1401、メモリ20及びそれらに接続されたプロセッサ21を有する。メモリ20に代えて又は加えて他種の記憶デバイスが採用されてもよい。
 メモリ20が、データベース管理システム30を記憶する。データベース管理システム30は、図示しない補助記憶デバイスからロードされてもよいし、外部ストレージ装置12のような遠隔の装置からロードされてもよい。プロセッサ21が、メモリ20に記憶されたデータベース管理システム30を実行する。以下、データベース管理システム30(又はデータベース管理システム30内の要素)を主語にして処理等を説明することがあるが、データベース管理システム30により行われる処理の主語は、プロセッサ21又はサーバ10とすることもできる。
 データベース管理システム30は、外部ストレージ装置12に格納されているデータベース1000を制御する。クライアント11は、データベース管理システム30を通じて、データベース1000にアクセスすることができる。
 外部ストレージ装置12は、I/F(例えばNIC)1501、メモリ1503、記憶デバイス群1504及びそれらに接続されたプロセッサ1502を有する。I/F1501を通じて、サーバ10及びクライアント11と通信可能である。記憶デバイス群1504は、1又は複数の記憶デバイスで構成されており、データベース1000を記憶する。メモリ1503は、挿入用データテーブル210と、管理点管理テーブル500と、セグメント情報管理テーブル600と、表情報管理テーブル700と、第1中間テーブル800と、第2中間テーブル900とを記憶する。
 データベース1000は、1以上の表3220を含み、更に、1以上の索引3230を含んでよい。表3220は、1以上のレコードの集合であり、レコードは1以上のカラムから構成される。索引3230は、表3220の1以上のカラム等を対象として作成されるデータ構造であり、当該索引3230が対象とするカラム等を含む選択条件による表3220へのアクセスを高速化するためのものである。例えば、索引3230は、対象とするカラムの値の毎に、表の中で当該値を含むレコードを特定するための情報を保持するデータ構造である。データ構造としては、例えばB木等が用いられる。レコードを特定するための情報としては、物理アドレスや論理的な行ID等が用いられることがある。更に、データベース1000はデータベース統計を含んでよい。データベース統計は、例えば、索引3230のエントリ数を表す情報、表3220のレコード数を表す情報、カラム毎の値の最大値、平均値、最小値、カラム毎の値分布等、データベース1000が含むデータに関する情報を含んでよい。
 挿入用データテーブル210は、表3220へ挿入されるデータを有する。管理点管理テーブル500は、データベース1000に対する操作を管理する。セグメント情報管理テーブル600及び表情報管理テーブル700は、データベース1000を操作するときに利用される。データベース関連情報とは、挿入用データテーブル210と、管理点管理テーブル500と、セグメント情報管理テーブル600と、表情報管理テーブル700とを含む情報である
 セグメントとは、データベース1000におけるデータ格納領域の単位である。データベース1000は、複数のセグメントを有し、各セグメント内にデータテーブルを格納する。各セグメントには、データベース管理システム30が付与したIDが関連付けられる。
 セグメント情報管理テーブル600は、セグメントに関する情報を管理する。データベース管理システム30は、表情報管理テーブル700及びセグメント情報管理テーブル600を用いて、データの格納位置を管理する。挿入用データテーブル210は、例えば、データベース1000のユーザ(例えば、管理者)からクライアント11を通じて、外部ストレージ装置12に格納される。
 第1中間テーブル800及び第2中間テーブル900は、後述するユニーク制約判定処理において用いられる。第1中間データテーブル800には、ユニーク制約判定処理における第一段階の判定処理の結果が格納される。第2中間データテーブル900には、第一段階の判定処理の後に実行される第二段階の判定処理の結果が格納される。
 管理点管理テーブル500は、後述するデータテーブル挿入処理において挿入用データテーブル210を挿入したセグメントの範囲と、その挿入用データテーブル210の挿入対象の表と、そのデータテーブル挿入処理の開始時刻及び終了時刻と、に関する情報を管理する。管理点管理テーブル500は、データベース管理システム30の管理テーブル処理部34によって制御される。データテーブル挿入処理が一回実行されると、管理点管理テーブル500に1つのレコード(管理点レコード)が追加される。
 セグメント情報管理テーブル600は、データベース1000のセグメントの状態を管理する。セグメント情報管理テーブル600は、データベース管理システム30によって管理される。
 表情報管理テーブル700は、データベース1000の表3220の状態を管理する。表情報管理テーブル700は、データベース管理システム30によって管理される。
 データベース管理システム30は、クライアント11から挿入処理要求又はデータテーブル削除処理要求などを受けると、その要求に対応する処理を実行する。
 データベース管理システム30は、クライアント11からアクセス要求を受けると、外部ストレージ装置12のデータベース1000にアクセスする。データベース管理システム30は、データ操作要求受付部31と、情報管理テーブル管理部32と、表データ挿入部33と、管理テーブル処理部34とを含む。
 データ操作要求受付部31は、クライアント11から挿入処理要求又はデータテーブル削除処理要求を受け付ける。情報管理テーブル管理部32は、外部ストレージ装置12の各情報管理テーブルのデータを管理する。表データ挿入部33は、データテーブル挿入処理の際に表3220へのデータの挿入処理を行う。
 管理テーブル処理部34は、管理点管理テーブル500に対する処理を管理する。管理テーブル処理部34は、後述するように管理点レコード検索処理35と、管理点レコード生成処理36と、管理点レコード削除処理37と、管理点レコード更新処理38とを含む。
 メモリ20には、データベース管理システム30に加えて、データテーブル挿入処理又はデータテーブル削除処理の際に使用されるデータが格納される。メモリ20は、そのようなデータとして、例えば、総セグメント数40と、セグメント範囲50と、表名60と、カレントタイムスタンプ70と、保持セグメント80と、対象カラム名リスト90と、カラム値範囲リスト300と、比較用値リスト400と、を記憶する。
 総セグメント数40は、データテーブル挿入処理の際に全データ(挿入用データテーブル)の格納に必要なセグメントの個数を有する。セグメント範囲50は、データテーブル挿入処理の際にデータが格納されるセグメントの範囲又はデータテーブル削除処理の際に削除対象のデータが格納されているセグメントの範囲を有する。また、セグメント範囲50は、先頭セグメントのIDを示す開始セグメントID51と、最終セグメントのIDを示す終了セグメントID52とを有する。
 表名60は、データテーブル挿入処理の際にデータ挿入の対象となる表3220を特定するための情報を有する。カレントタイムスタンプ70は、現在の日時の情報を有する。保持セグメント80は、最後にデータを格納したセグメントIDを保持する。
 対象カラム名リスト90は、表3220におけるユニーク制約条件の対象となるカラム(対象カラム)の名称のリストを有する。対象カラム名リスト909に登録されている対象カラムにおける値が、本実施形態でいう対象カラム値である。
 カラム値範囲リスト300は、各々のセグメントに格納済みのデータテーブルについてのカラム値範囲を保持する。カラム値範囲とは、データテーブルの対象カラム値の最小値と最大値との間の範囲である。
 比較用値リスト400は、格納済みの各データテーブル(又はデータテーブルを格納済の各セグメント)について、対象カラム値から算出した比較用値(情報量削減値)を保持する。比較対象LD一覧410と索引確認閾値420は、後述するユニーク制約判定処理において用いられる。第一段階の判定処理の後に実行される第二段階の判定処理の結果情報が格納される。索引確認閾値420は、前記第二段階の判定処理の後の処理において、第2中間テーブルに格納されているレコードの処理方法の選択に使用される。なお、「LD」は、ロードデータの略である。
 図2は、データベース1000に格納済みのデータリストが存在しない場合におけるデータテーブル挿入処理の概要を示すフローチャートである。なお、図2(及び図3)において、対象属性(対象カラム)は、「ORDER_ID」である。
 データ操作要求受付部31は、クライアント11から挿入処理要求1100を受け付ける。この挿入処理要求1100には、外部ストレージ装置12に格納された挿入用データテーブル210を特定する情報(例えば、ファイル名)が含まれる。データ操作要求受付部31は、挿入処理要求1100を受け付けた場合、表データ挿入部33を起動する。
 表データ挿入部33は、データテーブル挿入処理が開始されると、現在の日時をカレントタイムスタンプ70から取得して開始日時とする(S901)。
 次に、表データ挿入部33は、挿入用データテーブル210を読み込んで、挿入するデータの格納に必要なセグメント数を算出し(S902)、算出されたセグメント数を総セグメント数3140に格納する。
 表データ挿入部33は、総セグメント数40に基づいて挿入用のセグメントをデータベース1000に確保し、メモリ20上のセグメント範囲50に、データ挿入の開始セグメントID31と終了セグメントID32とを格納する(S903)。
 次に、管理テーブル処理部34が、管理点レコード生成処理36により、カラム値範囲リスト300及び比較用値リスト400のための格納領域を確保する(S904)。
 次に、表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210における対象カラム値の範囲を、カラム値範囲リスト300に格納する(S905)。
 そして、表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210における対象カラム値の比較用値(情報量削減値)を、比較用値リスト400に格納する(S906)。
 管理テーブル処理部34は、管理点レコード生成処理36により、管理点管理テーブル500に新たなレコード(管理点レコード)を生成する。そして、管理テーブル処理部34は、管理点レコード生成処理36により、S904で生成したレコード(管理点レコード)の開始日時を管理点管理テーブル500のS_TIME511(図4参照)に格納し、データ一括挿入の開始セグメントID51をS_SEG513に格納し、終了セグメントID52をF_SEG514に格納し、データ一括挿入を実施した表3220の名称をTABLE515に格納する(S907)。
 そして、表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210を、データベース1000の表3220に確保した開始セグメントID51から終了セグメントID52へ加える(S908)。
 データテーブル挿入処理が完了すると、表データ挿入部33は、カレントタイムスタンプ70から現在の日時を取得して終了日時とする(S909)。
 最後に、管理テーブル処理部34は、管理点レコード更新部38により、S905で生成したレコード(管理点レコード)の終了日時をF_TIME512へ格納して、管理点管理テーブル500の新たなレコードを更新する(S910)。
 以上のように、データテーブル挿入処理では、データテーブル挿入処理の開始日時(S_TIME511)及び終了日時(F_TIME512)と、挿入用データテーブルの開始セグメント(S_SEG513)及び終了セグメント(F_SEG514)と、表の名称(TABLE515)とが格納された新たな管理点レコードが、管理点管理テーブル500に追加される。
 つまり、管理点管理テーブル500は、表名(TABLE515)と、データテーブル挿入処理の開始日時(S_TIME511)及び終了日時(F_TIME512)と、挿入用データテーブルの挿入位置を示す開始セグメント(S_SEG513)及び終了セグメント(F_SEG514)と、を一意で対応付けて管理する。これにより、後日、ユーザがデータテーブルを一括で削除する際に、データテーブル挿入処理の開始日時及び終了日時を検索条件として指定することで、そのデータテーブルの格納位置を容易に知ることができる。
 図3は、データベース1000に格納済みのデータリストが存在する場合におけるデータテーブル挿入処理の概要を示すフローチャートである。
 データ操作要求受付部31は、クライアント11から挿入処理要求1100を受け付ける。この挿入処理要求1100には、外部ストレージ装置12に格納された挿入用データテーブル210を特定する情報(例えば、ファイル名)が含まれる。データ操作要求受付部31は、挿入処理要求1100を受け付た場合、表データ挿入部33を起動する。
 表データ挿入部33は、データテーブル挿入処理が開始されると、現在の日時をカレントタイムスタンプ70から取得して開始日時とする(S1201)。
 次に、表データ挿入部33は、挿入用データテーブル210を読み込んで、挿入するデータの格納に必要なセグメント数を算出し(S1202)、算出されたセグメント数を総セグメント数40に格納する。
 表データ挿入部33は、総セグメント数40の値となるセグメントをデータベース1000に確保して、メモリ20上のセグメント範囲50に、データ挿入の開始セグメントID51と終了セグメントID52とを格納する(S1203)。
 次に、管理テーブル処理部34が、管理点レコード生成処理36により、カラム値範囲リスト300及び比較用値リスト400のための格納領域を確保する(S1204)。
 次に、表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210のデータの対象カラム値の範囲を、カラム値範囲リスト300に格納する(S1205)。
 そして、表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210におけるデータの対象カラム値の比較用値(情報量削減値)を、比較用値リスト400に格納する(S1206)。
 そして、表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210における対象カラム値と、カラム値範囲リスト300に登録されているカラム値範囲とを比較し、その対象カラム値がカラム値範囲に含まれているか否かを判定する。対象カラム値がカラム値範囲に含まれている場合、表データ挿入部33は、対象カラム値と、その対象カラム値を含む対象カラム値範囲の属するLD_IDとを、第1中間テーブル800に登録する(S1207)。LD_IDは、挿入用データテーブルのID(識別子)であり、LDは、ロードデータの略である。
 さらに、表データ挿入部33は、第1中間テーブル800から、対象カラム値とその対象カラム値に対応するLD_IDとを取得する。そして、表データ挿入部33は、その対象カラム値に対応する比較用値と、そのLD_IDに対応する比較用値リスト400に含まれる複数の比較用値とを比較する。そして、表データ挿入部33は、その比較において一致した対象カラム値と、その対象カラム値と一致した比較用値リスト400が属するLD_IDとを、第2中間テーブル900に登録する(S1207)。
 さらに、表データ挿入部33は、第2中間テーブル900から、対象カラム値とその対象カラム値に対応するLD_IDとを取得する。そして、表データ挿入部33は、その対象カラム値が、そのLD_IDに属する対象カラム値の何れかと一致するか否かを判定する。何れかと一致した場合、表データ挿入部33は、このデータテーブル挿入処理を中止し、ユニーク制約条件を満たさなかった旨を当該処理要求の発行元プログラムに伝える。何れとも一致しなかった場合、表データ挿入部33は、次の処理を実行する。
 次に、管理テーブル処理部34は、管理点レコード生成処理36により、管理点管理テーブル500に新たなレコード(管理点レコード)を生成する。そして、管理テーブル処理部34は、管理点レコード生成処理36により、S1204で生成したレコード(管理点レコード)の開始日時を管理点管理テーブル500のS_TIME511(図4参照)に格納し、挿入用データテーブル210を格納する開始セグメントID51及び終了セグメントID52を、それぞれをS_SEG513及びF_SEG514に格納し、挿入用データテーブルを挿入した表3220の名称をTABLE515に格納する(S1208)。
 表データ挿入部33は、挿入処理要求1100で指定された挿入用データテーブル210を、データベース1000の表3220に確保した開始セグメントID51から終了セグメントID52に格納する(S1209)。
 挿入用データテーブル210の挿入が完了すると、表データ挿入部33は、カレントタイムスタンプ70から現在の日時を取得して終了日時とする(S1210)。
 最後に、管理テーブル処理部34は、管理点レコード更新部38により、S1205で生成したレコード(管理点レコード)の終了日時をF_TIME512へ格納して、管理点管理テーブル500の新たなレコードを更新する(S1211)。
 以上のように、データテーブル挿入処理では、データテーブル挿入処理の開始日時(S_TIME511)及び終了日時(F_TIME512)と、挿入用データテーブルの開始セグメント(S_SEG513)及び終了セグメント(F_SEG514)と、表の名称(TABLE515)とが格納された新たな管理点レコードが、管理点管理テーブル510に追加される。
 つまり、管理点管理テーブル500は、表名(TABLE515と)と、データテーブル挿入処理の開始日時(S_TIME511)及び終了日時(F_TIME512)と、データの挿入位置を示す開始セグメント(S_SEG513)及び終了セグメント(F_SEG514)と、を対応付けて管理する。これにより、後日、ユーザがデータテーブルを一括で削除する際に、データテーブル挿入処理の開始日時及び終了日時を検索条件として指定することで、ユーザはデータの格納位置を容易に知ることができる。
 また、挿入用データテーブル210の何れかの対象カラム値が格納済みのデータテーブルの何れかの対象カラム値と一致する場合、その挿入用データテーブル210の格納は中止される。言い換えると、格納済みデータテーブルにおける全ての対象カラム値がユニーク制約条件を満たす場合に、挿入用データテーブル210が格納される。これにより、挿入用データテーブル210の対象カラム値のユニーク性を保証することができる。
 図4は、管理点管理テーブル500の構成例を示す図である。
 管理テーブル処理部34は、データベース1000上に、管理点管理テーブル500を生成して管理する。
 管理点管理テーブル500は、複数のレコードを有する。このレコードは、データ属性として、S_TIME511と、F_TIME512と、S_SEG513と、F_SEG514と、TABLE515と、LD_ID516とを有する。
 S_TIME511は、挿入用データテーブル210の挿入処理を開始した日時(開始日時)を表す。F_TIME512は、データテーブル挿入処理が終了した日時(終了日時)を表す。S_SEG513は、挿入用データテーブル210の挿入が開始されたセグメントのID(開始セグメントID)を表す。E_SEG514は、挿入用データテーブル210の挿入が終了したセグメントのID(終了セグメントID)を表す。TABLE515は、挿入用データテーブル210の挿入処理の対象となった表の名称又は識別子(表名)を表す。LD_ID516は、データテーブル挿入処理で登録された挿入用データテーブルを一意に識別し得るIDを表す。S_SEG513及びF_SEG514は、1レコードに対して複数の要素(繰り返し列)を有してもよい。
 例えば、図4のレコード517は、データテーブル挿入処理の開始日時(S_TIME511)が「2009年01月02日06時00分16秒」で、データテーブル挿入処理の終了日時(F_TIME512)が「2009年01月02日08時05分16秒」で、挿入用データテーブルの開始セグメントID(S_SEG513)が「4501」で、挿入用データテーブルの終了セグメントID(F_SEG514)が「5000」で、対象となった表の名称(TABLE515)が「T1」で、LD_IDが「2」であることを示す。
 図5は、セグメント情報管理テーブル600の構成例を示す図である。
 セグメント情報管理テーブル600は、セグメント毎に生成される。セグメント情報管理テーブル600は、データ属性として、SEGMENT_ID611と、TABLE_NAME612と、NEXTSEG_ID613と、PREVSEG_ID614と、REST615とを有する。
 SEGMENT_ID611は、セグメントの識別子であるSEGMENT_IDを表す。TABLE_NAME612は、SEGMENT_ID611の示すセグメントを有する表の名称を表す。NEXTSEG_ID613は、SEGMENT_ID611の示すセグメントの次のセグメントの識別子(SEGMENT_ID)を表す。PREVSEG_ID614は、SEGMENT_ID611の示すセグメントの前のセグメントの識別子(SEGMENT_ID)を表す。REST615は、SEGMENT_ID611の示すセグメントに格納可能なデータ量(ページ数)を表す。
 図6は、表情報管理テーブル700の構成例を示す図である。
 表情報管理テーブル700は、データベース1000に格納される表毎に生成される。表情報管理テーブル700は、データ属性として、TABLE_NAME711と、TABLE_ID712と、SEGMENT713とを有する。
 TABLE_NAME711は、表の名称であるテーブル名を表す。TABLE_ID712は、当該表の識別子を表す。SEGMENT713は、当該表の使用するセグメントの範囲を表す。SEGMENT713は、複数のセグメントの範囲を表してもよい。例えば、図6に示す表情報管理テーブル700は、TABLE_ID712の示す表が、セグメントID「1~2000」の範囲と、セグメントID「4501~5000」の範囲とを使用していることを示す。
 図7は、カラム値範囲リスト300の構成例を示す図である。
 カラム値範囲リスト300は、LD_ID毎に、そのLD_IDに対応するデータテーブルにおけるカラム値範囲(最小値及び最大値)をレコードとして有する。カラム値範囲リスト300は、データ属性として、LD_ID301と、UC_ID302と、MIN303と、MAX304とを有する。
 LD_ID301は、上述のとおり、挿入用データテーブル210を一意に識別するためのIDを表す。UC_ID302は、対象カラムを一意に識別するためのIDを表す。MIN303は、LD_ID301に対応する挿入用データテーブルにおける対象リスト(UC_ID302)の対象リスト値の内の最小値を表す。MAX304は、同じく対象リスト(UC_ID302)の対象リスト値の内の最大値を表す。
 例えば、図7は、LD_ID301「0」の挿入用データテーブル210において、UC_ID302「0」に対応する複数の対象カラム値の内、最小値が「1」で最大値が「10」であることを示す。
 図8は、比較用値リスト400の構成例を示す図である。
 比較用値リスト400は、LD_ID毎に、データ属性として、LD_ID401と、比較用値を示すHASH_V402とを有する。
 LD_ID401は、上述のとおり、挿入用データテーブル210を一意に識別するためのIDを表す。HASH_V402は、LD_ID401に対応するデータテーブルに含まれる各対象カラム値の比較用値を表す。比較用値は、例えばハッシュビットマップ値であって、対象カラム値を二進数で表現した値(ビット列)のうちの上位3ビットの値であってもよい。
 図17は、比較対象LD一覧410の構成例を示す図である。
 比較対象LD一覧410は、LD_ID毎に、そのLD_IDに対応するデータテーブルにおける第2中間テーブルに格納されたカラム値数をレコードとして有する。比較対象LD一覧410は、データ属性として、LD_ID411と、UC_ID412と、比較対象数413を有する。
 LD_ID411は、上述のとおり、挿入用データテーブル210を一意に識別するためのIDを表す。UC_ID412は、対象カラムを一意に識別するためのIDを表す。比較対象数413は、LD_ID411に対応する挿入用データテーブルにおける対象リスト(UC_ID412)の対象リスト値の内の第2中間テーブルに格納された数を表す。
 例えば、図17は、LD_ID411「0」の挿入用データテーブル210において、UC_ID412「0」に対応する複数の対象カラム値の内、1つのカラム値が第2中間テーブルに格納されていることを示す。
 例えば、図8は、LD_ID401「0」のデータテーブルにおいて、各対象カラム値の比較用値は「0」、「2」、「5」であることを示す。
 図9は、データベース1000に格納済みのデータテーブルが存在しない場合におけるデータテーブル挿入処理の一例を示すフローチャートである。この図9は、図2の処理の詳細な説明にあたる。
 この処理は、例えば、データ操作要求受付部31がクライアント11から挿入対象のテーブル名と、挿入対象の挿入用データテーブル210の名称とを受信したとき開始される。
 表データ挿入部33は、データテーブル挿入処理が開始されると、カレントタイムスタンプ70から現在の日時を取得する(S101)。
 表データ挿入部33は、指定された挿入用データテーブル210のレコード数及び容量を参照して、指定された表3220に挿入用データテーブル210を追加するのに必要なセグメント数を算出する(S102)。そして、表データ挿入部33は、算出されたセグメント数をメモリ20上の総セグメント数40へ格納する。
 そして、表データ挿入部33は、外部ストレージ装置12のデータベース1000の領域において、挿入用データテーブル210を格納するためのセグメントを確保する(S103)。表データ挿入部33は、確保したセグメントについて、先頭のセグメントIDをセグメント範囲50の開始セグメントID51に、最後のセグメントIDを終了セグメントID52に格納する。
 管理テーブル処理部34が、管理点レコード生成処理36により、カラム値範囲リスト300及び比較用値リスト400のための格納領域を確保する(S104)。
 表データ挿入部33は、挿入用データテーブル210における対象カラム値の最小値及び最大値をカラム値範囲リスト300に格納する(S105)。当該処理の詳細については後述する。なお、挿入用データテーブル210は、外部ストレージ装置12から読み出されたデータテーブルでもよいしクライアント11から入力されたデータテーブルでもよい。
 表データ挿入部33は、その挿入用データテーブル210における対象カラム値の比較用値を比較用対象カラム値リスト400に格納する(S106)。当該処理の詳細については後述する。
 管理テーブル処理部34は、管理点レコード生成処理36により、新たな管理点レコードを生成して管理点管理テーブル500に追加する。ここで、管理点レコード生成処理36は、この新たに生成した管理点レコードについて、S_TIME511にS101で取得したカレントタイムスタンプ70の値を格納し、S_SEG513にS103で取得した開始セグメントID51の値を格納し、F_SEG514にS103で取得した終了セグメントID52の値を格納する(S107)。
 表データ挿入部33は、S103で確保したセグメントに挿入用データテーブル210を格納する(S108)。そして、表データ挿入部33は、カレントタイムスタンプ70を取得する(S109)。
 管理テーブル処理部34は、管理点レコード更新処理38により、F_TIME512にその取得したカレントタイムスタンプの値を格納して、上記S107で追加した管理点管理テーブル500におけるレコードを更新する(S110)。
 上記の処理によって、サーバ10は、ユーザが用意した挿入用データテーブル210を表3220に一括して追加すると共に、ユーザが追加したレコードを識別する情報としてデータ一括挿入の開始日時及び終了日時を管理点管理テーブル500に登録する。
 図10は、対象カラム値範囲リスト300の設定処理の詳細を示すフローチャートの一例である。この図10は、図9のS105における処理の詳細を示す。
 表データ挿入部33は、挿入用データテーブル210から対象カラム名リスト90に登録されている対象カラムの最小値及び最大値を取得する(S201)。
 表データ挿入部33は、カラム値範囲リスト300に、その挿入用データテーブル210に対応するLD_IDと、その取得した最小値及び最大値とを登録し(S202)、S105に戻る。
 図11は、比較用対象カラム値リスト400の設定処理の詳細を示すフローチャートの一例である。この図11は、図9のS106における処理の詳細を示す。
 表データ挿入部33は、挿入用データテーブル210から、未選択レコードの1つ(最初は先頭レコード)を選択する(S301)。
 表データ挿入部33は、S301で選択したレコードに対して対象カラム名リスト90に登録されている対象カラム値からハッシュビットマップ値を作成し、そのハッシュビットマップ値を比較用値リストに登録する(S302)。
 表データ挿入部33は、挿入用データテーブル210に未選択レコードが存在するか否かを判定する(S303)。
 未選択レコードが存在する場合(S303:YES)、表データ挿入部33は、S301に戻り、残りの未選択レコードについてS301~S303を実行する。
 未選択レコードが存在しない場合(S303:NO)、表データ挿入部33は、当該処理を終了する。全てのレコードが、比較用対象カラム値リストに登録されたためである。
 上記図9~図11の処理により、サーバ10は、挿入用データテーブル210のレコードがユニーク制約条件を満たすことを確認した後、対象の表3220に一括して挿入用データテーブルを挿入すると共に、管理点管理テーブル500に、挿入用データテーブルに係る開始日時、終了日時及び格納位置(セグメントID)を登録する。
 図12は、データベース1000に格納済みのデータテーブルが存在する場合におけるデータテーブル挿入処理の一例を示すフローチャートである。この図12は、図3の処理の詳細な説明にあたる。
 この処理は、例えば、データ操作要求受付部31が、クライアント11から挿入対象のテーブル名と、挿入対象の挿入用データテーブル210の名称とを受信したときに開始される。
 図12のS401~S406の処理は、図9のS101~S106の処理と同様であるので説明を省略する。
 表データ挿入部33は、挿入用データテーブル210に対して、ユニーク制約判定処理を行う(S407)。当該処理の詳細については後述するが、このユニーク制約判定処理によってユニーク制約条件が満たされた場合に、表データ挿入部33は、次のS408に進む。
 図12のS408~S411の処理は、図9のS107~S110の処理と同様であるので説明を省略する。
 上記の処理によって、サーバ10は、管理者などが用意した挿入用データテーブル210を表3220で一括して追加し、管理者が追加したレコードを識別する情報としてデータテーブル挿入処理の開始日時及び終了日時を管理点管理テーブル500に登録する。
 また、挿入用データテーブル210の対象カラム値が格納済みのデータテーブルの対象カラム値の何れかと一致する場合、その挿入用データテーブル210の格納は中止される。言い換えると、格納済みデータテーブルにおける対象カラム値に対してユニーク制約条件を満たす場合に、挿入用データテーブル210が格納される。これにより、挿入用データテーブル210の対象カラム値のユニーク性を保証することができる。
 図13は、挿入用データテーブルのユニーク制約判定処理の一例を示すフローチャートである。この図13は、図12のS407の処理の詳細にあたる。
 表データ挿入部33は、挿入用データテーブル210から、未選択レコードの内の1つ(最初は先頭レコード)を選択する(S1301)。
 表データ挿入部33は、対象カラム名リスト90に対応する対象カラム値(比較元値)が、カラム値範囲リスト300に登録されている何れかのカラム値範囲に含まれるか否かを判定する(S1302)。比較元値が何れのカラム値範囲にも含まれない場合(S1302:NO)、表データ挿入部33は、S1305へ進む。
 比較元値が何れかのカラム値範囲に含まれる場合(S1302:YES)、表データ挿入部33は、その比較元値と、その比較元値を含むカラム値範囲の属するLD_IDとを第1中間データテーブル800に登録し、S1305へ進む。
 表データ挿入部33は、挿入用データテーブル210に未選択レコードが存在するか否かを判定する(S1305)。挿入用データテーブルに未選択レコードが存在する場合(S1305:YES)、表データ挿入部33は、S1301へ戻る。
 挿入用データテーブルに未選択レコードが存在しない場合(S1305:NO)、表データ挿入部33は、S1307へ進む。挿入用データテーブルの全てのレコードに対して、S1302の判定が完了したからである。
 表データ挿入部33は、第1中間テーブル800に未選択レコードが存在するか否かを判定する(S1307)。まず、第1中間テーブル800に未選択レコードが存在する場合(S1307:YES)について説明する。
 表データ挿入部33は、第1中間テーブル800から未選択レコードの1つを選択し、その選択レコードの対象カラム値(比較元値)から比較用値であるハッシュビットマップ値(HASH_V)を作成する(S1308)。そして、表データ挿入部33は、その選択レコードに係るLD_IDを特定し、その比較元値のHASH_Vが、比較用対象カラム値リスト400におけるその特定したLD_IDに対応する複数のHASH_Vの何れかと一致するか否かを判定する。(S1309)。
 比較元値のHASH_Vがその特定したLD_IDに対応する複数のHASH_Vの何れとも一致しない場合(S1309:NO)、表データ挿入部33は、S1307に戻る。
 比較元値のHASH_Vがその特定したLD_IDに対応する複数のHASH_Vの何れかと一致した場合(S1309:YES)、表データ挿入部33は、その比較元値と、その特定したLD_IDとを第2中間テーブル900に登録し(S1310)、S1307に戻る。
 次に、S1307において、第1中間テーブル800に未選択レコードが存在しない場合(S1307:NO)について説明する。
 表データ挿入部33は、第2中間テーブル900に未選択レコードが存在するか否かを判定する(S1311)。未選択レコードが存在しない場合(S1311:NO)、挿入用データテーブルの対象カラム値は全てユニーク制約条件を満たすと判定し(S1315)、図12のS408へ進む(S408へ進む)。
 第2中間テーブル900に未選択レコードが存在する場合(S1311:YES)、表データ挿入部33は、第2中間テーブル900から未選択レコードの内の1つを選択し、その選択レコードに係る比較元値と、その選択レコードに係るLD_IDに含まれる複数の比較先値とを比較する(S1312)。
 そして、表データ挿入部33は、その比較元値が、そのLD_IDに含まれる複数の比較先値の内の何れかと一致するか否かを判定する(S1313)。比較元値が何れの比較先値とも一致しない場合(S1313:NO)、表データ挿入部33は、S1311へ戻る。
 比較元値が比較先値の何れかと一致する場合(S1313:YES)、表データ挿入部33は、ユニーク制約条件を満たさないとして(S1314)、挿入用データテーブルの登録を中止する(END)。
 図15は、挿入用データテーブルのユニーク制約判定処理の一例を示すフローチャートである。この図15は、図12のS407の処理の詳細にあたる。
 表データ挿入部33は、挿入用データテーブル210から、未選択レコードの内の1つ(最初は先頭レコード)を選択する(S1501)。
 表データ挿入部33は、対象カラム名リスト90に対応する対象カラム値(比較元値)が、カラム値範囲リスト300に登録されている何れかのカラム値範囲に含まれるか否かを判定する(S1502)。比較元値が何れのカラム値範囲にも含まれない場合(S1502:NO)、表データ挿入部33は、S1505へ進む。
 比較元値が何れかのカラム値範囲に含まれる場合(S1502:YES)、表データ挿入部33は、その比較元値と、その比較元値を含むカラム値範囲の属するLD_IDとを第1中間データテーブル800に登録し、S1505へ進む。
 表データ挿入部33は、挿入用データテーブル210に未選択レコードが存在するか否かを判定する(S1505)。挿入用データテーブルに未選択レコードが存在する場合(S1505:YES)、表データ挿入部33は、S1501へ戻る。
 挿入用データテーブルに未選択レコードが存在しない場合(S1505:NO)、表データ挿入部33は、S1507へ進む。挿入用データテーブルの全てのレコードに対して、S1502の判定が完了したからである。
 表データ挿入部33は、第1中間テーブル800に未選択レコードが存在するか否かを判定する(S1507)。まず、第1中間テーブル800に未選択レコードが存在する場合(S1507:YES)について説明する。
 表データ挿入部33は、第1中間テーブル800から未選択レコードの1つを選択し、その選択レコードの対象カラム値(比較元値)から比較用値であるハッシュビットマップ値(HASH_V)を作成する(S1508)。そして、表データ挿入部33は、その選択レコードに係るLD_IDを特定し、その比較元値のHASH_Vが、比較用対象カラム値リスト400におけるその特定したLD_IDに対応する複数のHASH_Vの何れかと一致するか否かを判定する。(S1509)。
 比較元値のHASH_Vがその特定したLD_IDに対応する複数のHASH_Vの何れとも一致しない場合(S1509:NO)、表データ挿入部33は、S1507に戻る。
 比較元値のHASH_Vがその特定したLD_IDに対応する複数のHASH_Vの何れかと一致した場合(S1509:YES)、表データ挿入部33は、その比較元値と、その特定したLD_IDとを第2中間テーブル900に登録し、比較対象LD一覧410の対応する比較対象数を1増加させ(S1510)、S1507に戻る。
 次に、S1507において、第1中間テーブル800に未選択レコードが存在しない場合(S1507:NO)について説明する。
 表データ挿入部33は、第2中間テーブル900に未選択レコードが存在するか否かを判定する(S1511)。未選択レコードが存在しない場合(S1511:NO)、挿入用データテーブルの対象カラム値は全てユニーク制約条件を満たすと判定し(S1515)、図12のS408へ進む(S408へ進む)。
 第2中間テーブル900に未選択レコードが存在する場合(S1511:YES)、表データ挿入部33は、第2中間テーブル900のレコード全てについて、レコードごとに係る比較元値と、そのレコードに係るLD_IDに含まれる複数の比較先値とを比較する(S1512)。
 そして、表データ挿入部33は、その比較元値が、そのLD_IDに含まれる複数の比較先値の内の何れかと一致するか否かを判定する(S1513)。比較元値が何れの比較先値とも一致しない場合(S1513:NO)、表データ挿入部33は、S1511へ戻る。
 比較元値が比較先値の何れかと一致する場合(S1513:YES)、表データ挿入部33は、ユニーク制約条件を満たさないとして(S1514)、挿入用データテーブルの登録を中止する(END)。
 図16は、挿入用データテーブルのユニーク制約判定処理の一例を示すフローチャートである。この図16は、図15のS1512の処理の詳細にあたる。
 表データ挿入部33は、比較対象LD一覧410に未選択レコードが存在するか否かを判定する(S1601)。未選択レコードが存在しない場合(S1601:NO)、挿入用データテーブルの対象カラム値は全てユニーク制約条件を満たすと判定し(S1603)、図15のS1513へ進む(S1513へ進む)。
 比較対象LD一覧410に未選択レコードが存在する場合(S1601:YES)、表データ挿入部33は、比較対象LD一覧410から未選択レコードの内の1つを選択し、その選択レコードの比較対象数413が検索確認閾値420より大きいか比較する(S1604)。比較対象数413が検索確認閾値420以下の場合(S1604:NO)、比較対象LD一覧410から選択したレコードのLD_ID411に対応するデータベース領域に未選択のレコードが存在するか否かを判定する(S1606)。
 未選択レコードが存在しない場合(S1606:NO)、現在確認しているLD_ID411に対応するデータベース領域のカラム値と比較するカラム値は全てユニーク制約条件を満たすと判定し(S1607)、S1601へ進む。未選択レコードが存在する場合(S1606:YES)、比較対象LD一覧410から選択したレコードのLD_ID411に対応するデータベース領域のユニーク制約確認対象カラムの索引3230に、未選択レコードの対象カラムのカラム値を持つレコードが存在するか否かを判定する(S1608)。レコードが存在しない場合(S1608:NO)、S1606へ進む。レコードが存在した場合(S1608:YES)、ユニーク制約条件を満たさないと判定し(S1610)、挿入用データテーブルの登録を中止する(END)。
 比較対象数413が検索確認閾値420より大きい場合(S1604:YES)、比較対象LD一覧410から選択したレコードのLD_ID411と一致するLD_IDを持つレコードを第2中間テーブル900から全て取得する(S1611)。次に、比較対象LD一覧410から選択したレコードのLD_IDに対応するデータベース領域のレコードを全て取得する(S1612)。S1610で取得したレコードと、S1611で取得したレコードを一括で比較し、対象カラムについてカラム値が一致するレコードが存在するか判定する(S1613)。一致するレコードが存在しない場合(S1613:NO)、S1601へ進む。一致するレコードが存在する場合(S1613:YES)、ユニーク制約条件を満たさないと判定し(S1610)、挿入用データテーブルの登録を中止する(END)。
 以上の処理によれば、ユニーク制約条件を満たさない挿入用データテーブルはセグメントに格納されない。言い換えると、格納済みデータテーブルにおける対象カラム値に対してユニーク制約条件を満たす場合に、挿入用データテーブル210はセグメントに格納される。これにより、挿入用データテーブル210の対象カラム値のユニーク性を保証することができる。
 上述した実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。例えば、属性の種類が異なる複数の対象カラムが存在する場合には、対象カラムの種類毎に、データベース領域が確保されてよい。例えば、図3において、複数種類の対象カラムが、「ORDER_ID」と「ITEM_ID」である場合、挿入用データテーブル210の対象カラム「ORDER_ID」がユニーク制約条件を満たす場合に、第1のデータベース領域に挿入用データテーブル210が格納され、挿入用データテーブル210の対象カラム「ITEM_ID」もユニーク制約条件を満たす場合には、第2のデータベース領域に挿入用データテーブル210が格納されてよい。つまり、同じ挿入用データテーブル210が異なる複数のデータベース領域(例えば、カラム値範囲リスト300、比較用値リスト400、第1中間テーブル800及び第2中間テーブル900のうちの少なくとも1つを含む)に格納されてよい。或いは、複数種類の対象カラムがそれぞれユニーク制約条件を満たしても共通のデータベース領域に挿入用データテーブル210が格納されてもよい。
 10…サーバ 11…クライアントサーバ 12…外部ストレージ装置

 

Claims (17)

  1.  データベースに対する新規のデータテーブルの入力を受け付ける受付部と、
     前記新規のデータテーブルのうちの対象カラムに登録されている各値である各比較元値が、前記データベースに格納済みのデータテーブルのうちの対象カラムに登録されている各値である各比較先値と異なっている否かを判定するユニーク制約判定処理を行い、前記ユニーク制約判定処理における判定の結果が真の場合に、前記データベースにおける、前記格納済みのデータテーブルが格納されている第1のデータベース領域とは異なる第2のデータベース領域に、前記新規のテータテーブルを格納する挿入部と
    を有するデータベース管理システム。
  2.  前記ユニーク制約判定処理は、1段階目の判定処理と、前記1段階目の判定処理における判定結果が真の場合に行われる2段階目の判定処理とを含み、
     前記1段階目の判定処理は、前記新規データテーブルの何れかの比較元値が前記格納済みデータテーブルのカラム値範囲に含まれるか否かを判定する処理であり、前記カラム値範囲の最大値が、比較先値の最大値であり、前記カラム値範囲の最小値が、比較先値の最小値であり、
     前記2段階目の判定処理は、前記新規データテーブルのうちの全ての範囲内比較元値が前記格納済みデータテーブルにおける全ての比較先値と異なっているか否かを判定する処理であり、前記範囲内比較元値は、前記カラム値範囲に含まれる比較元値であり、
     前記2段階目の判定処理における判定結果が真の場合が、前記ユニーク制約判定処理における判定結果が真の場合である、
    請求項1に記載のデータベース処理システム。
  3.  前記1段階目の判定処理は、前記格納済みデータテーブル毎のカラム値範囲を示す第1判定用情報を用いて行われ、
     前記挿入部は、前記第2のデータベース領域に格納される前記新規データテーブルのカラム値範囲を前記第1判定用情報に登録する、
    請求項2に記載のデータベース処理システム。
  4.  前記第2段階目の判定処理は、前記新規データテーブルにおける全ての範囲内比較元値をそれぞれ情報量を削減することにより得られた全ての比較元削減値が、前記格納済みデータテーブルの全ての比較先値をそれぞれ情報量を削減することにより得られた全ての比較先削減値と異なっているか否かを判定する処理である、
    請求項1に記載のデータベース処理システム。
  5.  前記2段階目の判定処理は、前記格納済みデータテーブルの比較先値に対応した比較削減値を有する第2判定用情報を用いて行われ、
     前記挿入部は、前記第2のデータベース領域に格納される前記新規データテーブルの範囲内比較元値に対応した比較元削減値を前記第2判定用情報に登録する、
    請求項4に記載のデータベース処理システム。
  6.  前記比較元削減値は、前記比較元値を二進数で表現した値の所定の上位Nビット(Nは2以上の整数)であり、
     前記比較先削減値は、前記比較先値を二進数で表現した値の所定の上位Nビットである、
    請求項4に記載のデータベース処理システム。
  7.  前記比較元削減値は、前記比較元値のハッシュ値であり、
     前記比較先削減値は、前記比較先値のハッシュ値である、
    請求項4に記載のデータベース処理システム。
  8.  データベースに対する新規のデータテーブルを入力する入力デバイスと、
     前記新規のデータテーブルのうちの対象カラムに登録されている各値である各比較元値が、前記データベースに格納済みのデータテーブルのうちの対象カラムに登録されている各値である各比較先値と異なっているか否かを判定するユニーク制約判定処理を行い、前記ユニーク制約判定処理における判定の結果が真の場合に、前記データベースにおける、前記格納済みのデータテーブルが格納されている第1のデータベース領域とは異なる第2のデータベース領域に、前記新規のテータテーブルを格納するプロセッサと
    を有する計算機。
  9.  前記ユニーク制約判定処理は、1段階目の判定処理と、前記1段階目の判定処理における判定結果が真の場合に行われる2段階目の判定処理とを含み、
     前記1段階目の判定処理は、前記新規データテーブルの何れかの比較元値が前記格納済みデータテーブルのカラム値範囲に含まれるか否かを判定する処理であり、前記カラム値範囲の最大値が、比較先値の最大値であり、前記カラム値範囲の最小値が、比較先値の最小値であり、
     前記2段階目の判定処理は、前記新規データテーブルのうちの全ての範囲内比較元値が前記格納済みデータテーブルにおける全ての比較先値と異なっているか否かを判定する処理であり、前記範囲内比較元値は、前記カラム値範囲に含まれる比較元値であり、
     前記2段階目の判定処理における判定結果が真の場合が、前記ユニーク制約判定処理における判定結果が真の場合である、
    請求項8に記載の計算機。
  10.  前記1段階目の判定処理は、前記格納済みデータテーブル毎のカラム値範囲を示す第1判定用情報を用いて行われ、
     前記挿入部は、前記第2のデータベース領域に格納される前記新規データテーブルのカラム値範囲を前記第1判定用情報に登録する、
    請求項9に記載の計算機。
  11.  前記第2段階目の判定処理は、前記新規データテーブルにおける全ての範囲内比較元値をそれぞれ情報量を削減することにより得られた全ての比較元削減値が、前記格納済みデータテーブルの全ての比較先値をそれぞれ情報量を削減することにより得られた全ての比較先削減値と異なっているか否かを判定する処理である、
    請求項8に記載の計算機。
  12.  前記2段階目の判定処理は、前記格納済みデータテーブルの比較先値に対応した比較削減値を有する第2判定用情報を用いて行われ、
     前記挿入部は、前記第2のデータベース領域に格納される前記新規データテーブルの範囲内比較元値に対応した比較元削減値を前記第2判定用情報に登録する、
    請求項9に記載の計算機。
  13.  前記比較元削減値は、前記比較元値を二進数で表現した値の所定の上位Nビット(Nは2以上の整数)であり、
     前記比較先削減値は、前記比較先値を二進数で表現した値の所定の上位Nビットである、
    請求項12に記載の計算機。
  14.  前記比較元削減値は、前記比較元値のハッシュ値であり、
     前記比較先削減値は、前記比較先値のハッシュ値である、
    請求項12に記載の計算機。
  15.  データベースに対する新規のデータテーブルの入力を受け付け、
     前記新規のデータテーブルのうちの対象カラムに登録されている各値である各比較元値が、前記データベースに格納済みのデータテーブルのうちの対象カラムに登録されている各値である各比較先値と異なっている否かを判定するユニーク制約判定処理を行い、前記ユニーク制約判定処理における判定の結果が真の場合に、前記データベースにおける、前記格納済みのデータテーブルが格納されている第1のデータベース領域とは異なる第2のデータベース領域に、前記新規のテータテーブルを格納する
    データベース管理方法。
  16.  前記ユニーク制約判定処理は、前記1段階目の判定処理と前記2段階目の判定処理に加えて、3段階目の判定処理を含み、
     前記3段階目の判定処理は、前記2段階目の判定処理における判定結果が真であったカラム値の数とそのカラム値が属するデータベース領域によって、判定対象カラム値を含むレコードが格納されているテーブルを全て読み込んで各比較元値と一致するか確認することと、判定対象カラム値を含む索引を読み込んで各比較元値と一致するか確認することのどちらかが選択される、
    請求項2に記載のデータベース処理システム。
  17.  前記ユニーク制約判定処理は、前記1段階目の判定処理と前記2段階目の判定処理に加えて、3段階目の判定処理を含み、
     前記3段階目の判定処理は、前記2段階目の判定処理における判定結果が真であったカラム値の数とそのカラム値が属するデータベース領域によって、判定対象カラム値を含むレコードが格納されているテーブルを全て読み込んで各比較元値と一致するか確認することと、判定対象カラム値を含む索引を読み込んで各比較元値と一致するか確認することのどちらかが、確認を行うデータベース領域毎に選択される、
    請求項2に記載のデータベース処理システム。

     
PCT/JP2013/072404 2013-08-22 2013-08-22 データベース管理システム及びデータベース管理方法 WO2015025401A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2013/072404 WO2015025401A1 (ja) 2013-08-22 2013-08-22 データベース管理システム及びデータベース管理方法
JP2015532652A JP6111337B2 (ja) 2013-08-22 2013-08-22 データベース管理システム及びデータベース管理方法
US14/771,369 US9971793B2 (en) 2013-08-22 2013-08-22 Database management system and database management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/072404 WO2015025401A1 (ja) 2013-08-22 2013-08-22 データベース管理システム及びデータベース管理方法

Publications (1)

Publication Number Publication Date
WO2015025401A1 true WO2015025401A1 (ja) 2015-02-26

Family

ID=52483210

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/072404 WO2015025401A1 (ja) 2013-08-22 2013-08-22 データベース管理システム及びデータベース管理方法

Country Status (3)

Country Link
US (1) US9971793B2 (ja)
JP (1) JP6111337B2 (ja)
WO (1) WO2015025401A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016173717A (ja) * 2015-03-17 2016-09-29 日本電気株式会社 カラムストア型データベース管理システム
CN111177476A (zh) * 2019-12-05 2020-05-19 北京百度网讯科技有限公司 数据查询方法、装置、电子设备及可读存储介质
JP2021506012A (ja) * 2017-12-08 2021-02-18 アリババ・グループ・ホールディング・リミテッドAlibaba Group Holding Limited データ記憶およびクエリ方法並びにデバイス

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9588978B2 (en) 2013-09-30 2017-03-07 International Business Machines Corporation Merging metadata for database storage regions based on overlapping range values
US9519687B2 (en) * 2014-06-16 2016-12-13 International Business Machines Corporation Minimizing index maintenance costs for database storage regions using hybrid zone maps and indices
US10042887B2 (en) 2014-12-05 2018-08-07 International Business Machines Corporation Query optimization with zone map selectivity modeling

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2583010B2 (ja) 1993-01-07 1997-02-19 インターナショナル・ビジネス・マシーンズ・コーポレイション 多層インデックス構造におけるローカルインデックステーブル及び大域インデックステーブルの間の一貫性を維持する方法
US8799305B2 (en) * 2008-08-22 2014-08-05 Disney Enterprises, Inc. System and method for optimized filtered data feeds to capture data and send to multiple destinations
US8301583B2 (en) * 2008-10-09 2012-10-30 International Business Machines Corporation Automated data conversion and route tracking in distributed databases
US8145652B2 (en) * 2008-10-09 2012-03-27 International Business Machines Corporation Automated propagation of non-conflicting queries in distributed databases
JP5199948B2 (ja) * 2009-05-22 2013-05-15 日本電信電話株式会社 データベース管理方法、データベース装置、およびプログラム
JP5534461B2 (ja) 2011-01-17 2014-07-02 株式会社日立製作所 データベースの管理方法、データベースの管理装置及びプログラム
US9274936B2 (en) * 2013-05-29 2016-03-01 Sap Portals Israel Ltd Database code testing framework

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JUN'ICHI NIINO: "SQL Server7.0 de Risoteki na Database o Kochiku shiyo DBA [Database Administrator] ni naru Tameno SQL Dojo Dai 6 Kai", WINDOWS NT WORLD, vol. 4, no. 10, 1 October 1999 (1999-10-01), pages 184 - 187 *
STANEK, WILLIAM: "Microsoft SQL Server 2008 Official Manual", 19 October 2009 (2009-10-19), pages 376 - 377 *
YASUHIRO IMAMURA: "DB Beginner mo, 2000/2005 User mo! SQL Server 2008 de Ittemiyo", vol. 19, no. 6, 1 October 2009 (2009-10-01), pages 84 - 90 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016173717A (ja) * 2015-03-17 2016-09-29 日本電気株式会社 カラムストア型データベース管理システム
JP2021506012A (ja) * 2017-12-08 2021-02-18 アリババ・グループ・ホールディング・リミテッドAlibaba Group Holding Limited データ記憶およびクエリ方法並びにデバイス
JP7453143B2 (ja) 2017-12-08 2024-03-19 アリババ・グループ・ホールディング・リミテッド データ記憶およびクエリ方法並びにデバイス
CN111177476A (zh) * 2019-12-05 2020-05-19 北京百度网讯科技有限公司 数据查询方法、装置、电子设备及可读存储介质
JP2021089704A (ja) * 2019-12-05 2021-06-10 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド データ照会方法、装置、電子機器、可読記憶媒体、及びコンピュータープログラム
JP7047228B2 (ja) 2019-12-05 2022-04-05 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド データ照会方法、装置、電子機器、可読記憶媒体、及びコンピュータープログラム
CN111177476B (zh) * 2019-12-05 2023-08-18 北京百度网讯科技有限公司 数据查询方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
US9971793B2 (en) 2018-05-15
JPWO2015025401A1 (ja) 2017-03-02
JP6111337B2 (ja) 2017-04-05
US20160004727A1 (en) 2016-01-07

Similar Documents

Publication Publication Date Title
JP6111337B2 (ja) データベース管理システム及びデータベース管理方法
JP4739786B2 (ja) データの再配置方法
US20130304770A1 (en) Method and system for storing data in a database
US8407185B2 (en) Computer, its processing method, and computer system
WO2011033734A1 (en) File search system and program
US20150310129A1 (en) Method of managing database, management computer and storage medium
US20220083618A1 (en) Method And System For Scalable Search Using MicroService And Cloud Based Search With Records Indexes
CN106874281B (zh) 实现数据库读写分离的方法和装置
CN109446160A (zh) 一种文件读取方法、系统、装置及计算机可读存储介质
US8880463B2 (en) Standardized framework for reporting archived legacy system data
CN110245145A (zh) 关系型数据库到Hadoop数据库的结构同步方法和装置
CN108628885B (zh) 一种数据同步方法、装置及存储设备
KR101640733B1 (ko) 인-메모리 데이터베이스 기반의 데이터 관리 시스템 및 그 방법
US20140067853A1 (en) Data search method, information system, and recording medium storing data search program
JP5448412B2 (ja) 情報処理装置およびその方法、プログラム、記録媒体
US20100235383A1 (en) Storage system and data migration-compatible search system
KR101358793B1 (ko) 인덱스 파일 생성방법, 사전 인덱스 파일을 이용한 데이터 검색 방법 및 데이터 관리 시스템, 기록매체
KR101588375B1 (ko) 데이터베이스 관리 방법 및 데이터베이스 관리 시스템
JP2009211403A (ja) ファイル検索プログラム
JP6467826B2 (ja) 帳票データ管理プログラム、帳票データ管理方法、及び情報処理装置
KR20130126012A (ko) 비즈니스 인텔리전스의리포트 제공 방법 및 장치
JP2010160577A (ja) 検索装置及びその制御方法、並びにコンピュータプログラム
JP2012123574A (ja) 帳票システムとその処理方法及びプログラム。
US9916373B2 (en) Dynamic data partitioning extension
JP4731928B2 (ja) データ管理装置、データ管理システム、データ処理装置、データ管理方法、プログラム、及び記憶媒体

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: 13891707

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015532652

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 14771369

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13891707

Country of ref document: EP

Kind code of ref document: A1