WO2012164738A1 - データベース管理システム、装置及び方法 - Google Patents
データベース管理システム、装置及び方法 Download PDFInfo
- Publication number
- WO2012164738A1 WO2012164738A1 PCT/JP2011/062774 JP2011062774W WO2012164738A1 WO 2012164738 A1 WO2012164738 A1 WO 2012164738A1 JP 2011062774 W JP2011062774 W JP 2011062774W WO 2012164738 A1 WO2012164738 A1 WO 2012164738A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- value
- record
- logical
- logical expression
- expression
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3341—Query execution using boolean model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2468—Fuzzy queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Definitions
- RDB relational database
- DB database
- RDB relational database
- RDB manages data by a table composed of a plurality of records having a plurality of columns.
- Each record generally has a record ID (identification) that can uniquely identify the record.
- DBMS database management system
- the DBMS receives a search query and extracts desired data from the DB using a search expression described in the search query.
- Patent Document 1 describes a method of extracting desired data using SQL (Structured Query Language) as a search query.
- SQL Structured Query Language
- FIG. 14 shows an example of a conventional search method.
- a conventional search method as described in Patent Document 1 will be described with reference to FIG.
- the reference symbols given to the same type of elements are composed of a combination of a parent code and a child code.
- the same type of elements is not particularly distinguished, Only the sign will be used.
- a search expression (hereinafter, logical expression) 902 is described.
- the logical expression 902 is composed of a combination of a plurality of conditional expressions.
- the DBMS extracts each record ID of a record that satisfies the conditional expression 901 of the search query 900 and generates a list 920 of record IDs for each conditional expression 901 (911).
- the DBMS sorts the record ID list 920 of each conditional expression 901 to generate a sorted record ID list 921 (912).
- the DBMS performs a logical operation on the sorted record ID lists 921a to 921c of the conditional expressions 901a to 901c based on the logical expression 902, and includes a logical operation completed record ID list 922 including a record ID whose operation result is “true”. Is generated.
- the DBMS can extract the record ID that matches the search query 900 from the RDB.
- the data size of the record ID list becomes large, and the sorting process cannot be completed only in the main storage device (for example, memory).
- the main storage device for example, memory
- auxiliary storage device for example, HDD (Hard Disk Drive) or flash memory
- the time required for sorting becomes longer. That is, the time required for the search process becomes long.
- an object of the present invention is to reduce the time required for the process of searching the DB for data that conforms to a search expression composed of a combination of a plurality of conditional expressions.
- the database management system specifies the logical expression and each conditional expression from the search query, and extracts the ID value of the record that matches the conditional expression for each specified conditional expression.
- the DBMS corresponds to the extracted record ID value and the conditional expression in the logical expression determination information which is information including a determination set having a record ID value and a plurality of matching result values respectively corresponding to the plurality of conditional expressions.
- the matching result value is changed to a first value meaning matching, and for each determination set in the logical expression determination information, a plurality of matching result values included in the determination set are logically calculated based on the logical expression.
- the DBMS searches the table specified by the search query for a record corresponding to the record ID value that matches the record ID value included in the determination set that has obtained the first value that means matching as a result of the logical operation.
- the search result information relating to the search result is output.
- the second storage device stores the table, and the first storage device, which has a faster data input / output speed than the second storage device, stores the logical expression determination information.
- the first storage device is, for example, a main storage device, and the second storage device is, for example, an auxiliary storage device.
- FIG. 2 shows an example of the configuration of a DB management apparatus according to an embodiment of the present invention.
- An example of the functional block of DBMS10 is shown.
- FIG. 3A shows an example of the table T1.
- FIG. 3B shows an example of the index 100.
- An example of a search query is shown.
- An example of processing outline of the conditional expression processing unit 22 is shown.
- An example of the logical expression determination table 26 is shown.
- FIG. 7A shows an example of a processing outline of the search result generation unit 24.
- FIG. 7B shows an example of the record ID list 601.
- An example of the processing flow of the search query analysis part 21 is shown.
- An example of the processing flow of the conditional expression processing unit 22 is shown.
- An example of the processing flow of the logical expression processing unit 23 is shown.
- An example of a processing flow of completion determination in the logical expression processing unit 23 is shown.
- An example of a processing flow for generating a new entry in the logical expression processing unit 23 is shown.
- An example of the processing flow of the search result generation unit 24 is shown.
- An example of a conventional search method is shown.
- FIG. 1 shows an example of the configuration of a DB management apparatus according to an embodiment of the present invention.
- the DB management device 1 receives the search query, searches the DB 11 for data that matches the search expression (logical expression) described in the search query, and executes the search result (for example, the number of corresponding records). Information indicating that the corresponding record has information).
- the search query is input from an external device.
- the external device may be an input device (not shown) or a storage medium.
- the external device is a communication terminal (hereinafter, terminal 3) that communicates with the DB management device 1. .
- the DB management device 1 is a computer, and includes a CPU 4, a memory 5, a device interface (hereinafter referred to as “I / F”) 6, and a communication I / F 7. Those components are connected to each other via a bus 20. Hereinafter, each component will be described.
- CPU 4 executes a computer program (hereinafter referred to as “program”) held in memory 5 or storage device 2.
- program a computer program held in memory 5 or storage device 2.
- the CPU 4 executes the DBMS 10 and realizes the computer as the DB management apparatus 1. Details of the DBMS 10 will be described later.
- processing may be described using a program (specifically, for example, DBMS or a function included in the program) as a subject, but the program is executed by a processor (for example, CPU 4), Since the determined processing is performed using storage resources (for example, the memory 5), I / F 6 and / or I / 7 as appropriate, the subject of the processing may be a processor.
- the process described with the program as the subject may be a process performed by the DB management apparatus 1.
- the processor may include a hardware circuit that performs part or all of the processing performed by the CPU 4.
- the program may be installed in the program source or on each computer.
- the program source may be, for example, a program distribution server or a storage medium that can be read by a computer.
- the storage device 2 is an example of an auxiliary storage device, for example, a non-volatile storage device. Therefore, the data held in the storage device 2 is not erased even if the power supply to the storage device 2 is cut off.
- the storage device 2 usually has a larger storage capacity than the memory 45. Therefore, the DB 11 having a large data size is normally held in the storage device 2.
- the DB 11 includes a table T1, a plurality of indexes 100 respectively corresponding to a plurality of columns included in the table T1, and a plurality of record ID lists 601 respectively corresponding to a plurality of conditional expressions described in the search query.
- the storage device 2 may be an external media drive such as an HDD or a flash memory, or may be a RAID storage system (for example, a disk array device) having a plurality of media drives.
- the storage device 2 shown in FIG. 1 is arranged outside the DB management device 1, but is not limited to this.
- the storage device 2 may be arranged inside the DB management device 1.
- a plurality of storage devices 2 may be arranged.
- the list 601 may not be included in the DB 11.
- the device I / F 6 is an I / F for connecting the DB management device 1 and the storage device 2.
- the DB management device 1 can input / output data to / from the storage device 2 via the device I / F 6.
- the device I / F 6 may be, for example, a Serial ATA port, a PCI Express port, a SCSI port, or a USB port.
- a plurality of device I / Fs 6 may be provided.
- the communication I / F 7 is an I / F for communicating the DB management apparatus 1 with an external communication device.
- the DB management device 1 can communicate with, for example, one or a plurality of terminals 3 connected to a communication network via the communication I / F 7.
- the communication I / F 7 may be a LAN (Local Area Network) port, for example.
- a plurality of communication I / Fs may be provided.
- the terminal 3 is an information processing apparatus that transmits a search query to the DB management apparatus 1 and obtains a search result from the DB management apparatus 1.
- the terminal 3 may be a personal computer or a mobile phone, for example.
- FIG. 2 shows an example of functional blocks of the DBMS 10.
- the DBMS 10 includes a search query analysis unit 21, a conditional expression processing unit 22, a logical expression processing unit 23, a search result generation unit 24, and a sort processing unit 28 (processing performed by each functional block will be described later). .
- the DBMS 10 creates a logical expression determination table 26 on the memory 5, and secures areas on the memory 5 as the conditional expression conformance information management unit 25 and the logical expression conformance information management unit 27.
- the DB 11 includes the table T1, the plurality of indexes 100, and the plurality of record ID lists 601.
- FIG. 3A shows an example of the table T1 held by the DB 11.
- the reference numerals given to the same type of elements are composed of a combination of the parent code and the child code, but in the following description, the same type of elements are not particularly distinguished. In this case, only the parent code is used.
- the table T1 includes a plurality of records 101 having a plurality of columns 110.
- the record 101 has values of a “record ID” column 110a, a “C1” column 110b, a “C2” column 110c, and a “C3” column 110d.
- the value of the “record ID” column 110 a is an ID (identification) that can uniquely identify the record.
- the value of the “record ID” column 110a is referred to as “record ID value”.
- the value in the “C1” column 110b is referred to as “C1 value”. The same applies to other cases.
- FIG. 3B shows an example of the index 100.
- the index 100 is composed of a plurality of entries.
- the value of the column corresponding to the index 100 for example, “8” as the value of “C1”
- Record ID for example, “210”
- FIG. 4 shows an example of a search query.
- the search query 200 is a query in which a search expression (logical expression) for extracting desired data from the DB 11 is described, and is described in SQL, for example.
- the search query 200 shown in FIG. 4 means that a record that matches the logical expression 202 that is a combination of the conditional expressions 201a to 201c is selected from the table T1 (100).
- the search query 200 describes a logical expression 202, and the logical expression 202 is usually a combination of a plurality of conditional expressions 201.
- the conditional expression 201 may include at least one of an arithmetic operator, a relational operator, and a function, for example.
- the logical expression 202 may include at least one of a logical operator and a function, for example.
- the DB management device 1 receives the search query from the terminal 3, and the DMBS 10 analyzes the search query. Specifically, for example, the search query analysis unit 21 analyzes the search query 200 and extracts the conditional expression 201a “C1> 10”, the conditional expression 201b “C2 ⁇ 5”, and the conditional expression 201c “C3 ⁇ 50”. To do. Then, the search query analysis unit 21 assigns conditional expression IDs 211a “X1”, 211b “X2”, and 211c “X3” that can uniquely identify the respective conditional expressions to the extracted conditional expressions 201a, 201b, and 201c. To do. Further, the search query analysis unit 21 analyzes the search query 200 and extracts a logical expression 202 “X1 AND (X2 OR X3)”. Through the above processing, the search query analysis unit 21 extracts the conditional expression 201 and the logical expression 202.
- the search query analyzing unit 21 replaces the negative logical operator with a developed conditional expression.
- the conditional expression is “NOT (C1> 10)”
- the conditional expression “C ⁇ 10” is expanded from NOT.
- a search using a logical expression determination table 26 described later becomes possible.
- the conditional expression processing unit 22 extracts a record ID value conforming to the conditional expression 201 from the index 100 corresponding to the table T1 specified by the search query 200, and sets the conditional expression ID 211 and the record ID value as a set.
- the matching information 301 is generated. Note that the information included in the conditional expression matching information 301 is not limited to this.
- the conditional expression matching information 301 may include the identification information of the index 100 or the update date of the record 101.
- FIG. 5 shows an example of the processing outline of the conditional expression processing unit 22.
- the generation of the conditional expression conformance information 301 will be described with reference to FIG.
- conditional expression processing unit 22 extracts the records 101b, 101c, 101e, and 101f whose C1 value is “C1> 10”, and records ID values “2”, “3”, “5”, “ 6 ”is extracted. Then, for example, the conditional expression processing unit 21 sets the conditional expression conformity in which “X1” of the conditional expression ID 211a corresponding to the conditional expression 201a and the extracted record ID value “2” are set to the record ID value “2”. Information 301 is generated. Then, the conditional expression determination unit 21 outputs the generated conditional expression conformance information 301 to the conditional expression conformance information management unit 25.
- the conditional expression determination unit 21 similarly generates conditional expression conformity information 301 for the other conditional expressions 201b and 201c, and outputs the conditional expression conformance information 301 to the conditional expression conformance information management unit 25.
- the conditional expression matching information 25 will be described later.
- the search query analysis unit 21 generates a logical expression determination table 26 on the memory 5 based on the extracted conditional expression 201. That is, the search query analysis unit 21 secures a memory area for generating the logical expression determination table 26 on the memory 5. At this time, the search query analysis unit 21 calculates the maximum number of records that can be entered in the logical expression determination table 26, and sets the calculated value as the maximum number of records. The maximum number of records is determined by the memory size (for example, the entire area of the memory 5 or the size of the predetermined area) and the number of conditional expressions 201 extracted.
- the number of extracted conditional expressions 201 is small in a predetermined memory size
- the number of columns 410 in the logical expression determination table 26 is small, so that the free space in the memory 5 is large correspondingly, so the maximum number of records is Become more.
- the number of extracted conditional expressions 201 is large in a predetermined memory size
- the number of columns 410 in the logical expression determination table 26 increases, so the free capacity of the memory 5 is small accordingly, and therefore the maximum number of records Will be less.
- the conditional expression processing unit 21 generates conditional expression completion information indicating completion of the conditional expression processing when the extraction of all record IDs conforming to the conditional expression 201 is completed, and outputs the conditional expression completion information to the conditional expression conformance information management unit 25.
- the conditional expression completion information may be, for example, information including its own conditional expression ID (the ID of conditional expression 201 in which all record ID extraction has been completed) and a character string indicating completion.
- the conditional expression processing unit 21 may execute an independent process (that is, multitasking) for each conditional expression 201. For example, since the number of conditional expressions 201 shown in FIG. 5 is three, three independent conditional expression processing unit 21 processes may be executed.
- the conditional expression conformance information management unit 25 is an area (for example, a buffer or a queue) in which information is input and output in, for example, a FIFO (First-in, First-out) format, and is configured on the memory 5.
- the conditional expression matching information management unit 25 buffers the conditional expression matching information 301 output from the conditional expression processing unit 21.
- the conditional expression conforming information 301 output from each conditional expression processing unit 21 is buffered in one conditional expression conforming information management unit 25.
- the conditional expression conformity information management unit 25 may notify the logical expression processing unit 23 when the conditional expression conformance information 301 is buffered.
- the logical expression processing unit 23 changes the values of the “conditional expression ID” columns 410 b to 410 d of the logical expression determination table 26 based on the conditional expression conformance information 301. Further, the logical expression processing unit 23 performs a logical operation on each record 401 of the logical expression determination table 26 by substituting the values of the “conditional expression ID” columns 410b to 410d into the logical expression 202, and calculates the result as a “logical operation result”. Register in column 410e.
- FIG. 6 shows an example of the logical expression determination table 26.
- the logical expression determination table 26 includes a plurality of records 401 having a “record ID” column 410a, “conditional expression ID” columns 410b to 410d, and a “logical operation result” column 410e.
- the logical expression determination table 26 may have other columns 410.
- a column 410 having a hash value calculated from the record ID value may be added to the logical expression determination table 26 in order to speed up the search.
- the information that the logical expression determination table 26 has is not necessarily stored in a table format.
- the logical expression processing unit 23 acquires the conditional expression conforming information 301 from the conditional expression conforming information management unit 25, and extracts the conditional expression ID (for example, “X1”) and the record ID value (for example, “2”) from the information 301. To do. Then, the logical expression processing unit 23 searches the logical expression determination table 26 for a record 401b having the extracted record ID value (eg, “2”) in the “record ID” column 410a. Then, the logical expression determination unit 23 changes the value of the column 410 of the extracted conditional expression ID (for example, “X1”) from “false” to “true” in the found record 401b.
- the logical expression processing unit 23 adds a new entry to the logical expression determination table 26, or stores the conditional expression conformance information 301 in the storage device 2.
- the sort processing unit 28 is made to execute the search. This process will be described later.
- the logical expression determination unit 23 includes the “conditional expression ID: X1” column 410b, the “conditional expression ID: X2” column 410c, and the “conditional expression ID: X3” column 410d in the record (for example, 401b) having the same record ID.
- a value is assigned to the logical expression 202 to perform a logical operation. For example, in the case of the record 401b, a logical operation of “true AND (true OR false)” is executed. Therefore, the logical operation result is “true”.
- the logical expression processing unit 23 registers the value of the logical operation result (for example, “true”) in the “logical operation result” column 410e in the record (for example, 401b) having the same record ID.
- the logical expression processing unit 23 outputs the logical expression conformance information 302 including the record ID value of the record 401 whose logical operation result value is “true” to the logical expression conformance information management unit 27.
- the logical expression processing unit 23 may delete, from the logical expression determination table 26, records whose values of all the conditional expression ID columns 410b to 410d are “true” as a result of the logical operation.
- the number of records existing in the logic determination table 26 decreases, and the number of records that can be newly entered in the logic determination table 26 increases. That is, the number of records that can be newly entered, which is the difference between the maximum number of records and the number of existing records, increases. As a result, more records can be processed in the memory, so that the time required for the search process can be shortened.
- a record in which the value “true” is registered for all the conditional expression ID columns 410b to 410d is deleted at the timing when the value “true” is registered for all the conditional expression ID columns 410b to 410d.
- the presence or absence of such a record may be periodically checked, and the detected record may be deleted at the timing when such a record is detected.
- the logical expression processing unit 23 acquires the condition completion information from all the conditional expression processing units 22, the logical expression processing unit 23 determines that the process of reflecting the conditional expression matching information 301 in the logical expression determination table 26 has been completed. Then, the logical expression processing unit 23 outputs logical completion information indicating the completion of the processing of the logical expression processing unit 23 to the logical expression conformance information management unit 27 when all of its own processing is completed. This process will be described later.
- the logical formula conformity information management unit 27 is an area (for example, a buffer or a queue) where information is input / output in a FIFO format, for example, and is configured on a memory.
- the logical formula conformity information management unit 27 buffers logical formula conformance information 302 output from the logical formula processing unit 23.
- the logical expression conformance information 302 includes the record ID value of the record 401 whose logical operation result 410e is “true”. Note that the logical formula conformity information management unit 27 may notify the search result generation unit 24 when the logical formula conformance information 302 is buffered.
- the search result generation unit 24 acquires the logical formula conformance information 302 from the logical formula conformance information management unit 27 and, based on the record ID value included in the logical formula conformance information 302, retrieves a record having the record ID value from the table T1. Extract.
- FIG. 7A shows an example of a processing outline of the search result generation unit 24.
- the search result generation unit 24 acquires one logical formula matching information 302 from the logical formula matching information management unit 27, and extracts a record having the record ID value from the table T1.
- the search result generation unit 24 registers the record extracted from the table T1 (more precisely, information extracted from the record in the table T1) in the search result table 500.
- the search result generation unit 24 acquires the logical formula conformance information 302 having the record ID value “2” from the logical formula conformance information management unit 27. Then, the search result generation unit 24 extracts the record 101b having the record ID value “2” from the table T1. Then, the search result generation unit 24 registers the extracted record 101b in the search result table 500 (record 501a). The same processing is performed for the other logical formula matching information 302. Through the above processing, the search result generation unit 24 generates the search result table 500.
- conditional expression determination unit 21 needs to add a record corresponding to the record ID value included in the conditional expression conformance information 301 acquired from the conditional expression conformance information management unit 25 to the logical expression determination table 26.
- the conditional expression determination unit 21 registers the record ID value included in the information 301 in the record ID list 601 corresponding to the conditional expression ID value included in the conditional expression conformance information 301.
- FIG. 7B shows record ID lists 601a to 601c corresponding to the conditional expressions 201a to 201c, respectively.
- the record ID list 601 is composed of one or more entries. A record ID value is registered in the entry.
- the search result generation unit 24 causes the sort processing unit 28 to perform logical operation processing using the record ID lists 601a to 601c. Specifically, for example, the sort processing unit 28 performs a logical operation process according to the logical expression 202 based on whether or not the same record ID value exists in the lists 601a to 601c. At this time, for example, when the record ID value is acquired from the list 601a, “true” is adopted for the conditional expression 201a in the logical expression 202.
- the search result generation unit 24 extracts a record having a record value that matches the record ID value (record ID value corresponding to the logical expression 202) specified by the sort processing unit 28 from the table T1.
- the search result generation unit 24 generates a search result table 500 including a record extracted from the table T1 (more precisely, information extracted from the record of the index 100).
- the output data from the sort processing unit 28 may be the logical formula matching information 302. However, it does not matter what kind of processing the sort processing unit 28 generates the logical formula matching information 302.
- the sort processing unit 28 may generate the logical formula conformity information 302 based on the conventional method described with reference to FIG. 14, or the same method as the logical formula processing unit 23 described in the present embodiment. Based on this, the logical formula matching information 302 may be generated.
- FIG. 8 shows an example of the processing flow of the search query analysis unit 21.
- the search query analysis unit 21 acquires the search query 200 input from the terminal 3 (S11).
- the search query analysis unit 21 analyzes the acquired search query 200 and extracts the conditional expression 201 and the logical expression 202 (S12).
- the search query analysis unit 21 generates a logical expression determination table 26 on the memory based on the extracted conditional expression 201 and logical expression 202 (S13).
- the search query analysis unit 21 calculates the maximum number of entries based on the generated logical expression determination table 26 (S14).
- the search query analysis unit 21 activates the conditional expression processing unit 22 (S15) and ends the search query analysis processing.
- conditional expression processing unit 22 When there are a plurality of conditional expressions 201, the processing process of the conditional expression processing unit 22 may be activated for each conditional expression 201.
- conditional expression 201 and the logical expression 202 are extracted from the search query 200, and the conditional expression processing unit 22 is activated.
- FIG. 9 shows an example of the processing flow of the conditional expression processing unit 22.
- the conditional expression processing unit 22 extracts one entry to be determined by the conditional expression 201 (hereinafter referred to as “target entry”) from the index 100 corresponding to the conditional expression 201, and from the target entry, the conditional expression 201 A target column value (hereinafter referred to as “target column value”) is acquired (S21).
- the conditional expression processing unit 22 determines whether the target column value conforms to the conditional expression 201 (S22).
- conditional expression processing unit 22 sets the conditional expression ID 211 corresponding to the conditional expression 201 and the record ID value of the target entry as a set. 301 is generated, and the information 301 is output to the conditional expression conformity information management unit 25 (S23). Then, the process proceeds to step S24.
- conditional expression determination unit 22 proceeds to the process of step S24.
- the conditional expression determination unit 22 determines whether there is an undetermined record 101 in the index 100 (S24).
- conditional expression determination unit 22 sets one of the undetermined records 101 as the next target entry 101 (S25), and returns to the process of step S21.
- conditional expression determination unit 22 outputs the condition completion information to the conditional expression conformance information management unit 25 (S26), and ends the conditional expression processing.
- the logical expression processing unit 23 acquires the conditional expression conforming information 301 from the conditional expression conforming information management unit 25 (S31).
- the acquired conditional expression conformance information 301 is deleted from the conditional expression conformance information management unit 25.
- the logical expression processing unit 23 determines whether or not the record ID value exists in the “record ID” column 410a of the logical expression determination table 26 (S35).
- the logical expression processing unit 23 matches the logical expression including the record ID value of the record 401 whose logical operation result is “true”.
- the information 302 is generated, and the information 302 is output to the logical formula conformity information management unit 27 (S40). Then, the process proceeds to step S41.
- step S41 If the logical operation result remains “false” and there is no change, or “true” does not change (S39: NO), the logical expression processing unit 23 proceeds to the process of step S41 as it is.
- the logical expression processing unit 23 determines whether or not a new record 401 can be generated in the logical expression determination table 26 (S62). That is, the logical expression processing unit 23 determines whether or not the number of records existing in the logical expression determination table 26 (hereinafter referred to as “the number of existing records”) is smaller than the maximum number of records.
- the logical expression processing unit 23 When the new record 401 can be generated (S62: YES), that is, when the number of existing records is smaller than the maximum number of records, the logical expression processing unit 23 generates a new record 401 having the acquired record ID value, An entry is made in the logical expression determination table 26 (S63). At that time, the logical expression processing unit 23 increases the number of existing records (count value) by one. The logical expression processing unit 23 sets all the values in the “condition ID” column 410 of the new record 401 entered at this time to “false”. Then, the logical expression processing unit 23 proceeds to step S37 in FIG.
- FIG. 13 shows an example of the processing flow of the search result generation unit 24.
- the search result generation unit 27 determines whether or not the obtained logical formula conformity information 302 is logical completion information (S72).
- the search result generation unit 24 extracts a record ID value from the logical expression conformance information 302 (S77).
- a plurality of record ID lists 601 respectively corresponding to a plurality of conditional expressions 201 may be merged into one.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Automation & Control Theory (AREA)
- Probability & Statistics with Applications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (15)
- 複数の条件式の組み合わせで構成された論理式が記述されている検索クエリを解析することにより、前記検索クエリから前記論理式及び各条件式を特定する検索クエリ解析部と、
前記特定された各条件式について、前記条件式に適合するレコードのIDの値を抽出する条件式処理部と、
レコードIDの値と前記複数の条件式にそれぞれ対応する複数の適合結果値とを有する判定セットを含んだ情報である論理式判定情報内の、前記抽出したレコードID値及び前記条件式に対応する適合結果値を、適合を意味する第1の値に変更し、前記論理式判定情報における各判定セットについて、前記判定セットが有する複数の適合結果値を前記論理式に基づいて論理演算する第1の論理式処理部と、
前記論理演算の結果として適合を意味する第1の値が得られた判定セットが有するレコードID値に適合するレコードID値に対応するレコードを、前記検索クエリで指定されているテーブルから検索し、その検索の結果に関する検索結果情報を出力する検索結果生成部と
を備えるデータベース管理システム。 - 第2の論理式処理部をさらに備え、
前記論理式判定情報は、第1の記憶装置に格納されており、
前記テーブルは、第2の記憶装置に格納されており、
前記論理式処理部は、
前記抽出されたレコードID値が、前記論理式判定情報が有するいずれのレコードID値とも適合しない場合、前記論理式判定情報に新たな判定セットを追加できるか否かを判定し、
前記判定の結果が否定的な場合、前記条件式に対応するレコードID値として、前記抽出されたレコードID値を前記第2の記憶装置に格納し、
前記第2の論理式処理部は、前記第2の記憶装置に格納されているレコードID値が前記複数の条件式のいずれに対応するかを基に、そのレコードID値について、前記論理式の論理演算を実行し、
前記検索結果生成部は、前記第1の論理式処理部による前記論理演算の結果として適合を意味する第1の値が得られたレコードID値に対応するレコードと、前記第2の論理式処理部による前記論理演算の結果として適合を意味する第1の値が得られたレコードID値に対応するレコードとを、前記検索クエリで指定されているテーブルから検索し、その検索の結果に関する検索結果情報を出力する
請求項1記載のデータベース管理システム。 - 前記第1の論理式処理部は、前記判定の結果が肯定的な場合、前記抽出されたレコードID値を有する新たな判定セットを前記論理式判定テーブルに追加し、
前記論理式判定情報に新たな判定セットを追加できるか否かの判定は、前記論理式判定情報に含まれている判定セットの数が所定数以下か否かである
請求項2記載のデータベース管理システム。 - 前記第1の論理式処理部は、前記論理式判定情報において、前記複数の適合結果値の全てが前記第1の値である判定セットを前記論理式判定情報から削除する、
請求項3記載のデータベース管理システム。 - 前記第1の論理式処理部は、前記判定の結果が肯定的な場合、前記抽出されたレコードID値が前記第2の記憶装置に格納されていなければ、前記抽出されたレコードID値を有する新たな判定セットを前記論理式判定テーブルに追加し、前記第2の記憶装置に前記抽出されたレコードID値が前記記憶領域に格納されていれば、前記抽出されたレコードID値を前記第2の記憶装置に格納する、
請求項4記載のデータベース管理システム。 - 前記1の記憶装置は、前記第2の記憶装置よりもデータの入出力の速度が早い
請求項5記載のデータベース管理システム。 - 前記第1の論理式処理部は、前記判定の結果が肯定的な場合、前記抽出されたレコードID値が前記第2の記憶装置に格納されていなければ、前記抽出されたレコードID値を有する新たな判定セットを前記論理式判定テーブルに追加し、前記第2の記憶装置に前記抽出されたレコードID値が前記記憶領域に格納されていれば、前記抽出されたレコードID値を前記第2の記憶装置に格納する、
請求項2記載のデータベース管理システム。 - 前記第1の論理式処理部は、前記論理式判定情報において、前記複数の適合結果値の全てが前記第1の値である判定セットを前記論理式判定情報から削除する
請求項1記載のデータベース管理システム。 - 前記条件式処理部と前記第1の論理式処理部はそれぞれ独立したプロセスとして実行され、
前記条件式処理部が、前記条件式のIDと前記抽出されたレコードID値とを含んだ情報である条件式適合情報を、記憶領域に格納し、
前記第1の論理式処理部が、前記記憶領域から、前記条件式適合情報を取得し、その情報から、前記レコードID値を取得する
請求項1記載のデータベース管理システム。 - 前記クエリ解析部において抽出された条件式ごとに前記条件式処理部のプロセスが実行され、前記プロセスは並列に実行される
請求項1記載のデータベース管理システム。 - 前記論理式処理部は、
前記抽出されたレコードID値が、前記論理式判定情報が有するいずれのレコードID値とも適合しない場合、前記論理式判定情報に新たな判定セットを追加できるか否かを判定し、
前記判定の結果が肯定的な場合、前記抽出されたレコードID値を有する新たな判定セットを前記論理式判定テーブルに追加する、
請求項1記載のデータベース管理システム。 - 前記論理式判定情報に新たな判定セットを追加できるか否かの判定は、前記論理式判定情報に含まれている判定セットの数が所定数以下か否かである
請求項11記載のデータベース管理システム。 - 第2の記憶装置が、前記テーブルを記憶し、前記第2の記憶装置よりもデータの入出力の速度が早い第1の記憶装置が、前記論理式判定情報を記憶する、
請求項1記載のデータベース管理システム。 - 複数の条件式の組み合わせで構成された論理式が記述されている検索クエリを解析することにより、前記検索クエリから前記論理式及び各条件式を特定し、
前記特定された各条件式について、前記条件式に適合するレコードのIDの値を抽出し、
レコードIDの値と前記複数の条件式にそれぞれ対応する複数の適合結果値とを有する判定セットを含んだ情報である論理式判定情報内の、前記抽出したレコードID値及び前記条件式に対応する適合結果値を、適合を意味する第1の値に変更し、前記論理式判定情報における各判定セットについて、前記判定セットが有する複数の適合結果値を前記論理式に基づいて論理演算し、
前記論理演算の結果として適合を意味する第1の値が得られた判定セットが有するレコードID値に適合するレコードID値に対応するレコードを、前記検索クエリで指定されているテーブルから検索し、その検索の結果に関する検索結果情報を出力する、
データベース管理方法。 - 検索クエリを受け付けるインタフェース装置と、
第2の記憶装置よりもデータ入出力速度が速い第1の記憶装置と、
前記インタフェース装置及び前記第1の記憶装置に接続されたプロセッサと
を有し、
前記プロセッサが、
複数の条件式の組み合わせで構成された論理式が記述されている検索クエリを解析することにより、前記検索クエリから前記論理式及び各条件式を特定し、
前記特定された各条件式について、前記条件式に適合するレコードのIDの値を抽出し、
レコードIDの値と前記複数の条件式にそれぞれ対応する複数の適合結果値とを有する判定セットを含んだ情報であり前記第1の記憶装置に格納された論理式判定情報内の、前記抽出したレコードID値及び前記条件式に対応する適合結果値を、適合を意味する第1の値に変更し、前記論理式判定情報における各判定セットについて、前記判定セットが有する複数の適合結果値を前記論理式に基づいて論理演算し、
前記論理演算の結果として適合を意味する第1の値が得られた判定セットが有するレコードID値に適合するレコードID値に対応するレコードを、前記検索クエリで指定されており前記第2の記憶装置内のテーブルから検索し、その検索の結果に関する検索結果情報を出力する、
データベース管理装置。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2011/062774 WO2012164738A1 (ja) | 2011-06-03 | 2011-06-03 | データベース管理システム、装置及び方法 |
US14/006,233 US9213759B2 (en) | 2011-06-03 | 2011-06-03 | System, apparatus, and method for executing a query including boolean and conditional expressions |
JP2013517790A JP5686893B2 (ja) | 2011-06-03 | 2011-06-03 | データベース管理システム、装置及び方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2011/062774 WO2012164738A1 (ja) | 2011-06-03 | 2011-06-03 | データベース管理システム、装置及び方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2012164738A1 true WO2012164738A1 (ja) | 2012-12-06 |
Family
ID=47258623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2011/062774 WO2012164738A1 (ja) | 2011-06-03 | 2011-06-03 | データベース管理システム、装置及び方法 |
Country Status (3)
Country | Link |
---|---|
US (1) | US9213759B2 (ja) |
JP (1) | JP5686893B2 (ja) |
WO (1) | WO2012164738A1 (ja) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014168199A1 (ja) * | 2013-04-12 | 2014-10-16 | 株式会社ターボデータラボラトリー | 論理演算方法および情報処理装置 |
JP2014228894A (ja) * | 2013-05-17 | 2014-12-08 | 富士通株式会社 | データ抽出プログラム、データ抽出方法およびデータ抽出装置 |
CN107742239A (zh) * | 2017-09-30 | 2018-02-27 | 华为技术有限公司 | 一种条件表达式的配置方法及装置 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6366033B2 (ja) * | 2014-05-09 | 2018-08-01 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | プログラム中のif文の最適化方法 |
US10769696B2 (en) * | 2015-10-30 | 2020-09-08 | Oracle International Corporation | Ecommerce system with evaluation of Boolean expression sets |
CN110968744B (zh) * | 2018-09-30 | 2023-09-05 | 中国移动通信有限公司研究院 | 一种资源查询方法及装置、设备、存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62159222A (ja) * | 1986-01-07 | 1987-07-15 | Nec Corp | デ−タ検索方式 |
JPH02178876A (ja) * | 1988-12-29 | 1990-07-11 | Ricoh Co Ltd | データ検索方式 |
JPH0452967A (ja) * | 1990-06-20 | 1992-02-20 | Nec Corp | 集合ファイルに対する論理積演算処理方式 |
JPH05174063A (ja) * | 1991-12-26 | 1993-07-13 | Hitachi Ltd | 情報検索装置及びその検索方法 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6081799A (en) * | 1999-05-05 | 2000-06-27 | International Business Machines Corporation | Executing complex SQL queries using index screening for conjunct or disjunct index operations |
US8688682B2 (en) * | 2007-03-23 | 2014-04-01 | International Business Machines Corporation | Query expression evaluation using sample based projected selectivity |
-
2011
- 2011-06-03 US US14/006,233 patent/US9213759B2/en not_active Expired - Fee Related
- 2011-06-03 WO PCT/JP2011/062774 patent/WO2012164738A1/ja active Application Filing
- 2011-06-03 JP JP2013517790A patent/JP5686893B2/ja active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62159222A (ja) * | 1986-01-07 | 1987-07-15 | Nec Corp | デ−タ検索方式 |
JPH02178876A (ja) * | 1988-12-29 | 1990-07-11 | Ricoh Co Ltd | データ検索方式 |
JPH0452967A (ja) * | 1990-06-20 | 1992-02-20 | Nec Corp | 集合ファイルに対する論理積演算処理方式 |
JPH05174063A (ja) * | 1991-12-26 | 1993-07-13 | Hitachi Ltd | 情報検索装置及びその検索方法 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014168199A1 (ja) * | 2013-04-12 | 2014-10-16 | 株式会社ターボデータラボラトリー | 論理演算方法および情報処理装置 |
JPWO2014168199A1 (ja) * | 2013-04-12 | 2017-02-16 | 株式会社ターボデータラボラトリー | 論理演算方法および情報処理装置 |
JP2014228894A (ja) * | 2013-05-17 | 2014-12-08 | 富士通株式会社 | データ抽出プログラム、データ抽出方法およびデータ抽出装置 |
US9619516B2 (en) | 2013-05-17 | 2017-04-11 | Fujitsu Limited | Computer-readable recording medium, data extraction method, and data extraction device |
CN107742239A (zh) * | 2017-09-30 | 2018-02-27 | 华为技术有限公司 | 一种条件表达式的配置方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
US20140012879A1 (en) | 2014-01-09 |
US9213759B2 (en) | 2015-12-15 |
JPWO2012164738A1 (ja) | 2014-07-31 |
JP5686893B2 (ja) | 2015-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9411840B2 (en) | Scalable data structures | |
JP6998928B2 (ja) | データを記憶およびクエリするための方法、装置、設備、および媒体 | |
WO2022121171A1 (zh) | 相似文本匹配方法、装置、电子设备及计算机存储介质 | |
CN111258966A (zh) | 一种数据去重方法、装置、设备及存储介质 | |
JP5686893B2 (ja) | データベース管理システム、装置及び方法 | |
US20100030801A1 (en) | Table classification device, table classification method, and table classification program | |
US20220342950A1 (en) | System and method for searching based on text blocks and associated search operators | |
JP6751064B2 (ja) | データ検索システム、データ検索方法、及びプログラム | |
CN105989015B (zh) | 一种数据库扩容方法和装置以及访问数据库的方法和装置 | |
US11030172B2 (en) | Database archiving method and device for creating index information and method and device of retrieving archived database including index information | |
US20230109772A1 (en) | System and method for value based region searching and associated search operators | |
CN110168532A (zh) | 数据更新方法和存储装置 | |
KR102415962B1 (ko) | 스토리지 시스템 및 그것의 동작 방법 | |
WO2017020735A1 (zh) | 一种数据处理方法、备份服务器及存储系统 | |
KR101806394B1 (ko) | 모바일 dbms환경에서 트랜잭션에 특화된 색인 캐시의 구조를 갖는 데이터 처리 방법 | |
US10437806B2 (en) | Database management method and information processing apparatus | |
US10019483B2 (en) | Search system and search method | |
CN112328630B (zh) | 数据查询方法、装置、设备及存储介质 | |
US8775746B2 (en) | Information processing system and method | |
JP6666312B2 (ja) | 多次元データ管理システム及び多次元データ管理方法 | |
JP6627809B2 (ja) | データベース処理装置、システム、方法およびプログラム | |
KR101311409B1 (ko) | 부분적인 인덱스 rid 정렬을 통한 파티션 스캔 방법 및 장치, 메모리 시스템, 및 데이터 정렬 방법 | |
JP2021174079A (ja) | データ管理システムおよびデータ管理方法 | |
CN113407462A (zh) | 一种数据处理的方法、装置、电子设备及介质 | |
CN117112590A (zh) | 一种生成结构性查询语言的方法和数据查询设备 |
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: 11866831 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2013517790 Country of ref document: JP Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 14006233 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: 11866831 Country of ref document: EP Kind code of ref document: A1 |