WO2015011797A1 - Système de base de données, procédé de gestion de base de données et support de stockage - Google Patents

Système de base de données, procédé de gestion de base de données et support de stockage Download PDF

Info

Publication number
WO2015011797A1
WO2015011797A1 PCT/JP2013/070024 JP2013070024W WO2015011797A1 WO 2015011797 A1 WO2015011797 A1 WO 2015011797A1 JP 2013070024 W JP2013070024 W JP 2013070024W WO 2015011797 A1 WO2015011797 A1 WO 2015011797A1
Authority
WO
WIPO (PCT)
Prior art keywords
statement
query processing
processing
contracted
query
Prior art date
Application number
PCT/JP2013/070024
Other languages
English (en)
Japanese (ja)
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/070024 priority Critical patent/WO2015011797A1/fr
Publication of WO2015011797A1 publication Critical patent/WO2015011797A1/fr

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/24Querying
    • G06F16/245Query processing

Definitions

  • the present invention relates to a tabular database system that efficiently executes query processing using SQL.
  • Patent Document 1 discloses a mechanism for realizing a partial materialized view in which the size of a materialized view (materialized view) can be changed.
  • a technique for generating a view definition of a partially materialized view in the field of database systems is disclosed.
  • the query specifies the maximum content of the view, ie the complete set of records that can be materialized.
  • One or more control predicates and the contents of one or more control tables limit what records are actually materialized and stored in the view. This allows the content of the partially materialized view to be adjusted simply by updating one or more control tables.
  • Patent Document 2 describes a mechanism for rewriting a query processing statement so as to use an appropriate materialized view and realizing more efficient query processing execution based on the execution cost of the query processing.
  • the present invention not only the values included in the table to be processed are narrowed down like an index in a conventional database system, but also a reduced table that can be narrowed down according to the rough join relationship between the tables.
  • a database system capable of executing efficient query processing without assuming the content of query processing in advance.
  • the present invention is a database system that manages a processing target table stored in a storage by a computer including a processor, a memory, and a storage, and that includes a query processing statement receiving unit that receives a query processing statement, and the received query processing In accordance with the statement, execute a query process on the processing target table stored in the storage, and output a result of the query process and a query process execution unit that accepts the contract table creation setting, and the contract table creation setting And a contracted table creating unit for generating a contracted table from the processing target table.
  • FIG. 6 is a first half of a flowchart illustrating an example of processing performed in the database system according to the first embodiment of this invention and including a contracted table management unit, a query processing statement receiving unit, and a query processing execution unit. It is a latter half part of the flowchart which shows a 1st Example of this invention and shows an example of the process performed in the database system containing a reduction table management part, an inquiry process sentence reception part, and an inquiry process execution part. It is a flowchart which shows a 1st Example of this invention and shows an example of a process of the reduction table preparation part whole.
  • FIG. 6 is a first half of a flowchart illustrating an example of processing performed in the database system according to the first embodiment of this invention and including a contracted table management unit, a query processing statement receiving unit, and a query processing execution unit. It is a latter half part of the flowchart which shows a 1st Example of this invention and shows an example of the process performed in the database system containing a reduction table management part,
  • FIG. 6 is a first half of a flowchart illustrating an example of processing in which the contraction table creation unit creates an intermediate contraction table according to the first embodiment of this invention.
  • FIG. 5 is a second half of a flowchart illustrating an example of processing in which the contraction table creation unit creates an intermediate contraction table according to the first embodiment of this invention.
  • 6 is a flowchart illustrating an example of processing in which the contraction table creation unit creates a primary contraction table according to the first embodiment of this invention. It is a flowchart which shows a 1st Example of this invention and shows an example of the process which produces the secondary reduction table of the reduction table preparation part.
  • FIG. 2 shows a first embodiment of the present invention and is an example of an initial contraction table in the present embodiment.
  • 1 shows an example of an intermediate contraction table according to the first embodiment of the present invention.
  • FIG. 2 shows a first embodiment of the present invention and is an example of a primary contraction table.
  • 1 shows a first embodiment of the present invention and is an example of a secondary reduction table.
  • 1 shows a first embodiment of the present invention and is an example of a contraction table.
  • It is a flowchart which shows a 1st Example of this invention and shows an example of the process in which a contracted query process sentence production
  • 7 is a flowchart illustrating an example of processing in which a detailed query processing statement generation unit generates a detailed query processing statement from a contracted query processing statement, a processing result, and an external query processing statement according to the first embodiment of this invention.
  • the 1st Example of this invention is shown and it is an example of the external inquiry process sentence which an inquiry process sentence reception part receives.
  • FIG. 3 shows a first embodiment of the present invention and is an example of a contracted query processing statement generated by a contracted query processing statement generation unit.
  • FIG. 5 shows an example of a detailed query processing statement generated by a detailed query processing statement generation unit according to the first embodiment of this invention.
  • FIG. 5 shows the first embodiment of the present invention, and is an example of a reduction table creation setting set by a reduction table creation setting reception unit. It is a figure which shows the 1st Example of this invention and shows an example of an inquiry process.
  • It is a block diagram which shows the 2nd Example of this invention and shows an example of a structure of a database system.
  • It is a block diagram which shows the 3rd Example of this invention and shows an example of a structure of a database system.
  • FIG. 1 is an example of a configuration diagram of the database system of this embodiment.
  • the database system 100 in this embodiment includes a program storage memory 101, an external network adapter 102, a processor 103, a data storage memory 104, a storage medium 105, and an internal network (or interconnect or bus) 106.
  • the program storage memory 101 holds a contract table management unit 111, a query processing statement receiving unit 121, and a query processing execution unit 131.
  • the reduction table management unit 111 includes a reduction table creation setting reception unit 112, a reduction table size estimation unit 113, and a reduction table creation unit 114.
  • the contracted table management unit 111, the query processing statement reception unit 121, and the query processing execution unit 131 constitute a so-called database management system (DBMS).
  • DBMS database management system
  • the query processing statement reception unit 121 includes an external query processing statement reception / result response unit 122, a query processing statement conversion unit 123, a contracted query processing statement generation unit 124, and a contracted query processing statement transmission / result reception unit 125.
  • the inquiry processing execution unit 131 includes an inquiry processing statement reception / result response unit 132 and an inquiry processing statement execution unit 133.
  • the program storage memory 101 stores a program executed by the processor 103 and information necessary for executing the program.
  • the contract table management unit 111, the query processing statement reception unit 121, and the query processing execution unit 131 are stored as programs to be executed by the processor 103.
  • an example is shown in which the program storage memory 101 and the data storage memory 104 are divided. However, although not shown, a single memory or storage area may be used.
  • the external network adapter 102 is connected to the external network 160, connects the database system 100 to an input / output terminal device (not shown) operated by a user of an external computer (not shown), and inputs from the external computer.
  • the reduced table creation settings and external query processing statements are input to the database system 100 and processing results are output.
  • the external query processing statement indicates a query processing statement received from an external computer (not shown).
  • the processor 103 executes various processes by executing a program stored in the program storage memory 101.
  • the processor 103 operates as a functional unit that realizes a predetermined function by executing processing according to each program.
  • the processor 103 functions as the contracted table creating unit 114 by performing processing according to the contracted table creating program.
  • the processor 103 also operates as a function unit that provides each function of a plurality of processes executed by each program.
  • a computer and a computer system are an apparatus and a system including these functional units.
  • a storage subsystem 105 such as a storage subsystem, a nonvolatile semiconductor memory, a hard disk drive, a storage device such as an SSD (Solid State Drive), an IC card, It can be stored in a computer-readable non-transitory data storage medium such as an SD card or DVD.
  • the data storage memory 104 stores information that the database system 100 refers to when executing the query process, for example, the contract table 141.
  • the storage medium 105 constitutes a storage subsystem accessible from the processor 103 via the interface 107.
  • the storage medium 105 stores information to be referred to when the database system 100 executes an inquiry process (detailed inquiry), for example, a process target table 151.
  • the internal network 106 connects the program storage memory 101, the external network adapter 102, the processor 103, the data storage memory 104, and the interface 107 to each other.
  • the interface 107 can be configured by, for example, a host bus adapter.
  • the reduction table creation setting reception unit 112 receives a reduction table creation setting such as an upper limit value of the size of the reduction table 141 created by the reduction table creation unit 114.
  • the upper limit value of the size of the reduction table 141 indicates the maximum value of the storage area that can be allocated to the reduction table 141 in the data storage memory 104.
  • the data storage memory 104 is not limited only to the main memory, and may be a storage area that extends over the main memory and the auxiliary storage device (for example, SSD). Further, the upper limit value of the size of the reduction table 141 may be the maximum value of the number of data in addition to the maximum value of the storage area.
  • the contracted table creation setting reception unit 112 may be output to an external computer console or a management terminal console as an interface for receiving parameters related to the creation of the contracted table 141.
  • the contracted table size estimating unit 113 estimates the size of the contracted table 141 created by the contracted table creating unit 114.
  • the contracted table creation unit 114 for example, from the contents of the processing target table 151 stored in the storage medium 105, the contracted table creation setting received by the contracted table creation setting reception unit 112, or the contracted table.
  • the contraction table 141 is created while referring to the contraction table size estimated by the size estimation unit 113.
  • the contraction table creation unit 114 stores the created contraction table 141 in the data storage memory 104, for example.
  • the external query processing statement reception / result response unit 122 receives an external query processing statement from an external computer (not shown), transmits the external query processing statement 1601 to the query processing statement conversion unit 123, and returns the returned external query processing.
  • the processing result for the statement 1601 is returned to the external computer.
  • the reduced query processing statement generation unit 124 refers to the external query processing statement received from the external query processing statement reception / response unit 122 and generates a reduced query processing statement. Then, the contracted query processing statement generation unit 124 transmits the generated contracted query processing statement to the contracted query statement transmission / result reception unit 125.
  • the contracted query statement transmission / result reception unit 125 transmits the received contracted query processing statement to the query processing statement reception / result response unit 132 of the query processing execution unit 131.
  • the query processing statement reception / result response unit 132 processes the contracted query processing statement as described later, and then transmits the processing result of the returned contracted query processing statement to the detailed query processing statement generator 126.
  • the detailed query processing statement generation unit 126 refers to the processing result of the reduced query processing statement transmitted from the detailed query processing statement transmission / result reception unit 125 and the external query processing statement, and generates a detailed query processing statement. Generate. Then, the detailed query processing statement generating unit 126 transmits the generated detailed query processing statement to the detailed query transmitting / result receiving unit 127. The detailed query statement transmission / result reception unit 127 transmits the received detailed query processing statement to the query processing statement reception / result response unit 132, and after processing, the processing result of the detailed query processing statement returned is the external query. The processed sentence reception / result response unit 122 transmits it.
  • the query processing statement reception / result response unit 132 receives the contracted query processing statement or the detailed query processing statement from the contracted query processing statement transmission / result reception unit 125 or the detailed query processing statement transmission / result reception unit 127. Is transmitted to the query processing statement execution unit 133. Then, the processing result of the query processing statement returned by the query processing statement execution unit 133 is returned to the contracted query processing statement transmission / result reception unit 125 or the detailed query processing statement transmission / result reception unit 127, respectively.
  • the query processing statement execution unit 133 performs query processing for the contraction table 141 and the processing target table 151 according to the query processing statement transmitted from the query processing statement reception / result response unit 132 as described later.
  • the execution result is returned to the inquiry processing statement reception / result response unit 132.
  • the query processing statement received by the query processing statement reception / result response unit 132 is described as a SQL statement used in a known or well-known database management system.
  • the description syntax of the SQL sentence is disclosed in SQL99 established by ISO (International Organization for Standardization) / IEC (International Electrotechnical Commission) in 1999. However, it is assumed that the SQL statement in this embodiment is extended by one point.
  • the column type in the SQL statement has been extended with respect to the set type ( ⁇ ei ⁇ ) and the list type ( ⁇ ei>). If both sides of the equality condition are set types, or both sides are list types, they are equivalent as a set (the number of elements in the set matches the content), or equivalence as a list (in the list It is determined whether or not the number, order, and contents of the included elements match.
  • the right side is a set type or a list type, it is possible to determine whether or not the left side element is included in the right side set or list by an IN predicate.
  • the processing target table 151 shown in FIG. 8 expresses the relationship between classes taken by professors and students at a certain university.
  • the processing target table 151 includes two tables, a processing target table P and a processing target table S, is shown.
  • an external query processing statement 1601 shown in FIG. 16 is a query processing for selecting names of students who have taken lectures from both a professor belonging to the “Biology” department and a professor belonging to the “Computer” department. This is a query processing statement when instructed by an SQL statement.
  • 2A and 2B are flowcharts illustrating an example of processing performed in the database system 100 including the contracted table management unit 111, the query processing statement receiving unit 121, and the query processing execution unit 131.
  • the contracted table creation setting accepting unit 112 of the contracted table management unit 111 accepts a contracted table creation setting 1900 (see FIG. 19) set by the user from an external computer (see FIG. 19). 201).
  • the contracted table creation setting 1900 specifies an upper limit value (CTmax) 1901 of the contracted table size, a target table set and various column designations 1902, and a set of joined column pairs (JS) 1903.
  • the target table set and various column designations 1902 include a processing target table set ( ⁇ Ti ⁇ ), an identification column (ICi) of each table (Ti), a join column (JCi), and a condition column (CCi).
  • i represents a natural number.
  • each column may be designated by a set of a plurality of columns instead of a single column.
  • a plurality of column sets are designated, it can be handled without losing generality by regarding a plurality of column sets as one column.
  • duplication may occur between each of the above columns, but if duplication occurs, copy the overlapping columns and consider that there are duplicate columns with the same value. It is possible to cope without damaging the process.
  • a preset value type such as the number of values and memory usage can be used.
  • the contraction table creation unit 114 creates a contraction table (Ti_con) 141 based on the upper limit value 1901 of the contraction table size specified in the contraction table creation setting 1900. Details of the contraction table creation processing will be described in FIG. 3 and subsequent steps (202).
  • the query processing statement receiving unit 121 receives an external query processing statement (Q) 1601 from an external computer (203).
  • the external query processing statement reception / response unit 122 of the query processing statement receiving unit 121 ends the entire processing when the received external query processing statement 1601 is an instruction to end the entire processing, but otherwise,
  • the external query processing statement 1601 is transmitted to the query processing statement conversion unit 123 (204).
  • the contracted query processing statement generation unit 124 of the query processing statement conversion unit 123 generates a contracted query processing statement (Qc) 1701 (see FIG. 17) from the transmitted external query processing statement (Q) 1601. Details of the contracted query processing statement generation processing will be described in detail with reference to FIG. 14 (205).
  • the contracted query processing statement transmission / result receiving unit 125 transmits the generated contracted query processing statement 1701 to the query processing execution unit 131.
  • the query processing execution unit 131 executes the contracted query processing that has been transmitted, and returns a processing result to the contracted query processing statement transmission / result receiving unit 125.
  • the contracted query processing statement transmission / result receiving unit 125 transmits the processing result (QcR) of the contracted query processing statement 1701 to the detailed query processing statement generation unit 126 (206).
  • the detailed query processing statement generating unit 126 generates a detailed query processing statement (Qd) 1801 (see FIG. 18) from the execution result (QcR) of the transmitted reduced query processing statement 1701 and the external query processing statement 1601. Details of the detailed query processing statement generation processing will be described in detail with reference to FIG. 15 (207).
  • the detailed query processing statement transmission / result reception unit 127 transmits the generated detailed query processing statement 1801 to the query processing execution unit 131, and the query processing execution unit 131 executes the transmitted detailed query processing statement 1801 to obtain the processing result.
  • the detailed inquiry processing statement transmission / result reception unit 127 transmits the processing result (QdR) of the detailed query processing statement 1801 to the external query processing statement reception / result response unit 122 (208).
  • the external query processing statement reception / result response unit 122 responds to the external computer with the processing result (QdR) of the received detailed query processing statement 1801 as the processing result of the external query processing statement 1601, and returns to step 203 (209).
  • the database system 100 of the present invention generates a contraction table 141 in which the process target table 151 is contracted in advance based on the received contraction table creation setting 1900.
  • the database system 100 generates a contraction table 141 in advance, and then receives an external query processing statement 1601 from an external computer, and converts the external query processing statement 1601 into a contraction query process for the contraction table 141. It is converted into a sentence 1701.
  • the database system 100 executes the reduced query processing statement 1701 on the reduced table 141, and generates a detailed query processed statement 1801 that narrows down the search range of the processing target table 151 from the processing result for the reduced table 141.
  • the database system 100 executes a detailed query processing statement 1801 with a narrowed range for the processing target table 151. Thereafter, the database system 100 repeats the above steps 203 to 209 each time a new external query processing statement 1601 is received, narrows down the search range of the processing target table 151 using the preliminarily created contraction table 141, and then processes the processing target table. Access to 151 is executed.
  • FIG. 3 is a flowchart for explaining the details of the contracted table creation process of the contracted table creating unit 114.
  • the contraction table creation unit 114 generates an intermediate contraction table Tn_m (1001) via the initial contraction table Ti_h (900) created from the table Ti included in the processing target table ( ⁇ Ti ⁇ ) 151 (here N represents the number of tables included in the processing target table ⁇ Ti ⁇ 151) (301).
  • the contraction table creation unit 114 generates a primary contraction table Ti_con0 (1100 in FIG. 11) from the intermediate contraction table Tn_m (1001) for all the tables Ti included in the processing target table ⁇ Ti ⁇ 151 ( 302).
  • the contraction table creation unit 114 generates a secondary contraction table Ti_con1 (1200 in FIG. 12) from the primary contraction table Ti_con0 for all the tables Ti included in the processing target table ⁇ Ti ⁇ 151 (303). .
  • the contraction table creation unit 114 in FIG. 12 uses the secondary contraction table T1_con1 (1201) and the secondary contraction table T2_con1 ( 1202).
  • the contract table creation unit 114 further generates a contract table Ti_con (141) from the secondary contract table Ti_con1 (1200) for all the tables Ti included in the processing target table ⁇ Ti ⁇ 151, and The creation is completed (304).
  • steps 301, 302, 303, and 304 Details of the processing of steps 301, 302, 303, and 304 will be described with reference to FIGS. 4A, 4B, 5, 6, 7A, and 7B, respectively.
  • 4A and 4B are flowcharts illustrating an example of processing in which the contraction table creation unit 114 creates the intermediate contraction table 1001.
  • the contracted table creating unit 114 generates a table relation graph TG having a table Ti of the processing target table 151 as a node and a pair of joined columns ⁇ JCi, JCj> as an edge (401).
  • the contracted table creation unit 114 selects a subset JSS ⁇ JS of pairs of join columns, and generates a spanning tree QST that connects all the tables included in the table relation graph TG. (402).
  • a procedure for forming a known or publicly known minimum spanning tree (for example, a Kruskal method which is a kind of greedy method) may be used. That is, as shown in FIG. 19, with respect to the join column pair ⁇ JCi, JCj> included in the join column pair set JS (1903), the subscripts of the tables Ti and Tj to be joined are lexicographically ordered. And a spanning tree can be generated according to the lexicographic order, for example, using the Kruskal method.
  • the contraction table creation unit 114 determines the table join order ⁇ Ti> in the generated spanning tree QST (403). That is, in the table relation graph TG, the first combination column pair may be selected from JS in a predetermined order, and the next connection destination may be selected from the combination column pair adjacent to the node.
  • the predetermined order may be a preset order, for example, selecting from the first column in order.
  • the table relation graph TG is composed of two nodes of the tables T1 and T2 and one edge of ⁇ JC1, JC2>. Since the table relation graph TG does not include a loop, the table relation graph TG forms the spanning tree QST as it is.
  • the contracted table size estimation unit 113 estimates the number of records in the result table when the tables are joined in the join order determined in step 403 (404).
  • the numbers of records in the processing target tables T1 (P table) and T2 (S table) are 4 and 12, respectively, as shown in FIG.
  • the number of records is estimated to be 48.
  • the reduction table size estimation unit 113 applies a hash function to the value of the condition column (CCi), and the size of the reduction table 141 calculated based on the number of combinations of values after the hash application is the upper limit of the reduction table size.
  • the hash function is adjusted so that the value (CTmax) is 1901 or less (405).
  • a hash function used in the present embodiment a general hash function that does not store the magnitude relationship between the argument value and the inter-value value, and a hash function (value correspondence table) that preserves the magnitude relationship between the argument value and the inter-value value can be considered.
  • the value of the condition column CC1 of the processing target table T1 is associated with ⁇ "Biology"-> H1, "Computer”-> H2 ⁇ , and the value of the condition column CC2 of the processing target table T2 is set to ⁇ "G1
  • a hash function or value correspondence table corresponding to “,“ G2 ”,“ G3 ”,“ G4 ”-> H3 ⁇ is used.
  • the contraction table creation unit 114 applies the adjusted hash function to the condition column (CC1) of each record constituting the table T1 in the first table (T1) in the table join order.
  • the value obtained as a result of application is added as a hash column (HC1) as shown in FIG.
  • the contraction table creation unit 114 projects only the identification column (IC1), hash column (HC1), and join column (JC1) from the table after addition, and as shown in FIG. 9, the initial contraction table T1_h (901). Is generated. Further, T1_h (901) generated above is set as the first intermediate contraction table T1_m (406 in FIG. 4B).
  • the contraction table creation unit 114 follows the table join order ⁇ Ti> in the spanning tree QST, sets the first table as T1, takes out the table in order from T2, and sets it as the table Ti, from step 407 to step 409 in FIG. 4B. This process is repeated (407).
  • the contraction table creation unit 114 adds a column (HCi) to which the hash function adjusted in step 406 is applied to the condition column (CCi) of the table Ti.
  • the contraction table creation unit 114 projects only the identification column (ICi), the hash column (HCi), and the join column (JCi), and the initial contraction table Ti_h ( 900).
  • the contraction table creation unit 114 generates the intermediate contraction table Tn_m1001 when the generation of the initial contraction table 900 and the connection to the intermediate contraction table 1001 are completed for all the tables Ti according to the table join order ⁇ Ti>. Is finished (409).
  • initial contraction tables T1_h (901) and T2_h (902) shown in FIG. 9 are generated.
  • the intermediate contraction table T2_m1001 shown in FIG. 10 is obtained by combining these according to the value of the combination column.
  • the column 1002 is configured with the value of the Name column 801 of the P table in FIG. 8
  • the column 1003 is configured with the value of the Class column 802 of the P table
  • the column 1004 is illustrated in FIG. 8 is configured with the value of the hash column HC1 of the initial contraction table T1_h (901)
  • the column 1005 is configured with the value of the Name column 811 of the S table in FIG. 8
  • the column 1006 is configured with the value of the Class column 812 of the S table.
  • the column 1007 is configured with the value of the hash column HC2 in the initial contraction table T2_h (902) of FIG.
  • FIG. 5 is a flowchart for explaining an example of processing in which the contraction table creation unit 114 creates a primary contraction table.
  • the contraction table creation unit 114 repeats the processing from step 501 to step 506 for all the tables Ti according to the table join order ⁇ Ti> determined in step 403 of FIG. 4A (501).
  • the contraction table creation unit 114 uses the identification column (ICi) as the first column type as the initial value of the primary contraction table Ti_con0 (1100) shown in FIG. 11, and sets of hash columns ⁇ HC1,. . , HCn> as an element, an empty table having the second column type is assigned (503).
  • the contraction table creation unit 114 adds the second column of the record to the set of the second column.
  • the record r is added to the primary contraction table Ti_con0 (505).
  • the contraction table creation unit 114 ends the generation of the primary contraction table 1100 when the generation of the primary contraction table Ti_con0 (1100) is completed for all the tables Ti according to the table join order ⁇ Ti> (507). .
  • the primary contraction table T1_con0 shown in FIG. 11 is applied to the intermediate contraction table T2_m1001 shown in FIG. 10 by applying Steps 501 to 506 regarding the processing target tables T1 and T2. (1101), T2_con0 (1102) is obtained.
  • the column 1103 is configured with the values of the Name column 801 of the P table of FIG. 8, and the column 1104 is the contraction of the values of the columns 1004 and 1007 of the intermediate contraction table 1001 of FIG. Consists of reduced hash lists.
  • the column 1105 is configured with the values of the Name column 811 of the S table of FIG. 8, and the column 1106 is contracted with the values of the columns 1004 and 1007 of the intermediate contraction table 1001 of FIG. Consists of reduced hash lists.
  • FIG. 6 is a flowchart for explaining an example of processing in which the contraction table creation unit 114 creates a secondary contraction table.
  • the contracted table creating unit 114 repeats the processing from step 601 to step 606 for all the tables Ti in accordance with the table join order ⁇ Ti> determined in step 403 of FIG. 4A (601).
  • the contraction table creation unit 114 uses a set of hash columns ⁇ HC1,... As an initial value of the secondary contraction table Ti_con1 (1200). . , HCn> as a first column type, and an empty table is assigned as a second column type as a set having an identification column (ICi) as an element (603).
  • the contraction table creation unit 114 sets the second column of the record. If there is no element equal to the first element, the record r is added to the secondary contraction table Ti_con1 (1200) (605).
  • the contraction table creation unit 114 ends the generation of the secondary contraction table when the generation of the secondary contraction table Ti_con1 is completed for all the tables Ti according to the table join order ⁇ Ti> (607).
  • step 601 to step 606 relating to the processing target tables T1 and T2 is applied to each of the primary contraction tables T1_con0 (1101) and T2_con0 (1102) shown in FIG.
  • the secondary contraction tables T1_con1 (1201) and T2_con1 (1202) shown in FIG. 12 are obtained.
  • the column 1203 is configured with the values of the column 1104 of the primary reduction table 1101 of FIG. 11, and the column 1204 is the column of the primary reduction table 1101 with the same hash list of the column 1203. 1103.
  • the column 1205 is configured with the values of the column 1106 of the primary reduction table 1102 of FIG. 11, and the column 1206 is a primary reduction table in which the hash list of the column 1205 is equal. 1102 column 1105 values.
  • FIG. 7A and 7B are flowcharts for explaining an example of processing in which the contraction table creation unit 114 creates the contraction table 141.
  • the contraction table creation unit 114 repeats the processing from step 701 to step 708 for all the tables Ti in accordance with the table join order ⁇ Ti> determined in step 403 of FIG. 4A (701).
  • the contracted table creating unit 114 uses a set of hash columns ⁇ HC1,... As an initial value of the contracted table Ti_con (1200). . , HCn> is assigned to the first column type, and an empty table having a set having the identification column (ICi) as an element is assigned to the second column type (703).
  • the contraction table creation unit 114 performs the processing from step 705 to step 707 for all the hash column pairs ⁇ HCi> included in the set for the set having the hash column set as the first column element of the record r as an element. The process is repeated (705).
  • the contraction table creation unit 114 generates a new record having the set ⁇ HCi> of the step 705 hash column as the first element and the value of the second column of the record r as the second element. It is added to Ti_con (141) (706 in FIG. 7B).
  • the contracted table creating unit 114 ends the generation of the contracted table when the generation of the contracted table Ti_con (141) is completed for all the tables Ti in accordance with the above-mentioned table join order ⁇ Ti> (709).
  • step 701 to step 708 related to the processing target tables T1 and T2 (151) is performed for each of the secondary contraction tables T1_con1 (1201) and T2_con1 (1202) shown in FIG.
  • the reduction tables T1_con (141-1) and T2_con (141-2) shown in FIG. 13 are obtained.
  • the column 1411 is composed of the values of the column 1203 of the secondary contraction table 1201 of FIG. 12, and the column 1412 is composed of the list of the column 1204 of the secondary contraction table.
  • the contract table S_con (141-2) is divided into records for each group when the column 1421 includes a plurality of groups in the column 1205 of the secondary contract table 1202 in FIG.
  • the column 1422 is also divided into records for each set when the list of the column 1206 of the secondary contraction table 1202 is a plurality of sets, but in the example shown in the figure, since it is one set (SAX1, SBY1), it is divided into a plurality of records. Does not split.
  • the contraction table creation unit 114 includes the contraction table P_con141-1 and the contraction table S_con141-2, which are obtained by compressing these using the hash function from the P table and the S table constituting the processing target table 151.
  • a table 141 is generated.
  • the contraction table 141 functions as a table that summarizes the contents of the processing target table 151.
  • FIG. 14 is a flowchart for explaining an example of processing in which the contracted query processing statement generation unit 124 generates the contracted query processing statement 1701 shown in FIG. 17 from the external query processing statement 1601.
  • the contracted query processing statement generation unit 124 converts the projection columns appearing in the SELECT clause of the query processing statement replaced above to the projections (PC1, PC2, SC1, SC2) of the identification columns of all contracted tables that appear in the FROM clause. (1402).
  • the reduced query processing statement generation unit 124 for the single table condition appearing in the WHERE clause of the query processing statement replaced in step 1402, if the single table condition is an equality condition, sets the condition column on the left side as the hash column list. Then, the immediate value on the right side is replaced with the value after applying the hash function (IN condition).
  • the single table condition is a size comparison condition
  • the magnitude comparison condition is deleted.
  • the contracted query processing statement generation unit 124 identifies the identification column by using the condition column appearing on both sides as the hash column list for the two table equality integration condition appearing in the WHERE clause of the query processing statement replaced above. Replaced with the double table equality join condition converted to the column set (1404).
  • the reduced query processing statement generation unit 124 deletes other multi-table conditions appearing in the WHERE clause of the query processing statement replaced above, and the resulting query processing statement is referred to as a reduced query processing statement 1701. (1405).
  • the reduced query processing statement 1701 shown in FIG. 17 is obtained by applying the above steps 1401 to 1405 to the external query processing statement 1601 shown in FIG.
  • the detailed query processing statement generating unit 126 results in the identification column (ICi) on the left side for each processing target table Ti appearing in the FROM clause of the external query processing statement (Q) 1601 and further in the SELECT clause of the contracted query processing statement 1701.
  • An IN terminology condition is generated with the set of obtained identification columns as the right side, and these are added as AND conditions to the WHERE clause.
  • the detailed query processing statement generation unit 126 sets the query processing statement obtained as a result of adding a condition for all processing target tables Ti appearing in the FROM phrase as a detailed query processing statement (1501).
  • step 1501 to the external query processing statement 1601 shown in FIG. 16
  • the detailed query processing shown in FIG. 18 is performed based on the processing result of the contracted query processing statement 1701.
  • a sentence 1801 is obtained.
  • the detailed query processing statement 1801 is generated from the execution result of the contracted query processing statement 1701, and the detailed query processing statement 1801 is stored in the processing target table 151 (P table, S table).
  • P table S table
  • the processing target table 151 P table, S table.
  • the processing target table 151 is physically stored in one storage medium 105.
  • the processing target table of the database system 100 is divided and stored in a plurality of storage media physically separated via an external network 160 is shown.
  • FIG. 21 is a block diagram illustrating an example of the configuration of the database system according to the second embodiment.
  • the configuration of the database system 100 is the same as that of the first embodiment except for the storage medium 105 shown in the first embodiment.
  • the processing target table 151 accessed by the database system 100 is distributed and stored in the storage medium 105-1 and the storage medium 105-2 connected to the external network 160.
  • the processing target table 151-1 is stored in the storage medium 105-1
  • the processing target table 151-2 is stored in the storage medium 105-2.
  • the contraction table management unit 111 reads the processing target tables 151-1 and 151-2 from the storage media 105-1 and 105-2 and creates the contraction table 141 in advance, as in the first embodiment.
  • the database system 100 executes the contracted query processing statement 1701 on the contracted table 141 generated in advance, thereby reducing the contracted query.
  • the detailed query processing statement 1801 is generated on the basis of the processing result and the query processing statement 1601. Then, the processing target tables 151-1 and 151-2 of the storage media 105-1 and 105-2 are accessed according to the detailed inquiry processing statement 1801. Also in the second embodiment, the same effect as in the first embodiment can be obtained.
  • FIG. 22 is a block diagram illustrating an example of the configuration of the database system according to the third embodiment.
  • the processing target table 151 of the database system 100 is managed in a single database system 100.
  • the processing target table 151 is divided and managed by a plurality of database systems 100-1 and 100-2 connected via the external network 160 is shown.
  • the P table and the S table constituting the processing target table 151 shown in FIG. 8 of the first embodiment are divided and stored in a plurality of physically separated database systems 100-1 and 100-2. Managed.
  • the database systems 100-1 and 100-2 are the same as the database system 100 of the first embodiment. Note that the external query processing statement 1601 is accepted by the database system 100-1.
  • the P table (151-1) constituting the processing target table 151 is stored in the storage medium 105-1 of the database system 100-1, and the processing target table 151 is stored in the storage medium 105-2 of the database system 100-2.
  • S table (151-2) that constitutes is stored. Then, the contraction table 141 of the processing target tables 151-1 and 151-2 is stored in the data storage memory 104 of the database system 100-1.
  • the contraction table 141 is generated by one database system 100-1. However, although not shown, the contraction table 141 is generated by each database system 100-1 and 100-2. Also good.
  • each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
  • Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor.
  • Information such as programs, tables, and files that realize each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
  • control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.
  • the various software shown in this embodiment can be stored in various recording media (for example, non-transitory storage media) such as electromagnetic, electronic and optical, and through a communication network such as the Internet. It can be downloaded to a computer.
  • recording media for example, non-transitory storage media
  • a communication network such as the Internet. It can be downloaded to a computer.

Landscapes

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

Abstract

L'invention concerne un système de base de données qui, au moyen d'un dispositif informatique muni d'un processeur, d'une mémoire et d'une unité de stockage, gère une table d'objets de traitement stockée dans l'unité de stockage, ledit système de base de données étant muni d'une unité de réception d'instructions de traitement de requête qui reçoit une instruction de traitement de requête, d'une unité d'exécution de traitement de requête qui, selon l'instruction de traitement de requête reçue, exécute le traitement de requête concernant la table d'objets de traitement stockée dans l'unité de stockage et fournit en sortie un résultat du traitement de requête, et d'une unité de création de table abrégée qui, lors de la réception d'un réglage de création de table abrégée, génère une table abrégée à partir du réglage de création de table abrégée et de la table d'objets de traitement.
PCT/JP2013/070024 2013-07-24 2013-07-24 Système de base de données, procédé de gestion de base de données et support de stockage WO2015011797A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/070024 WO2015011797A1 (fr) 2013-07-24 2013-07-24 Système de base de données, procédé de gestion de base de données et support de stockage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/070024 WO2015011797A1 (fr) 2013-07-24 2013-07-24 Système de base de données, procédé de gestion de base de données et support de stockage

Publications (1)

Publication Number Publication Date
WO2015011797A1 true WO2015011797A1 (fr) 2015-01-29

Family

ID=52392878

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/070024 WO2015011797A1 (fr) 2013-07-24 2013-07-24 Système de base de données, procédé de gestion de base de données et support de stockage

Country Status (1)

Country Link
WO (1) WO2015011797A1 (fr)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04213765A (ja) * 1990-02-13 1992-08-04 Internatl Business Mach Corp <Ibm> 関係データベースシステムの表を結合する方法
JPH1196055A (ja) * 1997-09-19 1999-04-09 Hitachi Ltd データベースの結合処理最適化方法及び装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04213765A (ja) * 1990-02-13 1992-08-04 Internatl Business Mach Corp <Ibm> 関係データベースシステムの表を結合する方法
JPH1196055A (ja) * 1997-09-19 1999-04-09 Hitachi Ltd データベースの結合処理最適化方法及び装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
EIICHIRO CHISHIRO: "Design and Preliminary Evaluation of SPARQL Query Parallelization Method Based On Graph Contraction", TRANSACTIONS OF INFORMATION PROCESSING SOCIETY OF JAPAN IPSJ JOURNAL, vol. 53, no. 12, 15 December 2012 (2012-12-15), pages 2815 - 2828 *

Similar Documents

Publication Publication Date Title
CN110032604B (zh) 数据存储装置、转译装置及数据库访问方法
Kim et al. Provenance trails in the wings/pegasus system
JP6050272B2 (ja) Apache hadoop用の低レイテンシクエリエンジン
US9690792B2 (en) Access control for unprotected data storage system endpoints
EP3398091B1 (fr) Système et procédé de contrôle d&#39;accès unifié sur une base de données fédérée
JP6338817B2 (ja) データベースミドルウェアを用いたデータ管理システム及びその方法
JP2014194769A6 (ja) Apache hadoop用の低レイテンシクエリエンジン
EP2954424B1 (fr) Procédé, dispositif et système pour une reproduction de données poste à poste, et procédé, dispositif et système pour une commutation de noeud maître
US20140012810A1 (en) Method and apparatus for processing database data in distributed database system
CN109906447B (zh) 管理请求数据库系统中不存在的索引键的事务
CN104408159A (zh) 一种数据关联、加载、查询方法及装置
US9087322B1 (en) Adapting service provider products for multi-tenancy using tenant-specific service composition functions
Xu et al. Zql: A unified middleware bridging both relational and nosql databases
US9747339B2 (en) Server-based management for querying eventually-consistent database
CN105335450B (zh) 数据存储处理方法及装置
US7325003B2 (en) Method and system for mapping datasources in a metadata model
Zarei et al. Past, present and future of Hadoop: A survey
US11048547B2 (en) Method and system for routing and executing transactions
CN116821138A (zh) 一种数据处理方法及相关设备
US9280582B2 (en) Optimization of join queries for related data
US9537941B2 (en) Method and system for verifying quality of server
WO2015011797A1 (fr) Système de base de données, procédé de gestion de base de données et support de stockage
US10042957B2 (en) Devices and methods for implementing dynamic collaborative workflow systems
WO2021238771A1 (fr) Procédé d&#39;accès à des données en nœud de périphérie, appareil et système
Bradberry et al. Practical Cassandra: a developer's approach

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13890160

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP