WO2018043843A1 - Relational database storage system and method for supporting quick query processing with low data redundancy, and method for processing query on basis of relational database storage method - Google Patents

Relational database storage system and method for supporting quick query processing with low data redundancy, and method for processing query on basis of relational database storage method Download PDF

Info

Publication number
WO2018043843A1
WO2018043843A1 PCT/KR2017/000346 KR2017000346W WO2018043843A1 WO 2018043843 A1 WO2018043843 A1 WO 2018043843A1 KR 2017000346 W KR2017000346 W KR 2017000346W WO 2018043843 A1 WO2018043843 A1 WO 2018043843A1
Authority
WO
WIPO (PCT)
Prior art keywords
edge
tables
type
partitioning
edges
Prior art date
Application number
PCT/KR2017/000346
Other languages
French (fr)
Korean (ko)
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
Priority claimed from KR1020160178421A external-priority patent/KR101951999B1/en
Application filed by 재단법인대구경북과학기술원 filed Critical 재단법인대구경북과학기술원
Priority to US16/327,274 priority Critical patent/US11068504B2/en
Publication of WO2018043843A1 publication Critical patent/WO2018043843A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the technical field uses graph-based database partitioning schemes and hash-based multi-column table partitioning methods to process queries based on relational database storage systems, storage methods, and relational database storage methods that support fast query processing with low data redundancy. It's about how
  • Partitioning of the database has been widely used as a query optimization technique in many query processing systems because it reduces the I / O overhead required for relatively expensive join operations.
  • parallel and distributed query processing systems in which compute nodes are connected by a network can utilize a partitioned database to process equal join operations that satisfy certain conditions.
  • parallel join processing can be performed independently on a data set allocated to each slave node without exchanging data through a network when processing a join operation. Because of these advantages, the importance of database partitioning method has been emphasized recently.
  • the most recently proposed database partitioning method is a method of generating a database partitioning plan in the form of a tree using a referential constraint and join predicates between two tables.
  • the database partitioning plan uses the maximum spanning tree obtained from the schema graph.
  • the schema graph shows the tables as nodes, the referential constraints or join predicates as edges, the equal join predicates obtained from the referential constraints or join predicates as edge labels, and
  • the graph shows the weight of the edge as the smaller value of the size of both edge tables.
  • Partitioning a database using a maximum-strength tree involves splitting a child table S out of two adjacent tables R and S that have a parent-child relationship in the tree. Tuples belonging to s A partitioning column value and a tuple of the i th (1 ⁇ i ⁇ P) partition of the parent table If the partitioning column values in the table match, the tuple s is stored in the i th partition of the parent table. In this case, tuples belonging to the child table may be duplicated and stored in one or more partitions according to the number of partitions of the parent table satisfying the above condition.
  • partitioning the database using the maximum spanning tree has the following problems.
  • the method of using the maximum spanning tree must refer to the partition of the table corresponding to the parent in the tree to partition the table. Therefore, two adjacent tables having a parent-child relationship have data dependencies with each other, and the number of operations that refer to the partition of the parent table required for partitioning the table increases in proportion to the database size. Therefore, there is a serious problem that the data loading time is greatly increased when partitioning a large database.
  • tuple-level data duplication may occur seriously in the partition of the child table according to the distribution of tuples in the parent table. That is, when a child table refers to a column used as a foreign key of a parent table, the degree of data redundancy may increase because the distribution of the foreign key is not unique.
  • partitioning predicates data locality of a partitioned database may be increased.
  • the database partition plan follows the tree shape, the tree depth may be deepened or one or more tree partition plans may be generated. In this case, as the depth of the tree becomes deep due to data dependency between adjacent partitioned tables, the degree of cumulative data overlap may become very large.
  • table-level redundancy may occur in which a large table is partitioned several times.
  • the labels of the edges including the partitioning relationship may be the same, thereby increasing the data redundancy, but may cause inefficiency that does not increase the data locality.
  • the tree-shaped partitioning scheme cannot also include a cyclic relationship between tables.
  • data locality for circular join cannot be guaranteed through a tree-type database partition.
  • the more complex the query the more often it involves circular joins.
  • a remote join operation that does not guarantee data locality causes a problem of degrading complex query processing performance.
  • tree-type database partitioning adds repartitioning operations to the query execution plan to eliminate query processing results and tuple-level redundancy. It requires a process. In the method of removing such duplicate tuples, since duplicate tuples must be transmitted between nodes through a network communication before a join operation is performed, a problem arises in that query processing performance is slowed depending on the degree of partition overlap.
  • a cost model based analysis using graph theory for a database schema and a series of input queries is performed, even though the complexity of the input graph increases, the optimal graph structure in terms of query processing performance and storage space efficiency.
  • a database partitioning plan in which data dependency between tables having parent-child relationships in a tree structure does not occur may be provided.
  • partitioning tables independently on each machine using a hash-based partitioning method may ensure data scalability as well as performance of data loading.
  • a table relation in one or more referential constraints or join predicate relations may be represented by a graph structure, in particular, a multi graph structure, thereby expressing a circular join relationship or a circular reference relationship between tables.
  • the degree of data redundancy may be greatly reduced through hash-based partitioning without data dependency on information of partitioning columns included in partitioning predicate information of edges included in a table.
  • a bitmap table which is a set of bitmap vectors containing tuple overlapping information at each tuple level included in a partition of a table, is used to remove duplicates in a scan operation independently at each node without repartitioning the table. can do.
  • an additional overhead due to a bitmap table access is reduced when performing a scan operation considering deduplication, and without additional overhead of a query rewriting process. Can improve query processing performance.
  • the processing performance of a query may be improved by using a scan operation that reads only some of the subpartitions required when processing a query on a partitioned table.
  • the relational database storage method is at least one of a database schema including information about references and constraints between the database tables and a query set including the join predicate information Based on the step of generating a join graph comprising tables and edges; Classifying the types of the tables based on a cost of a join operation between the tables included in the join graph; Distinguishing a type of edges in the join graph based on the type of the tables connected to each other by an edge; Adding a virtual edge between two tables that satisfy an indirect edge condition in the join graph; And generating a database partitioning plan for the join graph based on the type of edges including the virtual edge.
  • the generating of the join graph may include configuring an edge between tables included in the join graph by using at least one of the information about the reference and the constraint and the join predicate information.
  • the classifying the types of the tables may include classifying the types of the tables based on a cost of a join operation between a table in the join graph and adjacent tables adjacent to the table.
  • the dividing of the types of the tables may include: a sum of first join operation costs when the table is divided and stored in a storage device and the table to a plurality of slave nodes based on the aggregate information of the table and the adjacent tables. Calculating a sum of the cost of the second join operation when replicating; Dividing the type of the table into one of a first type and a second type according to a comparison result between the sum of the first join operation cost and the second join operation cost; And storing the table according to the type of the divided table.
  • the dividing of each type of the edges may include dividing each type of the edges into one of an inter edge and an intra edge, based on a type of tables connected to each other by the edges. It may include a step.
  • the dividing into any one of the inter edge and the intra edge may include determining the type of the edge as an intra edge when all types of tables connected to each other by the edge are the first type; And when one type of the tables connected to each other by the edge is the first type and the other type is the second type, determining the type of the edge as the inter edge.
  • the adding of the virtual edge may include checking whether a pair of tables of a first type included in the join graph satisfy the indirect edge condition; And adding the virtual edge between the pair of tables of the first type that satisfies the indirect edge condition.
  • the indirect edge condition is a first condition in which a first table, which is a pair of tables of the first type, and a second table are connected through the same third table, a first edge of the first table, and a second edge of the second table. ; A second condition that the same column of the third table is included in the labels of the first edge and the second edge; And a third condition that the type of the third table is the second type.
  • the generating of the database partitioning plan may include calculating, according to the type of the edges, a gain when performing the join operation by using a table of a first type using the edges; Sorting the edges in ascending order of gain; Initializing a partition graph having nodes of a first type of tables in the join graph; And updating the segmentation graph by processing the edges in the sorted order.
  • the types of edges include at least one of an intra edge, an inter edge, and an indirect edge, and the calculating of the gains includes calculating the gains using different split gain models according to the types of edges. Can be.
  • the updating of the segmentation graph may include searching for two adjacent triangular edges that satisfy a triangular edge condition for edges in the join graph based on the database partition scheme; Searching for a hub table that satisfies a hub table condition for an edge in the join graph based on the database partitioning plan; And adding the edge, the two triangular edges, and the hub table to the segmentation graph.
  • the triangular edge condition is a condition that the type of the edge in the join graph is an intra edge; A condition that edges of each of two tables of a first type connected to the intra edge are present, and wherein each of the edges is connected to the same table; A condition in which the labels of each of the edges include a column of the same table; And a condition that the type of the same table is the second type.
  • the hub table condition is that the type of the edge in the join graph is an intra edge or an indirect edge between two tables of the first type, and the edge of each of the two tables of the first type is the triangular edge condition. Accordingly, a condition that is edges satisfying the triangular edge condition may be included with respect to one or more columns of the common table classified as the second type.
  • the relational database storage method may further include: splitting tuples included in the tables based on a hash function based on the database partitioning plan; And storing the corresponding tuple in a partition corresponding to each of the divided tuples based on information associated with a partitioning column of the corresponding tuple.
  • the partitioning based on the hash may include determining a location of a partition in which the corresponding tuple is to be stored, based on a hash function of all partitioning column values of the tuples; Generating a bitmap vector using index information of the corresponding partitioning column in the partitioning column set; And updating bitmap vector information of the corresponding tuple in the bitmap table of the table by using the bitmap vector.
  • the storing of the corresponding tuple may include generating a bitmap vector set by using partitioning column information of a table including a list of tuples shuffled for each partition corresponding to each of the divided tuples; Initializing a subpartition for a bitmap vector included in the bitmap vector set; Storing each tuple in a corresponding subpartition using a bitmap vector corresponding to each tuple included in the tuple list; And when all tuples included in the tuple list are stored in the subpartition, configuring the partition of the table including the tuple list by the union of all the subpartitions.
  • a method for processing a query based on the relational database storage method comprising the steps of determining whether the table is used in a join operation in the input query; Determining whether the intersection between the first partitioning column set of the table and the second partitioning column set of the table to be joined with the table is empty by using the partition column information of the table; Selecting one partitioning column associated with the table according to the scan mode of the table determined based on the determination; Calculating a list of bitmap vectors corresponding to the selected partitioning column; Selecting a subpartition corresponding to at least one bitmap vector included in the list of bitmap vectors; And scanning the selected subpartition.
  • the selecting of any one partitioning column may include determining one of a first scan mode and a second scan mode to read the table based on the determination; And selecting one partitioning column among the partitioning column included in the intersection and the partitioning column included in the first partitioning column set according to any one of the scan modes.
  • the graph-based database partitioning plan can improve the processing performance of the query while reducing data redundancy for a database schema and a set of input queries with a very large number of tables and relationships between the tables.
  • a database with low data redundancy while maximizing data locality for processing queries including circular reference relationships and circular join relationships between tables in an input schema or query set by utilizing graph theory such as triangular edge search. You can create a split plan.
  • the occurrence of data dependency problem exists between the parent-child tables in the tree structure. You can block.
  • FIG. 1 illustrates the structure of a relational database storage system according to one embodiment.
  • FIG. 3 is a flow diagram illustrating a relational database storage method according to one embodiment.
  • FIG. 4 is a flowchart illustrating a method of classifying types of tables according to an embodiment.
  • FIG. 5 is a flowchart illustrating a method of classifying edge types according to an embodiment.
  • FIG. 6 is a flowchart illustrating a method of adding a virtual edge according to an embodiment.
  • FIG. 7 is a flowchart illustrating a method of generating a database partitioning plan according to one embodiment.
  • FIG. 8 is a flowchart illustrating a method of searching for a triangular edge according to an embodiment.
  • FIG. 9 is a flowchart illustrating a method of searching a hub table according to an embodiment.
  • FIG. 10 is a flowchart illustrating a map operation of a data loader included in a master node according to an embodiment.
  • 11 is a flowchart illustrating a reduce operation of a data loader included in a master node according to an embodiment.
  • FIG. 12 is a diagram illustrating an example of a partition when partitioning and storing a table using a bitmap table, according to an embodiment.
  • FIG. 13 illustrates an example of a partition when partitioning and storing a table by subpartitioning according to an embodiment
  • FIG. 14 is a flow diagram illustrating a method of processing a query based on a relational database storage method, according to one embodiment.
  • a relational database storage system includes a master node 110 and N slave nodes 150-1,... 150 -N.
  • the master node 110 and the N slave nodes 150-1,... 150 -N may be configured as a cluster connected by a network.
  • the master node 110 may include a database partition determiner 120, a table partition storage device 130, and a partitioned table reading device 140.
  • the database partition determiner 120 may include a table partitioning module 121, an edge partitioning module 122, an indirect edge search module 123, a triangular edge search module 124, a hub table search module 125, and a database partition plan generator ( 126). The operation of the database partition determiner 120 will be described with reference to FIGS. 3 to 9.
  • the table partition storage device 130 may include a data loader 135.
  • the data loader 135 may perform a map operation and a reduce operation. The operation of the data loader 135 will be described with reference to FIGS. 10 to 13.
  • the partitioned table reading device 140 may process a query by reading a query based on a relational database storage method. The operation of the partitioned table reading device 140 will be described with reference to FIG. 14.
  • Each of the slave nodes 150 includes a CPU 151, a main memory 153, and an auxiliary memory 157.
  • the main memory 153 and the auxiliary memory 157 may store database partitions 1 155 and 159 corresponding to the corresponding slave nodes, respectively.
  • N partitioned database partitions may be distributed and stored in one partition for each slave node.
  • the database partition may be stored in both the main memory 153 and the auxiliary memory 157 of each slave node.
  • the CPU 151 may process a query using a database partition 155 stored in the main memory 153.
  • the CPU 151 may process a query using the database partition 159 stored in the auxiliary storage device 157.
  • FIG. 3 is a flowchart illustrating a relational database storage method according to an embodiment. Referring to FIG. 3, a method is shown in which the master partition 110 (of database partition determiner 120) shown in FIG. 1 generates a database partition plan.
  • the master node includes tables and edges, based on a database schema that contains information about references and constraints between database tables, and a query set that includes join predicate information. Create a join graph (310). Information about references and constraints between database tables may be referred to as 'reference constraint relationship information'.
  • the database schema may define, for example, data entities, attributes, relationships, and constraints of data values constituting the database.
  • the master node can construct a table (database table) for a given database schema or input query set as nodes in a join graph.
  • the master node may configure edges between tables included in the join graph by using at least one of reference constraint relationship information and join predicate information.
  • the master node can construct the edge between the tables in the join graph by using the referential constraint relationship information between the two tables included in the database schema.
  • the master node can construct the edges between the tables in the join graph using the join predicate information contained in the query in the query set.
  • the label of the edge may be configured by using partitioning column information of two tables connected at both ends of the edge.
  • a referential-referred relationship can be considered as an equal join predicate. For example, if a database schema is given as input, the master node can set the weight of all edges to '1'. Alternatively, if a query set is given as an input, the master node may set the frequency of the join predicate included in the query of the query set as the weight of the edge.
  • the master node classifies the types of tables based on the cost of the join operation between the tables included in the join graph (320).
  • the master node may classify the types of tables based on the cost of a join operation between the tables in the join graph and adjacent tables adjacent to the tables.
  • the cost of the join operation can be calculated, for example, by the cost model of the join operation.
  • the cost model of the join operation may be defined as the sum of the scan costs of the join tables occurring in the processing of the join operation.
  • the master node is based on the aggregate information of the table and the adjacent tables, the sum of the first join operation cost when the table is stored in the storage unit and the second join operation cost when the table is replicated to the plurality of slave nodes. The sum can be calculated.
  • the master node divides the table type into one of the first type and the second type according to the comparison result between the sum of the first join operation cost and the second join operation cost, and stores the table according to the divided table type. Can be.
  • the first type may be, for example, a 'Part-table' type
  • the second type may be, for example, a 'Rep-table' type.
  • the master node distinguishes the types of edges in the join graph based on the types of tables connected by the edges (330).
  • the master node may classify each type of edge into one of an inter edge and an intra edge based on the types of tables connected to each other by the edge. A method of distinguishing the types of edges by the master node will be described with reference to FIG. 5.
  • the master node adds a virtual edge between two tables satisfying the indirect edge condition in the join graph (340).
  • An indirect edge condition and a method of adding a virtual edge by the master node will be described with reference to FIG. 6.
  • the master node generates a database partitioning plan for the join graph based on the types of edges including the virtual edge (350).
  • the master node may calculate a gain when performing a join operation by a table of the first type using the edges according to the types of edges, and sort the edges in the order of gain.
  • the master node may initialize a split graph that uses the first type of tables in the join graph as nodes.
  • the master node can update the segmentation graph by processing the edges in sorted order. A method of generating a database partition plan by the master node will be described in detail with reference to FIG. 7.
  • FIG. 4 is a flowchart illustrating a method of classifying types of tables according to an exemplary embodiment. Referring to FIG. 4, a method of distinguishing the types of tables by the master node 110 (the table classification module 121 of FIG. 1) shown in FIG. 1 is illustrated.
  • the master node may select table T in the join graph (410).
  • the master node calculates the sum of the cost of the first join operation between the table T and the adjacent tables adjacent to the table T when the table T is partitioned and stored in the storage device based on the aggregation information of the tables T and the adjacent tables adjacent to the table T. It may be calculated (420).
  • step 420 when partitioning the table T into the storage device, that is, when the table T is a table type to be partitioned, the sum of the first join operation costs is, for example, the join processing cost model Cost Part (T Can be obtained by
  • Join processing cost model Cost Part (T) is the scan cost of a partitioned table that occurs when partitioned table T is joined with all adjacent tables. Sum of the cost of scanning all tables in the set adj (T) of adjacent tables It can be defined as. In this case, the join operation cost model according to the type of table may be defined as the sum of the scan costs of the join tables generated at the join process.
  • the master node replicates table T to N slave nodes based on the aggregate information of the tables T and adjacent tables adjacent to table T, that is, when table T is a table type to be replicated,
  • the sum of the cost of the second join operation with adjacent adjacent tables may be calculated (430).
  • step 430 when replicating table T to N slave nodes, that is, when table T is a table type to be replicated, the sum of the second join operation costs is, for example, the join processing cost model Cost Rep. It can obtain
  • Join processing cost model Cost Rep is the sum of the table scan costs incurred when table T is joined with all neighboring tables when replicated to P partitions. Sum of all scan costs of all tables in the set adj (T) It can be defined as.
  • the number of partitioning columns of neighboring tables is reduced by 1 because the data locality is guaranteed even when the table T is replicated and the neighboring tables are queried using any column of the table T.
  • the master node may compare a difference between the cost of the first join operation cost Cost Part (T) and the sum of the second join operation cost Cost Rep (T) (440).
  • the master node may divide the type of table into a 'part-table'. (450).
  • the master node can partition the table.
  • the master node sets the type of table to 'Rep-table'. Can be distinguished (460).
  • the master node can replicate the table to N slave nodes.
  • the master node may check whether all tables are separated (470). If it is determined in step 470 that all the tables are not distinguished, the master node may select the next table 480 and perform the processes of steps 420 to 470 for the next table.
  • the master node may terminate the operation.
  • FIG. 5 is a flowchart illustrating a method of classifying edge types according to an exemplary embodiment. Referring to FIG. 5, a method of distinguishing types of edges by the master node 110 (the edge classification module 122 of FIG. 1) illustrated in FIG. 1 is illustrated.
  • the master node may select the edge e in the join graph (510).
  • the master node may determine whether both types of tables of the edge e, that is, the types of tables connected to each other by the edge are tables to be replicated (520). If it is determined in step 520 that all of the types of tables are tables to be replicated, the master node may terminate the operation by checking whether all edges have been identified (560).
  • the master node may determine whether all types of tables are tables to be partitioned (530).
  • the master node may classify (determine) the type of the edge as an inter edge. May be 540.
  • the master node may classify (determin) the type of edge e into an intra edge (550).
  • the master node may check whether all edges have been identified (560). If all edges are not distinguished in step 560, the master node may select the next edge to perform the processes of steps 520 to 560.
  • the master node may terminate the operation.
  • FIG. 6 is a flowchart illustrating a method of adding a virtual edge according to an embodiment. Referring to FIG. 6, a method of searching for a virtual edge by the master node 110 (indirect edge search module 123 of FIG. 1) shown in FIG. 1 is illustrated.
  • the master node checks whether a pair of all the first types of tables (partitioned tables) included in the join graph satisfy the indirect edge condition, and checks between the pairs of tables to be partitioned that satisfy the indirect edge condition. You can add virtual edges. Whether the pair of tables to be partitioned satisfies the indirect edge condition may be determined through the steps 620 to 650 shown in FIG. 6.
  • the master node may select a table pair ⁇ R, S> of the table type to be split included in the join graph (610).
  • the master node may determine whether the table R and the table S constituting the table pair are connected through the same table T and the edge e1 of the table R and the edge e2 of the table S (620).
  • the master node includes the same column of the table T in the label of the edge e1 and the label of the edge e2. In operation 630, it may be determined.
  • the master node may determine whether the type of the table T is a table to be replicated (640).
  • step 640 If it is determined in step 640 that the type of table T is a table to be replicated, then the master node determines the edges e1 and e2 of the edges e1 and e2 of table R and table S that satisfy all of steps 620 through 640. In operation 650, it may be determined whether an edge e including a table R and a table S column included in the label of e2 exists between the table R and the table S.
  • the master node may distinguish edge e as an indirect edge (660).
  • the master node may add a virtual edge between the table R and the table S having the columns of the table R and the table S included in the labels of the edge e1 and the edge e2.
  • step 620 If it is determined in step 620 to step 650 that the result is not the determination of the conditions, the master node selects another table pair (680), and for each other table pair, The process can be performed.
  • the master node may determine whether it has identified all pairs of tables to partition in the join graph (670). If the step 670 does not identify all the pairs of tables to be partitioned, the master node selects another table pair to be partitioned (680) and repeats the process of steps 620 to 670 for the other partitioned table pair. Can be done.
  • the master node may end the operation.
  • FIG. 7 is a flowchart illustrating a method of generating a database partition plan according to an embodiment. Referring to FIG. 7, a method is shown in which the master node 110 (database partition plan generator 126 of FIG. 1) shown in FIG. 1 generates a database partition plan.
  • the master node may initialize the maximum-priority queue benefitQ (705).
  • the master node selects one edge e included in the union of the intra edge, the inter edge, and the indirect edge, which are the result of the operation of the edge classification module 122 and the indirect edge search module 123 described above with reference to FIGS. 5 and 6. May be 710.
  • the master node may calculate a split gain benefit (e) using a split gain model according to the edge type of edge e.
  • the partitioning gain model is modeled in terms of table scan cost in terms of the cost of processing the join operation that can be obtained when partitioning a table using a given edge e.
  • the split gain model quantifies the gain from join processing locally for a given edge using a table partitioned using the edge, from the table scan point of view. Therefore, the larger the sum of the sizes of the two end tables of the edge, the larger the weight of the edge, that is, the higher the frequency of join operations for the edge, the greater the gain obtained when the table is partitioned using the edge.
  • a split gain model according to three edge types will be described through steps 715 to 735.
  • the master node may determine whether the edge type of edge e is an intra edge Ea (715). As a result of the determination in step 715, if the edge type of edge e is an intra edge, the master node splits using the partitioning column information of the edges in the triangular edge set triEdges (e) included in both end tables of edge e and edge e.
  • the gain model may be modeled 720. In this case, the master node may model a split gain obtained by locally joining a join operation corresponding to edge e and triangular edges when partitioning three tables included in the edges.
  • the triangular edge set triEdges (e) can be obtained through the triangular edge search module 124 shown in FIG.
  • the splitting gain of edge e may be calculated as sz (e) * w (e).
  • the splitting gain for edge e 'included in the triangular edge set is It can be the sum of sz (e ') * w (e')) values for.
  • the master node may use sz (e) * w (e) + sz (e ') * w (e') corresponding to the sum of two calculation values as a split gain model of the intra edge.
  • the master node may map the gain benefit (e) calculated through the split gain model according to the edge type (intra edge (Ea)) to the edge e and add (insert) the maximum priority queue benefitQ (740).
  • the master node may determine whether the edge type of the edge e is an indirect edge Et (725).
  • the master node can model the split gain model of the indirect edge by the sum of the split gains of the triangular edges found from the indirect edge e. There is (730). In this case, the indirect edge itself is not included in the split gain model because the indirect edge is an edge that does not actually exist. If the edge e is not an indirect edge but an edge that actually exists in the join graph, the edge e may be classified as an intra edge type by the edge classification model 122.
  • the split gain model for indirect edge e can be calculated as the sum of sz (e ') * w (e') for triangular edge e 'contained in triangular edge set triEdges (e). .
  • the master node may add (insert) the maximum benefit queue benefitQ after mapping the gain benefit e calculated through the split gain model according to the edge type (indirect edge Et) to the edge e (740).
  • the master node may determine that the type of the edge is an inter edge and determine a split gain model of the inter edge (735).
  • the split gain model of the inter edge may be configured as the split gain of the intra edge.
  • the reason why the indirect edge is not included in the split gain model of the inter edge is that the type of one of the tables at both ends of the edge is the table to be partitioned and the type of the other table is the table to be replicated according to the definition of the intra edge. This is because the triangle edge condition is not satisfied. Therefore, the split gain model of the inter edge can be calculated as sz (e) * w (e).
  • the master node may add (insert) the maximum benefit queue benefitQ after mapping the gain benefit (e) calculated through the split gain model according to each edge type to the edge e (740).
  • the master node may determine whether mapping information of all edge and split gains in the edge union has been added to the maximum priority queue benefitQ (745).
  • step 745 If the verification of step 745 indicates that the mapping information of all edges and split gains in the edge union has not been added to the maximum priority queue benefitQ, then the master node selects the next edge (750) and for the next edge (step 715). To step 750 may be performed.
  • step 745 If the verification result of step 745 indicates that the mapping information of all edge and split gains in the edge union has been added to the maximum priority queue benefitQ, the master node uses the maximum priority queue benefitQ to generate the database partitioning plan to generate the database partitioning plan.
  • the divided graph PG which is a graph, may be initialized (755).
  • the master node is a set of tables of the table type to be split in the join graph.
  • V part 760 may be selected.
  • the master node can use the table set V part to generate a partition graph for a database partition plan.
  • the master node may extract the first edge e in the maximum priority queue benefitQ, which is the edge that brings the maximum split gain among the edges of the join graph (765).
  • the master node extracts the first edge e, and then removes the first edge e from the maximum priority queue benefitQ. Thereafter, the maximum priority cue benefitQ may be aligned such that the edge with the next highest divide gain after the first edge e removed is the first edge.
  • the master node may check whether the maximum number of partitioning columns (K) of both end tables R and table S of the edge e extracted in step 765 satisfies a preset constraint (770).
  • the preset constraint may be configured with the following four conditions.
  • the first condition is
  • k ⁇
  • k.
  • whether or not the constraint is satisfied may be determined according to the intersection of the partitioning column included in the edge label function and each partitioning column set. To specify this in detail, the partitioning columns of table R and table S included in the label of edge e are Rc and Sc, respectively. If the constraint is satisfied, the third condition In this case, the constraint may be satisfied.
  • the master node searches for two adjacent triangular edges that satisfy the triangular edge condition (triangular edge condition) for the edge e. Then, it can be added to the split graph PG (775). A method of searching for two adjacent triangular edges that satisfy the triangular edge condition by the master node will be described with reference to FIG. 8.
  • the master node may search the hub table for edge e in the join graph extracted in step 765, and then add the searched hub table to the partition graph PG (780).
  • the master node may search for one or more tables in the join graph corresponding to the extracted edge e, and classify a table satisfying the hub table condition among the searched tables into a hub table type. A method of searching for a table that satisfies the hub table condition for the edge e by the master node will be described with reference to FIG. 9.
  • the master node may add edge e to the split graph PG (785).
  • the master node can update the partitioning column information included in the edge label in the two tables at both ends of the edge.
  • the master node may check whether the maximum priority queue benefitQ is empty (790). If the verification result of step 790 indicates that the maximum priority queue benefitQ is not empty, the master node may repeat the process of steps 765 to 795.
  • step 790 If the verification result of step 790 indicates that the maximum priority queue benefitQ is empty, the master node may return the database partitioning plan (795) and terminate the operation. Therefore, the tables of each partition table type in the returned database partition plan do not exceed the maximum k of partitioning columns.
  • FIG. 8 is a flowchart illustrating a method of searching for a triangular edge according to an embodiment.
  • the process of searching for is shown.
  • Edges that meet triangular edge conditions can be added to the split graph.
  • the master node determines whether the type of the input edge e is an intra edge type, that is, the two tables R and S of the table type to be split at both ends of the input edge e are the same table T and edge e1. And it may be determined whether the connection is through e2 (820). As a result of the determination of step 820, if the two tables R and S are not connected through the same table T and the edges e1 and e2, the master nodo may terminate the operation.
  • the type of the input edge e is an intra edge type, that is, the two tables R and S of the table type to be split at both ends of the input edge e are the same table T and edge e1. And it may be determined whether the connection is through e2 (820). As a result of the determination of step 820, if the two tables R and S are not connected through the same table T and the edges e1 and e2, the master nodo may terminate the operation.
  • the master slaver may determine whether the labels of the edges e1 and e2 include the columns of the same table T. It may be 830. As a result of the determination of step 830, when the labels of the edges e1 and e2 do not include the columns of the same table T, the master node may terminate the operation.
  • the master node may determine whether the type of the table T is a table to be replicated (840). If it is determined in step 840 that the type of table T is not a table to be replicated, then the master node may terminate the operation.
  • the master node may distinguish the edges e1 and e2 into triangular edge types (850).
  • FIG. 9 is a flowchart illustrating a method of searching a hub table according to an embodiment.
  • a process of searching for a table that satisfies a hub table condition by the master node is illustrated.
  • the hub node search module 126 of the master node may search for a table of one or more table types to be replicated that satisfies the hub table condition for a given edge e.
  • the master node is adjacent to the edge e if the input edge e is an intra edge or an indirect edge between two tables R and S of the table type to be split (910), and is connected to the common table T i and the column T i [k]. In operation 920, it may be determined whether the triangular edges e1 and e2 of the tables R and S exist.
  • step 920 If there are no triangular edges e1 and e2 of tables R and S connected to a common table T i and column T i [k] in step 920, then the master node has another table T j and column T j [k]. In operation 940, it may be determined whether two triangular edges of the tables R and S connected to the P and S are present.
  • step 920 if the triangular edges e1 and e2 of the tables R and S connected to the common table T i and the column T i [k] exist, the master node converts the common table T i to the hub table (Hub-table). (930).
  • 'the triangular edges e1 and e2 of the tables R and S connected by the common table T i and the column T i [k] exist' means that the edges e1 and e2 of the tables R and S have a common table T i. It can be understood to mean that the edges satisfying the triangular edge condition with respect to the column T i [k] of.
  • the common table T i may be a table of a table type to be replicated according to a triangular edge condition.
  • the master node satisfies the triangle edge conditions for the column T j [k] in that the two triangular edge of the table R and S that are connected to the columns of T j [k] of the other tables T j exists, in other words, a different table T j
  • the master degree may further divide the other table T j into a hub table (950). .
  • FIG. 10 is a flowchart illustrating a map operation of a data loader included in a master node according to an embodiment.
  • a process of performing table partitioning based on a hash function for each tuple of a given table is performed by a master node (table partition storage device 130) according to an embodiment.
  • the master node may select a tuple t included in the table T (1005).
  • the master node can grasp the partitioning information of the table T from the database partitioning plan.
  • the master node may check whether all partitioning column values of the tuple t selected in step 1005 are null (1010).
  • the master node selects 1045 the partition location pid in which the tuple t is to be stored in a round robin manner, and then You can shuffle the key-value pairs ⁇ pid, bitM [pid]>, t> with tuple t as the key and all the ⁇ pid, bitM [pid]> pairs as keys for all partition locations pid stored in the set pidS. 1050.
  • the master node may determine whether only the value t.c of some partitioning column c of the tuple t is null (1015).
  • step 1015 If it is determined in step 1015 that only the value tc of some partitioning column c of tuple t is null, the master node ignores the corresponding partitioning column (s) (c) and has no other partitioning that does not have a null value.
  • the column may be selected (1020).
  • the master node may again determine step 1015 for another partitioning column that does not have a null value.
  • the master node uses the hash function hash () for the partitioning column value tc to determine the partition location pid where the tuple will be stored. After the decision, it can be stored in the set pidS of the partition location (1025). Since the partitioning method of the relational database storage system according to an embodiment may use one or more partitioning columns for partitioning a table, the set of partition positions pidS may include one or more partition positions.
  • the master node may generate a bitmap vector bitV through index information i of the current partitioning column in the partitioning column set C (T) of the table T (1030). Bitmap vector information is used later to store tuples in partitions.
  • the master node may update the bitmap vector for the tuple t to the bitmap table bitM [pid] of the pid-th partition of the table T using the bitmap vector bitV generated in operation 1030 (1035).
  • the master node may check whether hash-based partitioning has been performed for all partitioning columns in the tuple of table T (1040). If in step 1040 no hash-based partitioning has been performed for all partitioning columns in the tuples of table T, the master node selects another partitioning column 1020 to perform the process of steps 1015 to 1035. Can be.
  • the master node has ⁇ pid, bitM [pid]> pairs for all partition location pids stored in the set pidS of the partition index.
  • the key may be shuffled into a key-value pair ⁇ pid, bitM [pid]>, t> with tuple t as a value (1050).
  • bitM [pid] is a bitmap table of the pid-th partition, and is subpartition information in which the current tuple t is to be stored in the bitmap vector in the table T.
  • the master node may check whether shuffling has been completed for all tuples of the table T (1055). In step 1055, if the shuffle is not completed for all tuples of the table T, the master node may select 1060 the next tuple to perform the processes of steps 1010 to 1055. The master node may repeat the above process until it shuffles all tuples.
  • the master node may end the operation.
  • FIG. 11 is a flowchart illustrating a reduce operation of a data loader included in a master node according to an embodiment.
  • a master node table partition storage device 130
  • FIG. 10 a process in which a master node (table partition storage device 130) performs a reduce operation on all tuples of a table T that has been shuffled through is illustrated in FIG. 10.
  • the master node may receive a tuple list list (t) having the same partition position pid for the bitmap vector bitV that has been shuffled through the mapping process of FIG. 10 (1110).
  • the master node may generate
  • the master node may select a tuple t included in the tuple list list (t) (1140).
  • the master node may store the selected tuple t in the subpartition SubP bitV (1150).
  • the master node may store the tuple t in the corresponding subpartition SubP bitV using the bitmap vector bitV, which is subpartition information, in the ⁇ pid, bitV> pair used as a key.
  • the master node may check whether all tuples t in the tuple list list (t) are stored in the subpartition (1160). If all tuples t have not been stored in the subpartition as a result of checking in step 1160, the master node selects 1170 the next tuple in the tuple list list (t) to perform the operations of steps 1150 to 1160. can do.
  • the master node stores all the tuples in the tuple list list (t) in the subpartition SubP V , and then unions all subpartitions (U SubP V ).
  • the current partition P i (T) may be configured (1180).
  • the master node may store the database partition P i (T) configured in operation 1180 in a main memory device or an auxiliary storage device of an i th (1 ⁇ i ⁇ N) slave node among N slave nodes (1190).
  • the database partition P i (T) may be divided and stored using a sub-partitioning concept. Subpartitioned database partitions will be described in detail with reference to embodiments in which the tables of the database shown in FIGS. 12 to 13 are divided and stored.
  • FIG. 12 is a diagram illustrating an example of partitions when a table is divided and stored using a bitmap table, according to an exemplary embodiment. Referring to FIG. 12, an embodiment of a method of additionally storing and dividing a bitmap table for each database partition is shown.
  • Two partitioning columns R [1] 1210a and R [2] 1210b of the table R 1210 may be divided and stored through the above-described processes of FIGS. 10 to 11.
  • the table R 1210 may be divided and stored into three partitions 1220 in total. Since the number of partitioning column sets of table R 1210
  • 2, the possible bitmap vectors are (0,0) (1230b), (0,1) (1230d), (1,0 ) 1230c and (1, 1) 1230a.
  • the location pid of the partition where tuples of the table R 1210 are to be divided and stored may be determined according to two partitioning column values.
  • the tuple (1,1) is stored only in the first database partition P 1 (R) because all partitioning columns have the same value '1', and the bitmap vector may be (1,1). This is because the tuples (1,1) stored in the first database partition P 1 (R) are the original tuples that are not duplicated from the partitioning column perspective.
  • the tuples (2, 3) are allocated to the second database partition P 2 (R) by the first partitioning column R [1] 1210a, and the third database partition P 3 (R by the second partitioning column R [2] 1210b. Can be divided and stored. Therefore, since one redundant tuple is additionally stored, one bit of the bitmap vector for the tuple (2,3) may have a value of '0'.
  • bitmap vector of tuple (2,3) stored in the second database partition P 2 (R) is (1,0) (1230c), but the tuple (2,3) stored in the third database partition P 3 (R) ) May be (0,1). This difference can later be used to eliminate duplicate results when processing queries using database partitions.
  • the tuple whose first bit value of the bitmap vector is '0' should be excluded from the query processing.
  • the tuples (2, 3) stored in the third database partition P 3 (R) are not used when processing the query.
  • bitmap table can be stored for each database partition, and query processing can be performed by excluding duplicate tuples included in the database partition by using the stored bitmap table information during query processing.
  • FIG. 13 is a diagram illustrating an example of partitions when a table is divided and stored by subpartitioning according to an embodiment. Referring to FIG. 13, a method of partitioning and storing a table by using a subpartitioning concept is illustrated.
  • the table R 1310 stores the same tuple as the table R 1210 of FIG. 12, and the partitioning column is also the same as two of R [1] 1310a and R [2] 1310b. In this case, it is assumed that the table R 1310 is divided and stored using three database partitions 1320 as in the embodiment of FIG. 12.
  • the bitmap vector set may include four bitmap vectors in total ⁇ 00,01,10,11 ⁇ .
  • each database partition Pi (R) may include four subpartitions 1320a, 1320b, 1320c, and 1320d, respectively.
  • the subpartitions constituting each database partition Pi (R) may represent one of four bitmap vectors.
  • the location of the stored partition is determined according to the partitioning column value used for the tuple of the table R 1310, and the subpartition of the corresponding partition to be finally stored is determined according to the calculated bitmap vector.
  • bitmap vector can be calculated as (1,1).
  • the bitmap vector of the tuple (1,1) to be stored in the first database partition P 1 (R) is also (1,1)
  • the first database partition P 1 (R) representing the bitmap vector (1,1) May be stored in the fourth sub-partition 1320d. At this time, each subpartition does not need to store a bitmap table separately.
  • Query processing for the table partitioned and stored through the table partition storage device 130 may be performed by the partition table reading device 140 of the master node.
  • a method of processing the query for the partitioned and stored table by the partitioned table reading device 140 will be described with reference to FIG. 14.
  • FIG. 14 is a flowchart illustrating a method of processing a query based on a relational database storage method, according to an exemplary embodiment. Referring to FIG. 14, a process in which a partitioned table reading device 140 of a master node processes a query for a table partitioned and stored through the table partitioning storage device 130 is illustrated.
  • the master node may receive an input query (query) Q (1405).
  • the master node may determine whether the partitioned table R is used for the join operation in the input query Q received in step 1405 and whether the table R is stored according to the relational database storage method.
  • the master node may determine whether table R is used for a join operation in input query Q (1410). In step 1410, the master node transitions to one of two states: when table R is used for join operations in input query Q, and when table R is not used for join operations, or if input query Q does not include a join operation. Can be distinguished.
  • the master node switches the single scan mode to the scan mode of the table R. It may be determined (1425). The master node may select any partitioning column j among partitioning columns included in the partitioning column set C (R) of the divided table R according to the single scan mode (1435).
  • the master node empty the intersection of the partitioning columns of the table S to be joined with the table R through the partitioning column information of the tables included in the database partitioning plan PG. Cognition may be checked (1415). If the intersection is empty in step 1415, the master node may perform steps 1425 and 1435.
  • the master node may determine a join scan mode as the scan mode of the table R (1420).
  • the master node intersects the set of partitioning columns of tables R and S according to the join scan mode.
  • One partitioning column j among one or more partitioning columns included in may be selected (1430).
  • the master node may calculate a list of bitmap vectors corresponding to the partitioning column j selected in step 1430 or 1435 (1440).
  • the master node may calculate a list V of bitmap vectors before reading the partitioned table for the partitioning column j. For example, when the number
  • the master node may select a subpartition corresponding to at least one bitmap vector included in the list of bitmap vectors (1445) and scan the selected subpartition (1450).
  • the master node is, for example, a subpartition SubP v (of database partition P i (R) representing a bitmap vector included in bitmap vector list V; ) Can be selected.
  • the master node may check whether all necessary tuples have been scanned (1455). If all the required tuples have not been read in step 1455, the master node selects another bitmap vector v in the bitmap vector list V (1460) until all the required tuples have been read (step 1460). The process can be repeated.
  • the master node may terminate the operation.
  • the embodiments described above may be implemented as hardware components, software components, and / or combinations of hardware components and software components.
  • the devices, methods, and components described in the embodiments may include, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gates (FPGAs). It may be implemented using one or more general purpose or special purpose computers, such as an array, a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions.
  • the processing device may execute an operating system (OS) and one or more software applications running on the operating system.
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • OS operating system
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include.
  • the processing device may include a plurality of processors or one processor and one controller.
  • other processing configurations are possible, such as parallel processors.
  • the software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device.
  • Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. Or may be permanently or temporarily embodied in a signal wave to be transmitted.
  • the software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner.
  • Software and data may be stored on one or more computer readable recording media.
  • the method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium.
  • the computer readable medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks.
  • Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
  • the hardware device described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (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

A relational database storage method according to one embodiment generates a join graph including tables and edges on the basis of a database schema including information on reference and limitation conditions between database tables, and a query set including join predicate information, classifies the type of tables on the basis of the cost of a join operation between the tables included in the join graph, classifies the type of edges in the join graph on the basis of the type of the tables connected to each other by the edge, adds a virtual edge between two tables satisfying an indirect edge condition in the join graph, and generates a database partitioning plan for the join graph on the basis of the type of edges including the virtual edge.

Description

낮은 데이터 중복으로 빠른 쿼리 처리를 지원하는 관계형 데이터베이스 저장 시스템, 저장 방법 및 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법Relational database storage system that supports fast query processing with low data redundancy, how to handle queries based on how and how to store relational databases
기술 분야는 그래프 기반의 데이터베이스 분할 계획 및 해시 기반의 멀티-컬럼 테이블 분할 방법을 활용해 낮은 데이터 중복으로 빠른 쿼리 처리를 지원하는 관계형 데이터베이스 저장 시스템, 저장 방법 및 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법에 관한 것이다The technical field uses graph-based database partitioning schemes and hash-based multi-column table partitioning methods to process queries based on relational database storage systems, storage methods, and relational database storage methods that support fast query processing with low data redundancy. It's about how
데이터베이스의 분할(partitioning)은 상대적으로 처리 비용이 비싼 조인 연산(join operation)에 필요한 입출력 과부하 정도를 줄여주기 때문에 많은 쿼리 처리(query processing) 시스템들의 쿼리 최적화 기법으로 널리 사용되어 왔다.Partitioning of the database has been widely used as a query optimization technique in many query processing systems because it reduces the I / O overhead required for relatively expensive join operations.
특히, 네트워크에 의해 계산 노드들이 연결되어 있는 병렬 및 분산 쿼리 처리 시스템에서는 분할된 데이터베이스를 활용하여 특정한 조건을 만족하는 동등 조인 연산을 처리할 수 있다. 이때, 특정한 조건은 예를 들어, 두 개의 테이블 R과 S의 조인 연산이 동등 조인 (R.a= S.b) 이면서 조인 술어(join predicate) 내에 포함된 조인 컬럼 (R.a= S.b)이 테이블 R과 S의 분할에 사용된 파티셔닝 컬럼(partitioning column)과 동일한 경우를 의미할 수 있다. In particular, parallel and distributed query processing systems in which compute nodes are connected by a network can utilize a partitioned database to process equal join operations that satisfy certain conditions. In this case, for example, a join operation of two tables R and S is an equal join (Ra = Sb), and a join column (Ra = Sb) included in a join predicate splits the tables R and S. This may mean the same as the partitioning column used in the.
병렬 및 분산 쿼리 처리 시스템에서는 조인 연산의 처리 시에 네트워크를 통한 데이터의 교환 없이 각 슬레이브 노드에 할당된 데이터 셋(data set)에 대해 독립적으로 병렬 조인 처리가 가능하다. 이러한 장점 때문에 최근 데이터베이스 분할 방법의 중요성이 더욱 강조되고 있다.In the parallel and distributed query processing systems, parallel join processing can be performed independently on a data set allocated to each slave node without exchanging data through a network when processing a join operation. Because of these advantages, the importance of database partitioning method has been emphasized recently.
가장 최근에 제안된 데이터베이스 분할 방법은 두 개의 테이블들 사이의 참조 제한절 및 조인 술어를 활용해 트리 형태의 데이터베이스 분할 계획을 생성하는 방법이다. 해당 데이터베이스 분할 계획은 스키마 그래프(schema graph)에서 얻어지는 최대 신장 트리(maximum spanning tree)를 사용한다. 스키마 그래프는 입력된 테이블 스키마 혹은 쿼리 집합에 대해 테이블을 노드로, 참조 제한절 혹은 조인 술어를 엣지로, 참조 제한절 혹은 조인 술어로부터 얻을 수 있는 동등 조인 술어를 엣지의 레이블(label)로, 그리고 엣지 양 끝 테이블의 크기 중 작은 값을 엣지의 가중치(weight)로 하는 그래프이다. The most recently proposed database partitioning method is a method of generating a database partitioning plan in the form of a tree using a referential constraint and join predicates between two tables. The database partitioning plan uses the maximum spanning tree obtained from the schema graph. The schema graph shows the tables as nodes, the referential constraints or join predicates as edges, the equal join predicates obtained from the referential constraints or join predicates as edge labels, and The graph shows the weight of the edge as the smaller value of the size of both edge tables.
최대 신장 트리를 사용하여 데이터베이스를 분할하는 방법은 트리 내 부모-자식 관계를 맺는 인접한 두 개의 테이블들 R과 S 중 자식 테이블 S를 분할할 경우, 부모 테이블의 P개의 파티션 모두를 참조하여 자식 테이블 S에 속하는 튜플 s
Figure PCTKR2017000346-appb-I000001
내의 파티셔닝 컬럼 값과 부모 테이블의 i 번째 (1 ≤ i ≤P) 파티션의 튜플
Figure PCTKR2017000346-appb-I000002
내의 파티셔닝 컬럼 값이 일치할 경우 튜플 s를 부모 테이블의 i 번째 파티션에 저장하는 방법이다. 이때, 상기 조건을 만족하는 부모 테이블의 파티션의 개수에 따라 자식 테이블에 속하는 튜플 s가 하나 이상의 파티션에 중복되어 저장될 수 있다.
Partitioning a database using a maximum-strength tree involves splitting a child table S out of two adjacent tables R and S that have a parent-child relationship in the tree. Tuples belonging to s
Figure PCTKR2017000346-appb-I000001
A partitioning column value and a tuple of the i th (1 ≤ i ≤ P) partition of the parent table
Figure PCTKR2017000346-appb-I000002
If the partitioning column values in the table match, the tuple s is stored in the i th partition of the parent table. In this case, tuples belonging to the child table may be duplicated and stored in one or more partitions according to the number of partitions of the parent table satisfying the above condition.
하지만, 최대 신장 트리를 사용하여 데이터베이스를 분할하는 방법은 아래와 같은 문제점들을 가지고 있다.However, partitioning the database using the maximum spanning tree has the following problems.
첫째, 최대 신장 트리를 사용하는 방법은 테이블의 분할을 위해 트리 내의 부모에 해당하는 테이블의 파티션을 참조해야 한다. 때문에 부모-자식 관계를 갖는 인접한 두 개의 테이블들은 서로 데이터 의존성(data dependency)을 가지게 되며, 테이블 분할 시에 필요한 부모 테이블의 파티션을 참조하는 연산 횟수가 데이터베이스 크기에 비례해 증가한다. 따라서, 큰 규모의 데이터베이스 분할 시에 데이터 로딩 시간이 매우 증가하는 심각한 문제를 가지고 있다.First, the method of using the maximum spanning tree must refer to the partition of the table corresponding to the parent in the tree to partition the table. Therefore, two adjacent tables having a parent-child relationship have data dependencies with each other, and the number of operations that refer to the partition of the parent table required for partitioning the table increases in proportion to the database size. Therefore, there is a serious problem that the data loading time is greatly increased when partitioning a large database.
둘째, 전술한 데이터 의존성으로 인해 부모 테이블 내의 튜플 분포에 따라 자식 테이블의 파티션 내에서 튜플 수준의 데이터 중복이 심각하게 발생하는 문제를 야기할 수 있다. 즉, 자식 테이블이 부모 테이블의 외래 키로 사용된 컬럼을 참조할 경우 외래 키의 분포가 고유(unique)하지 않기 때문에 데이터 중복 정도가 커질 수 있다. Second, due to the above-described data dependency, tuple-level data duplication may occur seriously in the partition of the child table according to the distribution of tuples in the parent table. That is, when a child table refers to a column used as a foreign key of a parent table, the degree of data redundancy may increase because the distribution of the foreign key is not unique.
셋째, 데이터베이스 스키마 혹은 입력 쿼리 집합의 복잡도가 증가함에 따라 두 테이블 사이에 하나 이상의 참조 제한절 혹은 조인 술어 관계가 존재할 수 있다. Third, as the complexity of the database schema or input query set increases, one or more referential constraints or join predicate relationships can exist between the two tables.
이때, 최대한 많은 수의 참조 제한절 혹은 조인 술어를 파티셔닝 술어로 고려한다면 분할된 데이터베이스의 데이터 로컬리티(data locality)를 증가시킬 수 있다. 하지만, 데이터베이스 분할 계획이 트리 형태를 따를 경우 트리 깊이가 깊어지거나 또는 하나 이상의 트리 형태의 분할 계획을 생성하게 될 수 있다. 이때, 인접한 파티션된 테이블 사이의 데이터 의존성 문제 때문에 트리의 깊이가 깊어질수록 데이터 중복이 중첩되는(cumulative) 정도가 매우 커질 수 있다. In this case, considering the maximum number of referential constraints or join predicates as partitioning predicates, data locality of a partitioned database may be increased. However, if the database partition plan follows the tree shape, the tree depth may be deepened or one or more tree partition plans may be generated. In this case, as the depth of the tree becomes deep due to data dependency between adjacent partitioned tables, the degree of cumulative data overlap may become very large.
또한, 하나 이상의 데이터베이스 분할 계획이 생성될 경우 크기가 큰 테이블이 여러 번 파티셔닝 되는 테이블 수준의 중복이 발생할 수 있다. 이때, 파티셔닝 관계를 포함하는 엣지들의 레이블이 동일할 수 있고, 이에 따라 데이터 중복 정도는 매우 커지지만, 데이터 로컬리티는 증가시키지 못하는 비효율성이 유발될 수 있다.In addition, when more than one database partitioning plan is created, table-level redundancy may occur in which a large table is partitioned several times. At this time, the labels of the edges including the partitioning relationship may be the same, thereby increasing the data redundancy, but may cause inefficiency that does not increase the data locality.
넷째, 트리 구조는 노드 간의 순환 관계(cyclic relationship)를 가질 수 없기 때문에 트리 형태의 파티셔닝 분할 계획 또한 테이블들 사이의 순환 관계를 포함할 수 없다. 즉, 트리 형태의 데이터베이스 분할을 통해서는 순환 조인에 대한 데이터 로컬리티(data locality)를 보장할 수 없다. 하지만, 쿼리가 복잡할수록 순환 조인을 포함하는 경우가 많아진다. 트리 형태의 데이터베이스 분할의 경우, 데이터 로컬리티가 보장되지 못하는 원격 조인 연산(remote join operation)으로 인해 복잡한 쿼리의 처리 성능을 떨어뜨리는 문제가 발생한다.Fourth, since the tree structure cannot have a cyclic relationship between nodes, the tree-shaped partitioning scheme cannot also include a cyclic relationship between tables. In other words, data locality for circular join cannot be guaranteed through a tree-type database partition. However, the more complex the query, the more often it involves circular joins. In the case of tree-type database partitioning, a remote join operation that does not guarantee data locality causes a problem of degrading complex query processing performance.
다섯째, 트리 형태의 데이터베이스 분할은 쿼리 처리 결과의 정확성 및 테이블 분할 시에 발생하는 튜플 수준의 중복을 제거하기 위해, 데이터의 재분할(repartitioning) 연산을 쿼리 실행 계획에 추가하는 쿼리 재작성(query rewriting) 과정을 필요로 한다. 이러한 중복 튜플을 제거하는 방식은 조인 연산이 수행되기 전에 중복된 튜플이 네트워크 통신을 통해 노드 사이에 전송되어야 하기 때문에 파티션의 중복 정도에 따라 쿼리 처리 성능이 느려지는 문제가 발생한다.Fifth, tree-type database partitioning adds repartitioning operations to the query execution plan to eliminate query processing results and tuple-level redundancy. It requires a process. In the method of removing such duplicate tuples, since duplicate tuples must be transmitted between nodes through a network communication before a join operation is performed, a problem arises in that query processing performance is slowed depending on the degree of partition overlap.
상술한 바와 같이, 데이터베이스 분할 방법의 중요성에 비해 쿼리 처리 성능 및 저장 공간 측면 모두를 만족하는 효율적인 데이터베이스 분할 방법 및 이를 활용한 관계형 데이터베이스 저장 시스템의 개발이 잘 이루어지고 있지 못한 것이 실정이다.As described above, it is difficult to develop an efficient database partitioning method that satisfies both query processing performance and storage space, and a relational database storage system using the same, compared to the importance of the database partitioning method.
일 실시예에 따르면, 데이터베이스 스키마 및 일련의 입력 쿼리들에 대하여 그래프 이론을 활용한 비용 모델 기반의 분석을 통해 입력 그래프의 복잡도가 증가하더라도 쿼리의 처리 성능 및 저장 공간의 효율성 측면에서 최적인 그래프 구조의 데이터베이스 분할 계획을 제공할 수 있다. According to an embodiment, a cost model based analysis using graph theory for a database schema and a series of input queries is performed, even though the complexity of the input graph increases, the optimal graph structure in terms of query processing performance and storage space efficiency. Can provide a database partitioning plan.
일 실시예에 따르면, 그래프 구조에서 해당 테이블의 파티셔닝 컬럼만을 사용하여 해시 기반으로 데이터베이스를 분할함으로써 트리 구조에서 부모-자식 관계인 테이블들 간의 데이터 의존성이 발생하지 않는 데이터베이스 분할 계획을 제공할 수 있다. According to an embodiment, by partitioning a database on a hash basis using only partitioning columns of a corresponding table in a graph structure, a database partitioning plan in which data dependency between tables having parent-child relationships in a tree structure does not occur may be provided.
일 실시예에 따르면, 해시 기반의 분할 방법을 사용하여 각 머신에서 독립적으로 테이블을 분할함으로써 데이터 로딩(data loading)의 성능뿐만 아니라 데이터 확장성(scalability) 또한 보장할 수 있다.According to an embodiment, partitioning tables independently on each machine using a hash-based partitioning method may ensure data scalability as well as performance of data loading.
일 실시예에 따르면, 하나 이상의 참조 제한절 혹은 조인 술어 관계에 있는 테이블 관계를 그래프 구조, 특히 멀티 그래프 구조로 표현함으로써 테이블들 간의 순환 조인 관계 혹은 순환 참조 관계를 표현할 수 있다.According to an embodiment, a table relation in one or more referential constraints or join predicate relations may be represented by a graph structure, in particular, a multi graph structure, thereby expressing a circular join relationship or a circular reference relationship between tables.
일 실시예에 따르면, 테이블이 포함하는 엣지들의 파티셔닝 술어 정보 내에 포함된 파티셔닝 컬럼들의 정보에 대한 데이터 의존성이 없는 해시 기반의 분할을 통해 데이터 중복 정도를 크게 줄일 수 있다.According to an embodiment, the degree of data redundancy may be greatly reduced through hash-based partitioning without data dependency on information of partitioning columns included in partitioning predicate information of edges included in a table.
일 실시예에 따르면, 테이블의 파티션 내에 포함된 각 튜플 수준에서 튜플 중복 정보를 포함하는 비트맵 벡터의 집합인 비트맵 테이블을 활용해 테이블의 재분할 과정 없이 각 노드에서 독립적으로 스캔 연산 시 중복을 제거할 수 있다. According to an embodiment, a bitmap table, which is a set of bitmap vectors containing tuple overlapping information at each tuple level included in a partition of a table, is used to remove duplicates in a scan operation independently at each node without repartitioning the table. can do.
일 실시예에 따르면, 비트 맵 벡터를 활용한 서브 파티셔닝 방법을 이용함으로써 중복 제거를 고려한 스캔 연산의 수행 시에 비트맵 테이블 접근으로 인한 추가적인 오버헤드를 줄이는 한편, 쿼리 재작성 과정의 오버헤드 없이 추가적인 쿼리의 처리 성능을 향상시킬 수 있다. According to an embodiment, by using a subpartitioning method using a bitmap vector, an additional overhead due to a bitmap table access is reduced when performing a scan operation considering deduplication, and without additional overhead of a query rewriting process. Can improve query processing performance.
일 실시예에 따르면, 서브 파티셔닝(sub partitioning) 개념을 기반으로 분할된 테이블에 대한 쿼리 처리 시에 필요한 일부 서브 파티션만 읽는 스캔 연산을 활용해 쿼리의 처리 성능을 향상시킬 수 있다. According to an embodiment, based on the concept of sub partitioning, the processing performance of a query may be improved by using a scan operation that reads only some of the subpartitions required when processing a query on a partitioned table.
일 측에 따르면, 관계형 데이터베이스 저장 방법은 데이터베이스 테이블들 간의 참조 및 제약 조건에 대한 정보를 포함하는 데이터베이스 스키마(database schema) 및 조인 술어(join predicate) 정보를 포함하는 쿼리 집합(query set) 중 적어도 하나를 기초로, 테이블들 및 엣지들을 포함하는 조인 그래프(join graph)를 생성하는 단계; 상기 조인 그래프에 포함된 테이블들 간의 조인 연산의 비용에 기초하여 상기 테이블들의 타입을 구분하는 단계; 엣지에 의해 서로 연결되는 상기 테이블들의 타입에 기초하여, 상기 조인 그래프 내의 엣지들의 타입을 구분하는 단계; 상기 조인 그래프 내에서 간접 엣지 조건을 만족하는 두 테이블 사이에 가상의 엣지를 추가하는 단계; 및 상기 가상의 엣지를 포함하는 엣지들의 타입에 기초하여, 상기 조인 그래프에 대한 데이터베이스 분할 계획을 생성하는 단계를 포함한다. According to one side, the relational database storage method is at least one of a database schema including information about references and constraints between the database tables and a query set including the join predicate information Based on the step of generating a join graph comprising tables and edges; Classifying the types of the tables based on a cost of a join operation between the tables included in the join graph; Distinguishing a type of edges in the join graph based on the type of the tables connected to each other by an edge; Adding a virtual edge between two tables that satisfy an indirect edge condition in the join graph; And generating a database partitioning plan for the join graph based on the type of edges including the virtual edge.
상기 조인 그래프를 생성하는 단계는 상기 참조 및 제약 조건에 대한 정보 및 상기 조인 술어 정보 중 적어도 하나를 이용하여 상기 조인 그래프에 포함된 테이블들 간의 엣지를 구성하는 단계를 포함할 수 있다. The generating of the join graph may include configuring an edge between tables included in the join graph by using at least one of the information about the reference and the constraint and the join predicate information.
상기 테이블들의 타입을 구분하는 단계는 상기 조인 그래프 내의 테이블과 상기 테이블에 인접한 인접 테이블들 간의 조인 연산(join operation)의 비용에 기초하여 상기 테이블들의 타입을 구분하는 단계를 포함할 수 있다.The classifying the types of the tables may include classifying the types of the tables based on a cost of a join operation between a table in the join graph and adjacent tables adjacent to the table.
상기 테이블들의 타입을 구분하는 단계는 상기 테이블과 상기 인접 테이블들의 집합 정보를 기초로, 상기 테이블을 기억 장치에 분할 저장하는 경우의 제1 조인 연산 비용의 합 및 상기 테이블을 복수 개의 슬레이브 노드들에 복제하는 경우의 제2 조인 연산 비용의 합을 산출하는 단계; 상기 제1 조인 연산 비용의 합과 상기 제2 조인 연산 비용의 합 간의 비교 결과에 따라 상기 테이블의 타입을 제1 타입 및 제2 타입 중 어느 하나로 구분하는 단계; 및 상기 구분된 테이블의 타입에 따라 상기 테이블을 저장하는 단계를 포함할 수 있다. The dividing of the types of the tables may include: a sum of first join operation costs when the table is divided and stored in a storage device and the table to a plurality of slave nodes based on the aggregate information of the table and the adjacent tables. Calculating a sum of the cost of the second join operation when replicating; Dividing the type of the table into one of a first type and a second type according to a comparison result between the sum of the first join operation cost and the second join operation cost; And storing the table according to the type of the divided table.
상기 엣지들 각각의 타입을 구분하는 단계는 상기 엣지에 의해 서로 연결되는 테이블들의 타입에 기초하여, 상기 엣지들 각각의 타입을 인터 엣지(inter edge) 및 인트라 엣지(intra edge) 중 어느 하나로 구분하는 단계를 포함할 수 있다. The dividing of each type of the edges may include dividing each type of the edges into one of an inter edge and an intra edge, based on a type of tables connected to each other by the edges. It may include a step.
상기 인터 엣지 및 인트라 엣지 중 어느 하나로 구분하는 단계는 상기 엣지에 의해 서로 연결되는 테이블들의 타입이 모두 제1 타입인 경우, 상기 엣지의 타입을 인트라 엣지로 결정하는 단계; 및 상기 엣지에 의해 서로 연결되는 테이블들의 타입 중 어느 하나의 타입은 제1 타입이고, 다른 하나의 타입은 제2 타입인 경우, 상기 엣지의 타입을 인터 엣지로 결정하는 단계를 포함할 수 있다. The dividing into any one of the inter edge and the intra edge may include determining the type of the edge as an intra edge when all types of tables connected to each other by the edge are the first type; And when one type of the tables connected to each other by the edge is the first type and the other type is the second type, determining the type of the edge as the inter edge.
상기 가상의 엣지를 추가하는 단계는 상기 조인 그래프 내에 포함된 제1 타입의 테이블들의 쌍(pair)가 상기 간접 엣지 조건을 만족하는지 여부를 검사하는 단계; 및 상기 간접 엣지 조건을 만족하는 제1 타입의 테이블들의 쌍 사이에 상기 가상의 엣지를 추가하는 단계를 포함할 수 있다. The adding of the virtual edge may include checking whether a pair of tables of a first type included in the join graph satisfy the indirect edge condition; And adding the virtual edge between the pair of tables of the first type that satisfies the indirect edge condition.
상기 간접 엣지 조건은 상기 제1 타입의 테이블들의 쌍인 제1 테이블과 제2 테이블이 동일한 제3 테이블과 상기 제1 테이블의 제1 엣지 및 상기 제2 테이블의 제2 엣지를 통해 연결되는 제1 조건; 상기 제1 엣지 및 상기 제2 엣지의 레이블에 상기 제3 테이블의 동일 컬럼이 포함되어 있는 제2 조건; 및 상기 제3 테이블의 타입이 제2 타입인 제3 조건을 포함할 수 있다. The indirect edge condition is a first condition in which a first table, which is a pair of tables of the first type, and a second table are connected through the same third table, a first edge of the first table, and a second edge of the second table. ; A second condition that the same column of the third table is included in the labels of the first edge and the second edge; And a third condition that the type of the third table is the second type.
상기 데이터베이스 분할 계획을 생성하는 단계는 상기 엣지들의 타입에 따라, 상기 엣지들을 이용하여 제1 타입의 테이블에 의해 상기 조인 연산을 수행할 때의 이득(benefit)을 계산하는 단계; 상기 이득이 큰 순서로 상기 엣지들을 정렬하는 단계; 상기 조인 그래프 내 제1 타입의 테이블들을 노드로 하는 분할 그래프를 초기화하는 단계; 및 상기 정렬된 순서로 상기 엣지들을 처리함으로써, 상기 분할 그래프를 갱신하는 단계를 포함할 수 있다. The generating of the database partitioning plan may include calculating, according to the type of the edges, a gain when performing the join operation by using a table of a first type using the edges; Sorting the edges in ascending order of gain; Initializing a partition graph having nodes of a first type of tables in the join graph; And updating the segmentation graph by processing the edges in the sorted order.
상기 엣지들의 타입은 인트라 엣지, 인터 엣지 및 간접 엣지 중 적어도 하나를 포함하고, 상기 이득을 계산하는 단계는 상기 엣지들의 타입에 따른 서로 다른 분할 이득 모델을 사용하여 상기 이득을 계산하는 단계를 포함할 수 있다. The types of edges include at least one of an intra edge, an inter edge, and an indirect edge, and the calculating of the gains includes calculating the gains using different split gain models according to the types of edges. Can be.
상기 분할 그래프를 갱신하는 단계는 상기 데이터베이스 분할 계획에 기초하여, 상기 조인 그래프 내의 엣지에 대해서 삼각 엣지 조건을 만족하는 인접한 두 개의 삼각 엣지를 탐색하는 단계; 상기 데이터베이스 분할 계획에 기초하여, 상기 조인 그래프 내의 엣지에 대해서 허브 테이블 조건을 만족하는 허브 테이블을 탐색하는 단계; 및 상기 엣지, 상기 두 개의 삼각 엣지, 및 상기 허브 테이블을 상기 분할 그래프에 추가하는 단계를 더 포함할 수 있다. The updating of the segmentation graph may include searching for two adjacent triangular edges that satisfy a triangular edge condition for edges in the join graph based on the database partition scheme; Searching for a hub table that satisfies a hub table condition for an edge in the join graph based on the database partitioning plan; And adding the edge, the two triangular edges, and the hub table to the segmentation graph.
상기 삼각 엣지 조건은 상기 조인 그래프 내의 상기 엣지의 타입이 인트라 엣지인 조건; 상기 인트라 엣지에 연결된 제1 타입의 두 개의 테이블들 각각의 엣지들이 존재하고, 상기 각각의 엣지들이 동일한 테이블과 연결되는 조건; 상기 각각의 엣지들의 레이블들이 상기 동일한 테이블의 컬럼을 포함하는 조건; 및 상기 동일한 테이블의 타입이 제2 타입인 조건을 포함할 수 있다. The triangular edge condition is a condition that the type of the edge in the join graph is an intra edge; A condition that edges of each of two tables of a first type connected to the intra edge are present, and wherein each of the edges is connected to the same table; A condition in which the labels of each of the edges include a column of the same table; And a condition that the type of the same table is the second type.
상기 허브 테이블 조건은 상기 조인 그래프 내의 상기 엣지의 타입이, 제1 타입의 두 개의 테이블들 사이의 인트라 엣지 또는 간접 엣지이고, 상기 제1 타입의 두 개의 테이블들 각각의 엣지가 상기 삼각 엣지 조건에 따라 제2 타입으로 구분된 하나 이상의 공통 테이블의 컬럼에 대하여 상기 삼각 엣지 조건을 만족하는 엣지들인 조건을 포함할 수 있다. The hub table condition is that the type of the edge in the join graph is an intra edge or an indirect edge between two tables of the first type, and the edge of each of the two tables of the first type is the triangular edge condition. Accordingly, a condition that is edges satisfying the triangular edge condition may be included with respect to one or more columns of the common table classified as the second type.
상기 관계형 데이터베이스 저장 방법은 상기 데이터베이스 분할 계획에 기초하여, 상기 테이블들에 포함된 튜플들(tuples)을 해시(hash) 함수 기반으로 분할하는 단계; 및 상기 분할된 튜플들 각각에 대응하는 파티션 내에, 해당하는 튜플의 파티셔닝 컬럼과 관련된 정보에 기초하여 상기 해당하는 튜플을 저장하는 단계를 더 포함할 수 있다. The relational database storage method may further include: splitting tuples included in the tables based on a hash function based on the database partitioning plan; And storing the corresponding tuple in a partition corresponding to each of the divided tuples based on information associated with a partitioning column of the corresponding tuple.
상기 해시 기반으로 분할하는 단계는 상기 튜플들의 모든 파티셔닝 컬럼값에 대한 해시 함수 기반으로 해당 튜플이 저장될 파티션의 위치를 결정하는 단계; 파티셔닝 컬럼 집합 내에서의 해당 파티셔닝 컬럼의 인덱스 정보를 이용하여 비트맵 벡터를 생성하는 단계; 및 상기 비트맵 벡터를 이용하여 상기 테이블의 비트맵 테이블에 상기 해당 튜플의 비트맵 벡터 정보를 업데이트하는 단계를 포함할 수 있다. The partitioning based on the hash may include determining a location of a partition in which the corresponding tuple is to be stored, based on a hash function of all partitioning column values of the tuples; Generating a bitmap vector using index information of the corresponding partitioning column in the partitioning column set; And updating bitmap vector information of the corresponding tuple in the bitmap table of the table by using the bitmap vector.
상기 해당하는 튜플을 저장하는 단계는 상기 분할된 튜플들 각각에 대응하는 파티션마다 셔플되어 온 튜플 리스트가 포함된 테이블의 파티셔닝 컬럼 정보를 이용하여 비트맵 벡터 집합을 생성하는 단계; 상기 비트맵 벡터 집합에 포함된 비트맵 벡터에 대한 서브 파티션을 초기화하는 단계; 상기 튜플 리스트에 포함된 각 튜플에 대응하는 비트맵 벡터를 이용하여 해당하는 서브 파티션에 상기 각 튜플을 저장하는 단계; 및 상기 튜플 리스트에 포함된 모든 튜플이 상기 서브 파티션에 저장된 경우, 모든 서브 파티션들의 합집합에 의해 상기 튜플 리스트가 포함된 테이블의 파티션을 구성하는 단계를 포함할 수 있다. The storing of the corresponding tuple may include generating a bitmap vector set by using partitioning column information of a table including a list of tuples shuffled for each partition corresponding to each of the divided tuples; Initializing a subpartition for a bitmap vector included in the bitmap vector set; Storing each tuple in a corresponding subpartition using a bitmap vector corresponding to each tuple included in the tuple list; And when all tuples included in the tuple list are stored in the subpartition, configuring the partition of the table including the tuple list by the union of all the subpartitions.
일 측에 따르면, 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법은 테이블이 입력 쿼리 내의 조인 연산에서 사용되는지 여부를 판단하는 단계; 상기 테이블의 분할 칼럼 정보를 통해 상기 테이블의 제1 파티셔닝 컬럼 집합 및 상기 테이블과 조인될 테이블의 제2 파티셔닝 컬럼 집합 간의 교집합이 공집합인지 여부를 판단하는 단계; 상기 판단에 기초하여 결정된 상기 테이블의 스캔 모드에 따라, 상기 테이블과 관련된 어느 하나의 파티셔닝 컬럼을 선택하는 단계; 상기 선택된 어느 하나의 파티셔닝 컬럼에 대응하는 비트맵 벡터의 리스트를 계산하는 단계; 상기 비트맵 벡터의 리스트에 포함된 적어도 하나의 비트맵 벡터에 대응하는 서브 파티션을 선택하는 단계; 및 상기 선택된 서브 파티션을 스캔하는 단계를 포함한다. According to one side, a method for processing a query based on the relational database storage method comprising the steps of determining whether the table is used in a join operation in the input query; Determining whether the intersection between the first partitioning column set of the table and the second partitioning column set of the table to be joined with the table is empty by using the partition column information of the table; Selecting one partitioning column associated with the table according to the scan mode of the table determined based on the determination; Calculating a list of bitmap vectors corresponding to the selected partitioning column; Selecting a subpartition corresponding to at least one bitmap vector included in the list of bitmap vectors; And scanning the selected subpartition.
상기 어느 하나의 파티셔닝 컬럼을 선택하는 단계는 상기 판단에 기초하여 상기 테이블을 판독할 제1 스캔 모드 및 제2 스캔 모드 중 어느 하나의 스캔 모드를 결정하는 단계; 및 상기 어느 하나의 스캔 모드에 따라, 상기 교집합에 포함된 파티셔닝 컬럼 및 상기 제1 파티셔닝 컬럼 집합에 포함된 파티셔닝 컬럼 중 어느 하나의 파티셔닝 컬럼을 선택하는 단계를 포함할 수 있다. The selecting of any one partitioning column may include determining one of a first scan mode and a second scan mode to read the table based on the determination; And selecting one partitioning column among the partitioning column included in the intersection and the partitioning column included in the first partitioning column set according to any one of the scan modes.
일 측에 따르면, 그래프 기반의 데이터베이스 분할 계획을 통해 테이블의 갯수 및 테이블들 간의 관계가 매우 복잡한 데이터베이스 스키마 및 입력 쿼리 집합에 대한 데이터 중복을 낮추는 한편, 쿼리의 처리 성능을 향상시킬 수 있다. According to one side, the graph-based database partitioning plan can improve the processing performance of the query while reducing data redundancy for a database schema and a set of input queries with a very large number of tables and relationships between the tables.
일 측에 따르면, 삼각 엣지 탐색과 같은 그래프 이론을 활용함으로써 입력 스키마 혹은 쿼리 집합 내에 테이블 간의 순환 참조 관계 및 순환 조인 관계를 포함하는 쿼리의 처리를 위한 데이터 로컬리티를 최대한 보장하면서 데이터 중복은 낮은 데이터베이스 분할 계획을 생성할 수 있다.According to one side, a database with low data redundancy while maximizing data locality for processing queries including circular reference relationships and circular join relationships between tables in an input schema or query set by utilizing graph theory such as triangular edge search. You can create a split plan.
일 측에 따르면, 서브 파티셔닝에 의해 중복된 튜플을 포함하는 파티션을 사용하는 쿼리의 처리 시에 중복 제거를 위한 재분할 과정을 추가하기 위한 쿼리의 재작성 과정이 없이도 노드 상에서 스캔 연산을 수행하는 동시에 독립적으로 중복을 제거할 수 있다. According to one side, independent processing of a scan operation on a node without rewriting a query to add a repartitioning process for deduplication when processing a query using a partition including a duplicate tuple by subpartitioning You can remove duplicates with
일 측에 따르면, 그래프 구조의 데이터베이스 분할 계획에 포함되어 있는 파티셔닝 컬럼 정보를 활용한 튜플 수준의 해시 기반의 분할 방법을 이용함으로써 트리 구조에서 부모-자식 관계의 테이블 간에 존재하는 데이터 의존성 문제의 발생을 차단할 수 있다. According to one side, by using a tuple-level hash-based partitioning method using partitioning column information included in the database partitioning plan of the graph structure, the occurrence of data dependency problem exists between the parent-child tables in the tree structure. You can block.
일 측에 따르면, 그래프 구조의 데이터베이스 분할 계획에 포함되어 있는 파티셔닝 컬럼 정보를 활용한 튜플 수준의 해시 기반의 분할 방법을 이용함으로써 데이터 로딩 시의 파티션 참조 연산으로 인한 데이터 로딩 성능의 저하를 해소하고, 데이터 중복이 중첩되는 현상을 방지할 수 있다. According to one side, by using the tuple-level hash-based partitioning method using the partitioning column information included in the database partitioning plan of the graph structure to solve the degradation of data loading performance due to partition reference operation during data loading, Data duplication can be prevented from overlapping.
도 1은 일 실시예에 따른 관계형 데이터베이스 저장 시스템의 구조를 나타낸 도면.1 illustrates the structure of a relational database storage system according to one embodiment.
도 2는 실시예들에서 사용되는 심볼 및 심볼의 의미를 나타낸 표를 도시한 도면.2 is a table showing symbols and meanings of symbols used in embodiments.
도 3은 일 실시예에 따른 관계형 데이터베이스 저장 방법을 나타낸 흐름도. 3 is a flow diagram illustrating a relational database storage method according to one embodiment.
도 4는 일 실시예에 따라 테이블들의 타입을 구분하는 방법을 나타낸 흐름도.4 is a flowchart illustrating a method of classifying types of tables according to an embodiment.
도 5는 일 실시예에 따라 엣지들의 타입을 구분하는 방법을 나타낸 흐름도.5 is a flowchart illustrating a method of classifying edge types according to an embodiment.
도 6은 일 실시예에 따라 가상의 엣지를 추가하는 방법을 나타낸 흐름도.6 is a flowchart illustrating a method of adding a virtual edge according to an embodiment.
도 7은 일 실시예에 따라 데이터베이스 분할 계획을 생성하는 방법을 나타낸 흐름도.7 is a flowchart illustrating a method of generating a database partitioning plan according to one embodiment.
도 8은 일 실시예에 따라 삼각 엣지를 탐색하는 방법을 나타낸 흐름도.8 is a flowchart illustrating a method of searching for a triangular edge according to an embodiment.
도 9는 일 실시예에 따라 허브 테이블을 탐색하는 방법을 나타낸 흐름도.9 is a flowchart illustrating a method of searching a hub table according to an embodiment.
도 10은 일 실시예에 따른 마스터 노드에 포함된 데이터 로더의 맵(Map) 동작을 나타낸 흐름도.10 is a flowchart illustrating a map operation of a data loader included in a master node according to an embodiment.
도 11은 일 실시예에 따른 마스터 노드에 포함된 데이터 로더의 리듀스(Reduce) 동작을 나타낸 흐름도.11 is a flowchart illustrating a reduce operation of a data loader included in a master node according to an embodiment.
도 12는 일 실시예에 따른 비트맵 테이블을 이용하여 테이블을 분할 저장할 때의 파티션의 일 예를 도시한 도면.12 is a diagram illustrating an example of a partition when partitioning and storing a table using a bitmap table, according to an embodiment.
도 13은 일 실시예에 따른 서브 파티셔닝에 의해 테이블을 분할 저장할 때의 파티션의 일 예를 도시한 도면.FIG. 13 illustrates an example of a partition when partitioning and storing a table by subpartitioning according to an embodiment; FIG.
도 14는 일 실시예에 따라 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법을 나타낸 흐름도.14 is a flow diagram illustrating a method of processing a query based on a relational database storage method, according to one embodiment.
이하에서, 첨부된 도면을 참조하여 실시예들을 상세하게 설명한다. 그러나, 특허출원의 범위가 이러한 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. However, the scope of the patent application is not limited or limited by these embodiments. Like reference numerals in the drawings denote like elements.
아래 설명하는 실시예들에는 다양한 변경이 가해질 수 있다. 아래 설명하는 실시예들은 실시 형태에 대해 한정하려는 것이 아니며, 이들에 대한 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Various modifications may be made to the embodiments described below. The examples described below are not intended to be limited to the embodiments and should be understood to include all modifications, equivalents, and substitutes for them.
실시예에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 실시예를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of examples. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, terms such as "comprise" or "have" are intended to indicate that there is a feature, number, step, action, component, part, or combination thereof described on the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. Terms such as those defined in the commonly used dictionaries should be construed as having meanings consistent with the meanings in the context of the related art and shall not be construed in ideal or excessively formal meanings unless expressly defined in this application. Do not.
또한, 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조부호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 실시예의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.In addition, in the description with reference to the accompanying drawings, the same components regardless of reference numerals will be given the same reference numerals and duplicate description thereof will be omitted. In the following description of the embodiment, when it is determined that the detailed description of the related known technology may unnecessarily obscure the gist of the embodiment, the detailed description thereof will be omitted.
도 1은 일 실시예에 따른 관계형 데이터베이스 저장 시스템의 구조를 나타낸 도면이다. 도 1을 참조하면, 일 실시예에 따른 관계형 데이터베이스 저장 시스템은 마스터 노드(110) 및 N개의 슬레이브 노드들(150-1, .. 150-N)을 포함한다. 마스터 노드(110) 및 N개의 슬레이브 노드들(150-1, .. 150-N)은 네트워크로 연결된 클러스터(cluster)로 구성될 수 있다. 1 is a diagram illustrating a structure of a relational database storage system according to an embodiment. Referring to FIG. 1, a relational database storage system according to an embodiment includes a master node 110 and N slave nodes 150-1,... 150 -N. The master node 110 and the N slave nodes 150-1,... 150 -N may be configured as a cluster connected by a network.
마스터 노드(110)는 데이터베이스 분할 결정기(120), 테이블 분할 저장 장치(130) 및 분할된 테이블 읽기 장치(140)를 포함할 수 있다. The master node 110 may include a database partition determiner 120, a table partition storage device 130, and a partitioned table reading device 140.
데이터베이스 분할 결정기(120)는 테이블 구분 모듈(121), 엣지 구분 모듈(122), 간접 엣지 탐색 모듈(123), 삼각 엣지 탐색 모듈(124), 허브 테이블 탐색 모듈(125) 및 데이터베이스 분할 계획 생성기(126)를 포함할 수 있다. 데이터베이스 분할 결정기(120)의 동작은 도 3 내지 도 9를 참조하여 설명한다.The database partition determiner 120 may include a table partitioning module 121, an edge partitioning module 122, an indirect edge search module 123, a triangular edge search module 124, a hub table search module 125, and a database partition plan generator ( 126). The operation of the database partition determiner 120 will be described with reference to FIGS. 3 to 9.
테이블 분할 저장 장치(130)는 데이터 로더(135)를 포함할 수 있다. 데이터 로더(135)는 맵 동작 및 리듀스 동작을 수행할 수 있다. 데이터 로더(135)의 동작은 도 10 내지 도 13을 참조하여 설명한다. The table partition storage device 130 may include a data loader 135. The data loader 135 may perform a map operation and a reduce operation. The operation of the data loader 135 will be described with reference to FIGS. 10 to 13.
분할된 테이블 읽기 장치(140)는 관계형 데이터베이스 저장 방법에 기초한 쿼리를 판독하여 쿼리를 처리할 수 있다. 분할된 테이블 읽기 장치(140)의 동작은 도 14를 참조하여 설명한다. The partitioned table reading device 140 may process a query by reading a query based on a relational database storage method. The operation of the partitioned table reading device 140 will be described with reference to FIG. 14.
슬레이브 노드들(150) 각각은 CPU(151), 주 기억 장치(153) 및 보조 기억 장치(157)를 포함한다. 주 기억 장치(153) 및 보조 기억 장치(157)는 각각 해당 슬레이브 노드에 대응하는 데이터베이스 파티션 1(155, 159)를 저장할 수 있다. Each of the slave nodes 150 includes a CPU 151, a main memory 153, and an auxiliary memory 157. The main memory 153 and the auxiliary memory 157 may store database partitions 1 155 and 159 corresponding to the corresponding slave nodes, respectively.
슬레이브 노드들(150)에는 N개로 분할된 데이터베이스 파티션이 각 슬레이브 노드당 한 파티션씩 분산 저장될 수 있다. 데이터베이스 파티션은 각 슬레이브 노드의 주기억 장치(153) 및 보조 기억 장치(157) 모두에 저장될 수 있다. 예를 들어, 인-메모리 쿼리 처리 시스템의 경우, CPU(151)는 주기억 장치(153)에 저장되어 있는 데이터베이스 파티션(155)을 사용해 쿼리를 처리할 수 있다. 또한, 디스크 기반의 쿼리 처리 시스템의 경우, CPU(151)는 보조 기억 장치(157)에 저장된 데이터베이스 파티션(159)을 사용해 쿼리를 처리할 수 있다. In the slave nodes 150, N partitioned database partitions may be distributed and stored in one partition for each slave node. The database partition may be stored in both the main memory 153 and the auxiliary memory 157 of each slave node. For example, in an in-memory query processing system, the CPU 151 may process a query using a database partition 155 stored in the main memory 153. In addition, in the case of a disk-based query processing system, the CPU 151 may process a query using the database partition 159 stored in the auxiliary storage device 157.
이하의 실시예들에서 사용되는 심볼 및 심볼의 의미는 도 2에 도시된 표를 참조한다. The symbols used in the following embodiments and the meanings of the symbols refer to the table shown in FIG. 2.
도 3은 일 실시예에 따른 관계형 데이터베이스 저장 방법을 나타낸 흐름도이다. 도 3을 참조하면, 도 1에 도시된 마스터 노드(110)(의 데이터베이스 분할 결정기(120))가 데이터베이스 분할 계획을 생성하는 방법이 도시된다. 3 is a flowchart illustrating a relational database storage method according to an embodiment. Referring to FIG. 3, a method is shown in which the master partition 110 (of database partition determiner 120) shown in FIG. 1 generates a database partition plan.
마스터 노드는 데이터베이스 테이블들 간의 참조 및 제약 조건에 대한 정보를 포함하는 데이터베이스 스키마(database schema) 및 조인 술어(join predicate) 정보를 포함하는 쿼리 집합(query set)를 기초로, 테이블들 및 엣지들을 포함하는 조인 그래프(join graph)를 생성한다(310). 데이터베이스 테이블들 간의 참조 및 제약 조건에 대한 정보는 '참조 제한 관계 정보'라고도 부를 수 있다. The master node includes tables and edges, based on a database schema that contains information about references and constraints between database tables, and a query set that includes join predicate information. Create a join graph (310). Information about references and constraints between database tables may be referred to as 'reference constraint relationship information'.
데이터베이스 스키마는 예를 들어, 데이터베이스를 구성하는 데이터 개체(Entity), 속성(Attribute), 관계(Relationship) 및 데이터 조작 시 데이터 값들이 갖는 제약 조건 등을 정의할 수 있다. The database schema may define, for example, data entities, attributes, relationships, and constraints of data values constituting the database.
마스터 노드는 입력으로 주어진 데이터베이스 스키마 또는 입력 쿼리 집합에 대한 테이블(데이터베이스 테이블)을 조인 그래프의 노드로 구성할 수 있다. The master node can construct a table (database table) for a given database schema or input query set as nodes in a join graph.
마스터 노드는 참조 제한 관계 정보 및 조인 술어 정보 중 적어도 하나를 이용하여 조인 그래프에 포함된 테이블들 간의 엣지를 구성할 수 있다. The master node may configure edges between tables included in the join graph by using at least one of reference constraint relationship information and join predicate information.
데이터베이스 스키마가 입력으로 주어진 경우, 마스터 노드는 데이터베이스 스키마에 포함된 두 테이블들 간의 참조 제한 관계 정보를 활용하여 조인 그래프의 테이블 간의 엣지를 구성할 수 있다. 또는 쿼리 집합이 입력으로 주어진 경우, 마스터 노드는 쿼리 집합의 쿼리 내에 포함된 조인 술어 정보를 활용해 조인 그래프 내의 테이블 간의 엣지를 구성할 수 있다. 이때, 엣지의 레이블(label)은 엣지의 양 끝에 연결된 두 테이블의 파티셔닝 컬럼 정보를 활용하여 구성할 수 있다. 참조 제한 관계에서 참조-피참조 관계는 동등 조인 술어로 고려될 수 있다. 예를 들어, 데이터베이스 스키마가 입력으로 주어진 경우, 마스터 노드는 모든 엣지의 가중치(weight)를 '1'로 설정할 수 있다. 또는 쿼리 집합이 입력으로 주어진 경우, 마스터 노드는 쿼리 집합의 쿼리 내에 해당 조인 술어가 포함되어 있는 빈도수를 엣지의 가중치로 설정할 수 있다. If the database schema is given as input, the master node can construct the edge between the tables in the join graph by using the referential constraint relationship information between the two tables included in the database schema. Alternatively, if a query set is given as input, the master node can construct the edges between the tables in the join graph using the join predicate information contained in the query in the query set. In this case, the label of the edge may be configured by using partitioning column information of two tables connected at both ends of the edge. In a referential constraint, a referential-referred relationship can be considered as an equal join predicate. For example, if a database schema is given as input, the master node can set the weight of all edges to '1'. Alternatively, if a query set is given as an input, the master node may set the frequency of the join predicate included in the query of the query set as the weight of the edge.
마스터 노드는 조인 그래프에 포함된 테이블들 간의 조인 연산의 비용에 기초하여 테이블들의 타입을 구분한다(320). 마스터 노드는 조인 그래프 내의 테이블과 테이블에 인접한 인접 테이블들 간의 조인 연산(join operation)의 비용에 기초하여 테이블들의 타입을 구분할 수 있다. 조인 연산의 비용은 예를 들어, 조인 연산의 비용 모델에 의해 산출될 수 있다. 조인 연산의 비용 모델은 조인 연산의 처리 시에 발생하는 조인 테이블들의 스캔 비용의 합으로 정의될 수 있다. The master node classifies the types of tables based on the cost of the join operation between the tables included in the join graph (320). The master node may classify the types of tables based on the cost of a join operation between the tables in the join graph and adjacent tables adjacent to the tables. The cost of the join operation can be calculated, for example, by the cost model of the join operation. The cost model of the join operation may be defined as the sum of the scan costs of the join tables occurring in the processing of the join operation.
마스터 노드는 테이블과 인접 테이블들의 집합 정보를 기초로, 테이블을 기억 장치에 분할 저장하는 경우의 제1 조인 연산 비용의 합 및 테이블을 복수 개의 슬레이브 노드들에 복제하는 경우의 제2 조인 연산 비용의 합을 산출할 수 있다. 마스터 노드는 제1 조인 연산 비용의 합과 제2 조인 연산 비용의 합 간의 비교 결과에 따라 테이블의 타입을 제1 타입 및 제2 타입 중 어느 하나로 구분하고, 구분된 테이블의 타입에 따라 테이블을 저장할 수 있다. 제1 타입은 예를 들어, '분할할 테이블(Part-table)' 타입이고, 제2 타입은 예를 들어, '복제할 테이블(Rep-table)' 타입일 수 있다. 마스터 노드가 테이블들의 타입을 구분하는 방법은 도 4를 참조하여 구체적으로 설명한다. The master node is based on the aggregate information of the table and the adjacent tables, the sum of the first join operation cost when the table is stored in the storage unit and the second join operation cost when the table is replicated to the plurality of slave nodes. The sum can be calculated. The master node divides the table type into one of the first type and the second type according to the comparison result between the sum of the first join operation cost and the second join operation cost, and stores the table according to the divided table type. Can be. The first type may be, for example, a 'Part-table' type, and the second type may be, for example, a 'Rep-table' type. A method of distinguishing the types of tables by the master node will be described in detail with reference to FIG. 4.
마스터 노드는 엣지에 의해 서로 연결되는 테이블들의 타입에 기초하여, 조인 그래프 내의 엣지들의 타입을 구분한다(330). 마스터 노드는 엣지에 의해 서로 연결되는 테이블들의 타입에 기초하여, 엣지들 각각의 타입을 인터 엣지(inter edge) 및 인트라 엣지(intra edge) 중 어느 하나로 구분할 수 있다. 마스터 노드가 엣지들의 타입을 구분하는 방법은 도 5를 참조하여 설명한다. The master node distinguishes the types of edges in the join graph based on the types of tables connected by the edges (330). The master node may classify each type of edge into one of an inter edge and an intra edge based on the types of tables connected to each other by the edge. A method of distinguishing the types of edges by the master node will be described with reference to FIG. 5.
마스터 노드는 조인 그래프 내에서 간접 엣지 조건을 만족하는 두 테이블 사이에 가상의 엣지를 추가한다(340). 간접 엣지 조건 및 마스터 노드가 가상의 엣지를 추가하는 방법은 도 6을 참조하여 설명한다. The master node adds a virtual edge between two tables satisfying the indirect edge condition in the join graph (340). An indirect edge condition and a method of adding a virtual edge by the master node will be described with reference to FIG. 6.
마스터 노드는 가상의 엣지를 포함하는 엣지들의 타입에 기초하여, 조인 그래프에 대한 데이터베이스 분할 계획을 생성한다(350). 마스터 노드는 엣지들의 타입에 따라, 엣지들을 이용하여 제1 타입의 테이블에 의해 조인 연산을 수행할 때의 이득(benefit)을 계산하고, 이득이 큰 순서로 엣지들을 정렬할 수 있다. The master node generates a database partitioning plan for the join graph based on the types of edges including the virtual edge (350). The master node may calculate a gain when performing a join operation by a table of the first type using the edges according to the types of edges, and sort the edges in the order of gain.
마스터 노드는 조인 그래프 내 제1 타입의 테이블들을 노드로 하는 분할 그래프를 초기화할 수 있다. 마스터 노드는 정렬된 순서로 엣지들을 처리함으로써, 분할 그래프를 갱신할 수 있다. 마스터 노드가 데이터베이스 분할 계획을 생성하는 방법은 도 7을 참조하여 구체적으로 설명한다. The master node may initialize a split graph that uses the first type of tables in the join graph as nodes. The master node can update the segmentation graph by processing the edges in sorted order. A method of generating a database partition plan by the master node will be described in detail with reference to FIG. 7.
도 4는 일 실시예에 따라 테이블들의 타입을 구분하는 방법을 나타낸 흐름도이다. 도 4를 참조하면, 도 1에 도시된 마스터 노드(110)(의 테이블 구분 모듈(121))가 테이블의 타입을 구분하는 방법이 도시된다. 4 is a flowchart illustrating a method of classifying types of tables according to an exemplary embodiment. Referring to FIG. 4, a method of distinguishing the types of tables by the master node 110 (the table classification module 121 of FIG. 1) shown in FIG. 1 is illustrated.
마스터 노드는 조인 그래프 내의 테이블 T를 선택할 수 있다(410).The master node may select table T in the join graph (410).
마스터 노드는 테이블 T와 테이블 T에 인접한 인접 테이블들의 집합 정보를 기초로, 테이블 T를 기억 장치에 분할 저장하는 경우에 테이블 T와 테이블 T에 인접한 인접 테이블들과의 제1 조인 연산 비용의 합을 산출할 수 있다(420). The master node calculates the sum of the cost of the first join operation between the table T and the adjacent tables adjacent to the table T when the table T is partitioned and stored in the storage device based on the aggregation information of the tables T and the adjacent tables adjacent to the table T. It may be calculated (420).
단계(420)에서, 테이블 T를 기억 장치에 분할 저장하는 경우, 다시 말해, 테이블 T가 분할할 테이블 타입일 경우, 제1 조인 연산 비용의 합은 예를 들어, 조인 처리 비용 모델 Cost Part(T) 에 의해 구할 수 있다. In step 420, when partitioning the table T into the storage device, that is, when the table T is a table type to be partitioned, the sum of the first join operation costs is, for example, the join processing cost model Cost Part (T Can be obtained by
조인 처리 비용 모델 Cost Part(T)은 분할된 테이블 T가 모든 인접 테이블과 조인될 때 발생하는 분할된 테이블의 스캔 비용
Figure PCTKR2017000346-appb-I000003
과 테이블 T의 인접 테이블들의 집합 adj(T) 내의 모든 테이블들의 스캔 비용의 합
Figure PCTKR2017000346-appb-I000004
으로 정의될 수 있다. 이때, 테이블의 타입에 따른 조인 연산 비용 모델은 조인 처리 시에 발생하는 조인 테이블들의 스캔 비용의 합으로 정의될 수 있다.
Join processing cost model Cost Part (T) is the scan cost of a partitioned table that occurs when partitioned table T is joined with all adjacent tables.
Figure PCTKR2017000346-appb-I000003
Sum of the cost of scanning all tables in the set adj (T) of adjacent tables
Figure PCTKR2017000346-appb-I000004
It can be defined as. In this case, the join operation cost model according to the type of table may be defined as the sum of the scan costs of the join tables generated at the join process.
마스터 노드는 테이블 T와 테이블 T에 인접한 인접 테이블들의 집합 정보를 기초로, 테이블 T를 N개의 슬레이브 노드들에 복제하는 경우, 다시 말해 테이블 T가 복제할 테이블 타입일 경우에 테이블 T와 테이블 T에 인접한 인접 테이블들과의 제2 조인 연산 비용의 합을 산출할 수 있다(430). The master node replicates table T to N slave nodes based on the aggregate information of the tables T and adjacent tables adjacent to table T, that is, when table T is a table type to be replicated, The sum of the cost of the second join operation with adjacent adjacent tables may be calculated (430).
단계(430)에서, 테이블 T를 N개의 슬레이브 노드들에 복제하는 경우, 다시 말해, 테이블 T가 복제될 테이블 타입일 경우, 제2 조인 연산 비용의 합은 예를 들어, 조인 처리 비용 모델 Cost Rep (T) 에 의해 구할 수 있다. In step 430, when replicating table T to N slave nodes, that is, when table T is a table type to be replicated, the sum of the second join operation costs is, for example, the join processing cost model Cost Rep. It can obtain | require by (T).
조인 처리 비용 모델 Cost Rep (T) 은 테이블 T가 P개의 파티션에 복제되었을 때 모든 인접 테이블들과 조인될 때 발생하는 테이블 스캔 비용의 합
Figure PCTKR2017000346-appb-I000005
과 테이블 T의 인접 테이블들의 집합 adj(T) 내의 모든 테이블의 모든 스캔 비용의 합
Figure PCTKR2017000346-appb-I000006
으로 정의될 수 있다. 여기서, 인접 테이블들의 파티셔닝 컬럼 갯수가 1 감소된 이유는 테이블 T가 복제되어 그 인접 테이블들은 어떠한 테이블 T의 컬럼을 사용하여 쿼리 처리하더라도 데이터 로컬리티가 보장되기 때문이다.
Join processing cost model Cost Rep (T) is the sum of the table scan costs incurred when table T is joined with all neighboring tables when replicated to P partitions.
Figure PCTKR2017000346-appb-I000005
Sum of all scan costs of all tables in the set adj (T)
Figure PCTKR2017000346-appb-I000006
It can be defined as. Here, the number of partitioning columns of neighboring tables is reduced by 1 because the data locality is guaranteed even when the table T is replicated and the neighboring tables are queried using any column of the table T.
마스터 노드는 제1 조인 연산 비용의 합(Cost Part(T))과 제2 조인 연산 비용의 합(Cost Rep (T)) 간의 차이를 비교할 수 있다(440). The master node may compare a difference between the cost of the first join operation cost Cost Part (T) and the sum of the second join operation cost Cost Rep (T) (440).
단계(440)의 비교 결과, 제1 조인 연산의 비용의 합이 제2 조인 연산의 비용의 합보다 작은 경우, 마스터 노드는 테이블의 타입을 '분할할 테이블(Part-table)'로 구분할 수 있다(450). 마스터 노드는 해당 테이블을 분할 저장할 수 있다. As a result of the comparison of step 440, if the sum of the costs of the first join operation is less than the sum of the costs of the second join operation, the master node may divide the type of table into a 'part-table'. (450). The master node can partition the table.
단계(440)의 비교 결과, 제1 조인 연산의 비용의 합이 상기 제2 조인 연산의 비용의 합보다 크거나 같은 경우, 마스터 노드는 테이블의 타입을 '복제할 테이블(Rep-table)'로 구분할 수 있다(460). 마스터 노드는 해당 테이블을 N개의 슬레이브 노드들에 복제할 수 있다.As a result of the comparison in step 440, if the sum of the costs of the first join operation is greater than or equal to the sum of the costs of the second join operation, the master node sets the type of table to 'Rep-table'. Can be distinguished (460). The master node can replicate the table to N slave nodes.
마스터 노드는 모든 테이블들을 구분하였는지 확인할 수 있다(470). 단계(470)의 확인 결과, 모든 데이블들을 구분하지 않았다면, 마스터 노드는 다음 테이블을 선택(480)하고, 다음 테이블에 대하여 단계(420) 내지 단계(470)의 과정을 수행할 수 있다. The master node may check whether all tables are separated (470). If it is determined in step 470 that all the tables are not distinguished, the master node may select the next table 480 and perform the processes of steps 420 to 470 for the next table.
단계(470)의 확인 결과, 모든 데이블들을 구분하였다면, 마스터 노드는 동작을 종료할 수 있다. As a result of checking in step 470, if all the tables have been identified, the master node may terminate the operation.
도 5는 일 실시예에 따라 엣지들의 타입을 구분하는 방법을 나타낸 흐름도이다. 도 5를 참조하면, 도 1에 도시된 마스터 노드(110)(의 엣지 구분 모듈(122))가 엣지의 타입을 구분하는 방법이 도시된다. 5 is a flowchart illustrating a method of classifying edge types according to an exemplary embodiment. Referring to FIG. 5, a method of distinguishing types of edges by the master node 110 (the edge classification module 122 of FIG. 1) illustrated in FIG. 1 is illustrated.
마스터 노드는 조인 그래프 내의 엣지 e를 선택할 수 있다(510).The master node may select the edge e in the join graph (510).
마스터 노드는 엣지 e의 양 끝 테이블들, 다시 말해, 엣지에 의해 서로 연결되는 테이블들의 타입이 모두 복제할 테이블인지 여부를 판단할 수 있다(520). 단계(520)에서 테이블들의 타입이 모두 복제할 테이블이라고 판단되면, 마스터 노드는 모든 엣지를 구분했는지 확인하여 동작을 종료할 수 있다(560). The master node may determine whether both types of tables of the edge e, that is, the types of tables connected to each other by the edge are tables to be replicated (520). If it is determined in step 520 that all of the types of tables are tables to be replicated, the master node may terminate the operation by checking whether all edges have been identified (560).
단계(520)의 판단 결과, 엣지 e에 의해 서로 연결되는 테이블들의 타입이 복제할 테이블이 아닌 경우, 마스터 노드는 테이블들의 타입이 모두 분할할 테이블인지 여부를 판단할 수 있다(530).As a result of the determination of step 520, the types of tables connected to each other by edge e If it is not a table to be replicated, the master node may determine whether all types of tables are tables to be partitioned (530).
단계(530)에서 엣지에 의해 서로 연결되는 테이블들 중 어느 하나의 타입은 복제할 테이블이고, 다른 하나의 타입은 분할할 테이블인 경우, 마스터 노드는 엣지의 타입을 인터 엣지로 구분(결정)할 수 있다(540). In step 530, if one type of the tables connected to each other by the edge is a table to be replicated and the other type is a table to be split, the master node may classify (determine) the type of the edge as an inter edge. May be 540.
단계(530)에서 엣지에 의해 서로 연결되는 테이블들의 타입이 모두 분할할 테이블인 경우, 마스터 노드는 엣지 e의 타입을 인트라 엣지로 구분(결정)할 수 있다(550). In operation 530, when the types of tables connected to each other by the edge are tables to be split, the master node may classify (determin) the type of edge e into an intra edge (550).
마스터 노드는 모든 엣지들을 구분하였는지 확인할 수 있다(560). 단계(560)에서 모든 엣지들을 구분하지 않은 경우, 마스터 노드는 다음 엣지를 선택하여 단계(520) 내지 단계(560)의 과정을 수행할 수 있다. The master node may check whether all edges have been identified (560). If all edges are not distinguished in step 560, the master node may select the next edge to perform the processes of steps 520 to 560.
단계(560)에서 모든 엣지들을 구분한 경우, 마스터 노드는 동작을 종료할 수 있다. If all edges are identified in step 560, the master node may terminate the operation.
도 6은 일 실시예에 따라 가상의 엣지를 추가하는 방법을 나타낸 흐름도이다. 도 6을 참조하면, 도 1에 도시된 마스터 노드(110)(의 간접 엣지 탐색 모듈(123))가 가상의 엣지를 탐색하는 방법이 도시된다. 6 is a flowchart illustrating a method of adding a virtual edge according to an embodiment. Referring to FIG. 6, a method of searching for a virtual edge by the master node 110 (indirect edge search module 123 of FIG. 1) shown in FIG. 1 is illustrated.
마스터 노드는 조인 그래프 내에 포함된 모든 제1 타입의 테이블들(분할할 테이블)의 쌍(pair)이 간접 엣지 조건을 만족하는지 여부를 검사하고, 간접 엣지 조건을 만족하는 분할할 테이블들의 쌍 사이에 가상의 엣지를 추가할 수 있다. 분할할 테이블들의 쌍이 간접 엣지 조건을 만족하는지 여부는 도 6에 도시된 단계(620) 내지 단계(650) 과정을 통해 파악될 수 있다. The master node checks whether a pair of all the first types of tables (partitioned tables) included in the join graph satisfy the indirect edge condition, and checks between the pairs of tables to be partitioned that satisfy the indirect edge condition. You can add virtual edges. Whether the pair of tables to be partitioned satisfies the indirect edge condition may be determined through the steps 620 to 650 shown in FIG. 6.
마스터 노드는 조인 그래프 내에 포함된 분할할 테이블 타입의 테이블 쌍 <R, S>를 선택할 수 있다(610). The master node may select a table pair <R, S> of the table type to be split included in the join graph (610).
마스터 노드는 테이블 쌍을 구성하는 테이블 R와 테이블 S가 동일한 테이블 T와 테이블 R의 엣지 e1 및 테이블 S의 엣지 e2를 통해 연결되어 있는지를 판단할 수 있다(620). The master node may determine whether the table R and the table S constituting the table pair are connected through the same table T and the edge e1 of the table R and the edge e2 of the table S (620).
단계(620)의 판단 결과, 테이블 R과 테이블 S가 테이블 T와 엣지 e1 및 엣지 e2를 통해 연결되어 있다고 판단되면, 마스터 노드는 엣지 e1의 레이블 및 엣지 e2의 레이블에 테이블 T의 동일한 컬럼이 포함되어 있는지를 확인할 수 있다(630). As a result of the determination in step 620, if it is determined that the table R and the table S are connected through the table T and the edge e1 and the edge e2, the master node includes the same column of the table T in the label of the edge e1 and the label of the edge e2. In operation 630, it may be determined.
단계(630)에서 엣지 e1의 레이블 및 엣지 e2의 레이블에 테이블 T의 동일한 컬럼이 포함되어 있다면, 마스터 노드는 테이블 T의 타입이 복제될 테이블인지를 확인할 수 있다(640). If the same column of the table T is included in the label of the edge e1 and the label of the edge e2 in step 630, the master node may determine whether the type of the table T is a table to be replicated (640).
단계(640)에서 테이블 T의 타입이 복제될 테이블이라고 확인되면, 마스터 노드는 단계(620) 내지 단계(640)의 모두 만족하는 테이블 R과 테이블 S의 엣지e1과 e2에 대하여, 엣지 e1과 엣지 e2의 레이블에 포함된 테이블 R과 테이블 S의 컬럼을 레이블에 포함하는 엣지 e가 테이블 R과 테이블 S 사이에 존재하는지 여부를 확인할 수 있다(650).If it is determined in step 640 that the type of table T is a table to be replicated, then the master node determines the edges e1 and e2 of the edges e1 and e2 of table R and table S that satisfy all of steps 620 through 640. In operation 650, it may be determined whether an edge e including a table R and a table S column included in the label of e2 exists between the table R and the table S.
단계(650)에서 엣지 e가 테이블 R과 테이블 S 사이에 존재하지 않는다면, 마스터 노드는 엣지 e를 간접 엣지로 구분할 수 있다(660). 단계(660)에서 마스터 노드는 엣지 e1과 엣지 e2의 레이블에 포함된 테이블 R과 테이블 S의 컬럼을 레이블로 하는 테이블 R과 테이블 S사이에 가상의 엣지를 추가할 수 있다. If edge e does not exist between table R and table S in step 650, the master node may distinguish edge e as an indirect edge (660). In operation 660, the master node may add a virtual edge between the table R and the table S having the columns of the table R and the table S included in the labels of the edge e1 and the edge e2.
단계(620) 내지 단계(650)에서 해당 조건들에 대한 판단 결과가 아니라고 확인되면, 마스터 노드는 다른 테이블 쌍을 선택하고(680), 다른 테이블 쌍에 대해 단계(620) 내지 단계(670)의 과정을 수행할 수 있다. If it is determined in step 620 to step 650 that the result is not the determination of the conditions, the master node selects another table pair (680), and for each other table pair, The process can be performed.
마스터 노드는 조인 그래프 내에 모든 분할할 테이블들의 쌍을 확인하였는지를 판단할 수 있다(670). 단계(670)에서 모든 분할할 테이블들의 쌍을 확인하지 않았다면, 마스터 노드는 다른 분할할 테이블 쌍을 선택하고(680), 다른 분할할 테이블 쌍에 대하여 단계(620) 내지 단계(670)의 과정을 수행할 수 있다. The master node may determine whether it has identified all pairs of tables to partition in the join graph (670). If the step 670 does not identify all the pairs of tables to be partitioned, the master node selects another table pair to be partitioned (680) and repeats the process of steps 620 to 670 for the other partitioned table pair. Can be done.
단계(670)에서 모든 분할할 테이블들의 쌍을 확인하였다면, 마스터 노드는 동작을 종료할 수 있다. Once the step 670 has identified all the pairs of tables to be partitioned, the master node may end the operation.
도 7은 일 실시예에 따라 데이터베이스 분할 계획을 생성하는 방법을 나타낸 흐름도이다. 도 7을 참조하면, 도 1에 도시된 마스터 노드(110)(의 데이터베이스 분할 계획 생성기(126))가 데이터베이스 분할 계획을 생성하는 방법이 도시된다. 7 is a flowchart illustrating a method of generating a database partition plan according to an embodiment. Referring to FIG. 7, a method is shown in which the master node 110 (database partition plan generator 126 of FIG. 1) shown in FIG. 1 generates a database partition plan.
마스터 노드는 최대-우선 순위 큐 benefitQ를 초기화할 수 있다(705).The master node may initialize the maximum-priority queue benefitQ (705).
마스터 노드는 도 5 및 도 6을 통해 전술한 엣지 구분 모듈(122) 및 간접 엣지 탐색 모듈(123)의 동작 결과인 인트라 엣지, 인터 엣지 및 간접 엣지의 합집합에 포함된 어느 하나의 엣지 e를 선택할 수 있다(710).The master node selects one edge e included in the union of the intra edge, the inter edge, and the indirect edge, which are the result of the operation of the edge classification module 122 and the indirect edge search module 123 described above with reference to FIGS. 5 and 6. May be 710.
마스터 노드는 엣지 e의 엣지 타입에 따른 분할 이득 모델을 사용해 분할 이득 benefit(e)을 계산할 수 있다. 분할 이득 모델은 주어진 엣지 e를 사용해 테이블을 분할하였을때 얻을 수 있는 조인 연산의 처리 비용의 이득을 테이블 스캔 비용의 관점으로 모델링한 것이다. 다시 말해, 분할 이득 모델은 주어진 엣지에 해당하는 조인 연산에 대해, 엣지를 활용해 분할한 테이블을 사용해 조인 연산을 로컬하게 처리함으로써 얻는 이득을 테이블 스캔 관점에서 수치화 한 것이다. 따라서, 엣지의 양 끝 테이블들의 크기합이 클수록, 또한 엣지의 가중치가 클수록, 다시 말해 해당 엣지에 대한 조인 연산의 빈도수가 높을수록 해당 엣지를 활용한 테이블 분할 시에 얻는 이득이 커질 수 있다. 이하에서는 단계(715) 내지 단계(735)를 통해 세 가지 엣지 타입에 따른 분할 이득 모델에 대하여 살펴본다. The master node may calculate a split gain benefit (e) using a split gain model according to the edge type of edge e. The partitioning gain model is modeled in terms of table scan cost in terms of the cost of processing the join operation that can be obtained when partitioning a table using a given edge e. In other words, the split gain model quantifies the gain from join processing locally for a given edge using a table partitioned using the edge, from the table scan point of view. Therefore, the larger the sum of the sizes of the two end tables of the edge, the larger the weight of the edge, that is, the higher the frequency of join operations for the edge, the greater the gain obtained when the table is partitioned using the edge. Hereinafter, a split gain model according to three edge types will be described through steps 715 to 735.
마스터 노드는 엣지 e의 엣지 타입이 인트라 엣지(Ea)인지를 판단할 수 있다(715). 단계(715)의 판단 결과, 엣지 e의 엣지 타입이 인트라 엣지라면, 마스터 노드는 엣지 e와 엣지 e의 양 끝 테이블들에 포함된 삼각 엣지 집합 triEdges(e) 내의 엣지들의 파티셔닝 컬럼 정보를 사용해 분할 이득 모델을 모델링할 수 있다(720). 이때, 마스터 노드는 엣지들에 포함된 세 테이블을 분할하였을 때 엣지 e와 삼각 엣지들에 해당하는 조인 연산을 로컬 조인 처리함으로써 얻는 분할 이득을 모델링할 수 있다. 삼각 엣지 집합 triEdges(e)는 도 1에 도시된 삼각 엣지 탐색 모듈(124)을 통해 얻을 수 있다.The master node may determine whether the edge type of edge e is an intra edge Ea (715). As a result of the determination in step 715, if the edge type of edge e is an intra edge, the master node splits using the partitioning column information of the edges in the triangular edge set triEdges (e) included in both end tables of edge e and edge e. The gain model may be modeled 720. In this case, the master node may model a split gain obtained by locally joining a join operation corresponding to edge e and triangular edges when partitioning three tables included in the edges. The triangular edge set triEdges (e) can be obtained through the triangular edge search module 124 shown in FIG.
단계(720)에서 엣지 e의 분할 이득은 sz(e)*w(e)로 계산될 수 있다. 그리고, 삼각 엣지 집합에 포함된 엣지 e' 에 대한 분할 이득은
Figure PCTKR2017000346-appb-I000007
에 대한 sz(e')*w(e')) 값의 합이 될 수 있다. 마스터 노드는 두 계산값들의 합에 해당하는 sz(e)*w(e) + sz(e')*w(e'))을 인트라 엣지의 분할 이득 모델로 사용할 수 있다. 마스터 노드는 엣지 타입(인트라 엣지(Ea))에 따른 분할 이득 모델을 통해 계산된 이득 benefit(e)을 엣지 e에 매핑한 후 최대 우선 순위 큐 benefitQ에 추가(삽입)할 수 있다(740).
In step 720, the splitting gain of edge e may be calculated as sz (e) * w (e). The splitting gain for edge e 'included in the triangular edge set is
Figure PCTKR2017000346-appb-I000007
It can be the sum of sz (e ') * w (e')) values for. The master node may use sz (e) * w (e) + sz (e ') * w (e') corresponding to the sum of two calculation values as a split gain model of the intra edge. The master node may map the gain benefit (e) calculated through the split gain model according to the edge type (intra edge (Ea)) to the edge e and add (insert) the maximum priority queue benefitQ (740).
단계(715)의 판단 결과, 엣지 e의 엣지 타입이 인트라 엣지가 아니라면, 마스터 노드는 엣지 e의 엣지 타입이 간접 엣지(Et)인지 여부를 판단할 수 있다(725). As a result of the determination of step 715, if the edge type of the edge e is not an intra edge, the master node may determine whether the edge type of the edge e is an indirect edge Et (725).
단계(725)에서 엣지 e의 엣지 타입이 간접 엣지(Et)라고 판단되면, 마스터 노드는 간접 엣지 e로 부터 찾을 수 있는 삼각 엣지들의 분할 이득의 합에 의해 간접 엣지의 분할 이득 모델을 모델링할 수 있다(730). 이때, 간접 엣지 자체가 분할 이득 모델에 포함되지 않는 이유는 간접 엣지는 실제로 존재하지 않는 엣지이기 때문이다. 만약 엣지 e가 간접 엣지가 아니라 실제로 조인 그래프 내에 존재하는 엣지일 경우, 엣지 구분 모델(122)에 의해 인트라 엣지 타입으로 구분될 수 있다. If it is determined in step 725 that the edge type of edge e is an indirect edge Et, the master node can model the split gain model of the indirect edge by the sum of the split gains of the triangular edges found from the indirect edge e. There is (730). In this case, the indirect edge itself is not included in the split gain model because the indirect edge is an edge that does not actually exist. If the edge e is not an indirect edge but an edge that actually exists in the join graph, the edge e may be classified as an intra edge type by the edge classification model 122.
따라서, 단계(730)에서 간접 엣지 e에 대한 분할 이득 모델은 삼각 엣지 집합 triEdges(e) 내에 포함된 삼각 엣지 e'에 대한 sz(e')*w(e')의 합으로 계산될 수 있다. 마스터 노드는 엣지 타입(간접 엣지(Et))에 따른 분할 이득 모델을 통해 계산된 이득 benefit(e)을 엣지 e에 매핑한 후 최대 우선 순위 큐 benefitQ에 추가(삽입)할 수 있다(740).Thus, in step 730 the split gain model for indirect edge e can be calculated as the sum of sz (e ') * w (e') for triangular edge e 'contained in triangular edge set triEdges (e). . The master node may add (insert) the maximum benefit queue benefitQ after mapping the gain benefit e calculated through the split gain model according to the edge type (indirect edge Et) to the edge e (740).
단계(725)에서 엣지 e의 엣지 타입이 간접 엣지가 아니라고 판단되면, 마스터 노드는 엣지의 타입을 인터 엣지라고 결정하고, 인터 엣지의 분할 이득 모델을 결정할 수 있다(735). 단계(735)에서 인터 엣지의 분할 이득 모델은 인트라 엣지의 분할 이득으로 구성될 수 있다. 이때, 인터 엣지의 분할 이득 모델에 간접 엣지가 포함되지 않는 이유는 인트라 엣지의 정의에 따라 엣지 양 끝의 테이블들 중 어느 한 테이블의 타입은 분할할 테이블이고, 다른 한 테이블의 타입은 복제할 테이블이므로 삼각 엣지 조건을 만족하지 않기 때문이다. 따라서, 인터 엣지의 분할 이득 모델은 sz(e)*w(e)로 계산될 수 있다. If it is determined in step 725 that the edge type of the edge e is not an indirect edge, the master node may determine that the type of the edge is an inter edge and determine a split gain model of the inter edge (735). In step 735, the split gain model of the inter edge may be configured as the split gain of the intra edge. In this case, the reason why the indirect edge is not included in the split gain model of the inter edge is that the type of one of the tables at both ends of the edge is the table to be partitioned and the type of the other table is the table to be replicated according to the definition of the intra edge. This is because the triangle edge condition is not satisfied. Therefore, the split gain model of the inter edge can be calculated as sz (e) * w (e).
마스터 노드는 각 엣지 타입에 따른 분할 이득 모델을 통해 계산된 이득 benefit(e)을 엣지 e에 매핑한 후 최대 우선 순위 큐 benefitQ에 추가(삽입)할 수 있다(740).The master node may add (insert) the maximum benefit queue benefitQ after mapping the gain benefit (e) calculated through the split gain model according to each edge type to the edge e (740).
마스터 노드는 엣지 합집합 내의 모든 엣지와 분할 이득의 매핑 정보가 최대 우선 순위 큐 benefitQ에 추가되었는지 여부를 확인할 수 있다(745). The master node may determine whether mapping information of all edge and split gains in the edge union has been added to the maximum priority queue benefitQ (745).
단계(745)의 확인 결과, 엣지 합집합 내의 모든 엣지와 분할 이득의 매핑 정보가 최대 우선 순위 큐 benefitQ에 추가되지 않았다면, 마스터 노드는 다음 엣지를 선택하고(750), 다음 엣지에 대해 단계(715) 내지 단계(750)의 과정을 수행할 수 있다. If the verification of step 745 indicates that the mapping information of all edges and split gains in the edge union has not been added to the maximum priority queue benefitQ, then the master node selects the next edge (750) and for the next edge (step 715). To step 750 may be performed.
단계(745)의 확인 결과, 엣지 합집합 내의 모든 엣지와 분할 이득의 매핑 정보가 최대 우선 순위 큐 benefitQ에 추가되었다면, 마스터 노드는 최대 우선 순위 큐 benefitQ를 이용하여 데이터베이스 분할 계획을 생성하기 위해 우선 분할 결과 그래프인 분할 그래프 PG를 초기화할 수 있다(755).If the verification result of step 745 indicates that the mapping information of all edge and split gains in the edge union has been added to the maximum priority queue benefitQ, the master node uses the maximum priority queue benefitQ to generate the database partitioning plan to generate the database partitioning plan. The divided graph PG, which is a graph, may be initialized (755).
마스터 노드는 조인 그래프 내의 분할할 테이블 타입의 테이블 집합 Vpart 를 선택할 수 있다(760). 마스터 노드는 테이블 집합 Vpart 를 이용하여 데이터베이스 분할 계획을 위한 분할 그래프를 생성할 수 있다. The master node is a set of tables of the table type to be split in the join graph. V part 760 may be selected. The master node can use the table set V part to generate a partition graph for a database partition plan.
마스터 노드는 조인 그래프의 엣지 중 최대 분할 이득을 가져오는 엣지인 최대 우선 순위 큐 benefitQ 내의 첫번째 엣지 e를 추출할 수 있다(765). 단계(765)에서 마스터 노드는 첫번째 엣지 e를 추출한 후, 최대 우선 순위 큐 benefitQ 에서 첫번째 엣지 e를 제거할 수 있다. 이후, 최대 우선 순위 큐 benefitQ는 제거된 첫번째 엣지 e의 다음으로 가장 많은 분할 이득을 가지는 엣지가 첫번째 엣지가 되도록 정렬될 수 있다. The master node may extract the first edge e in the maximum priority queue benefitQ, which is the edge that brings the maximum split gain among the edges of the join graph (765). In step 765, the master node extracts the first edge e, and then removes the first edge e from the maximum priority queue benefitQ. Thereafter, the maximum priority cue benefitQ may be aligned such that the edge with the next highest divide gain after the first edge e removed is the first edge.
마스터 노드는 단계(765)에서 추출한 엣지 e의 양 끝 테이블 R 과 테이블 S의 최대 파티셔닝 컬럼 개수(K)가 미리 설정된 제한 조건을 만족하는지 여부를 확인할 수 있다(770). 이때, 미리 설정된 제한 조건은 다음과 같은 네 가지 조건들로 구성될 수 있다. The master node may check whether the maximum number of partitioning columns (K) of both end tables R and table S of the edge e extracted in step 765 satisfies a preset constraint (770). In this case, the preset constraint may be configured with the following four conditions.
첫번째 조건은 |C(R)| < k∧|C(S)| < k 이고, 두번째 및 세번째 조건은 |C(R)| = k∧|C(S)| < k 혹은 |C(R)| < k∧|C(S)| = k 이다. 이때, 엣지의 레이블 함수가 포함하고 있는 파티셔닝 컬럼과 각 파티셔팅 컬럼 집합과의 교집합 여부에 따라 제한 조건의 만족 유무가 결정될 수 있다. 이를 자세히 명시하기 위해 엣지 e의 레이블이 포함하는 테이블 R 과 테이블 S 의 파티셔닝 컬럼을 각각 R.c 와 S.c 라고 하면, 두번째 조건에서는
Figure PCTKR2017000346-appb-I000008
일 경우에 제한 조건을 만족하고, 세번째 조건에서는
Figure PCTKR2017000346-appb-I000009
일 경우에 제한 조건을 만족할 수 있다.
The first condition is | C (R) | <k∧ | C (S) | <k and the second and third conditions are | C (R) | = k∧ | C (S) | <k or | C (R) | <k∧ | C (S) | = k. At this time, whether or not the constraint is satisfied may be determined according to the intersection of the partitioning column included in the edge label function and each partitioning column set. To specify this in detail, the partitioning columns of table R and table S included in the label of edge e are Rc and Sc, respectively.
Figure PCTKR2017000346-appb-I000008
If the constraint is satisfied, the third condition
Figure PCTKR2017000346-appb-I000009
In this case, the constraint may be satisfied.
마지막 조건인 |(R)| = k∧|C(S)| = k 에서는 두 테이블 R 과 S 모두
Figure PCTKR2017000346-appb-I000010
일 경우 제한 조건을 만족할 수 있다.
The last condition, | (R) | = k∧ | C (S) | in k both tables R and S
Figure PCTKR2017000346-appb-I000010
In this case, the constraint may be satisfied.
마스터 노드는 단계(765)에서 추출한 조인 그래프 내의 엣지 e가 최대 파티셔닝 컬럼 갯수의 제한 조건을 만족하는 경우, 엣지 e에 대해서 삼각 엣지 조건(삼각 엣지 조건)을 만족하는 인접한 두 개의 삼각 엣지를 탐색한 후, 분할 그래프 PG에 추가할 수 있다(775). 마스터 노드가 삼각 엣지 조건을 만족하는 인접한 두 개의 삼각 엣지를 탐색하는 방법은 도 8을 참조하여 설명한다. When the edge e in the join graph extracted in step 765 satisfies the constraint of the maximum number of partitioning columns, the master node searches for two adjacent triangular edges that satisfy the triangular edge condition (triangular edge condition) for the edge e. Then, it can be added to the split graph PG (775). A method of searching for two adjacent triangular edges that satisfy the triangular edge condition by the master node will be described with reference to FIG. 8.
마스터 노드는 단계(765)에서 추출한 조인 그래프 내의 엣지 e에 대한 허브 테이블을 탐색한 후, 탐색된 허브 테이블을 분할 그래프 PG에 추가할 수 있다(780). 단계(780)에서 마스터 노드는 추출한 엣지 e에 대응한 조인 그래프 내의 하나 이상의 테이블들을 탐색하고, 탐색된 테이블들 중 허브 테이블 조건을 만족하는 테이블을 허브 테이블 타입으로 구분할 수 있다. 마스터 노드가 엣지 e에 대해서 허브 테이블 조건을 만족하는 테이블을 탐색하는 방법은 도 9를 참조하여 설명한다. The master node may search the hub table for edge e in the join graph extracted in step 765, and then add the searched hub table to the partition graph PG (780). In operation 780, the master node may search for one or more tables in the join graph corresponding to the extracted edge e, and classify a table satisfying the hub table condition among the searched tables into a hub table type. A method of searching for a table that satisfies the hub table condition for the edge e by the master node will be described with reference to FIG. 9.
마스터 노드는 엣지 e를 분할 그래프 PG에 추가할 수 있다(785). 마스터 노드는 엣지 e를 분할 그래프 PG에 추가할 때 엣지 레이블이 포함하고 있는 파티셔닝 컬럼 정보를 엣지 양 끝의 두 테이블에 업데이트할 수 있다. The master node may add edge e to the split graph PG (785). When the master node adds the edge e to the split graph PG, the master node can update the partitioning column information included in the edge label in the two tables at both ends of the edge.
마스터 노드는 최대 우선 순위 큐 benefitQ 가 비어 있는지를 확인할 수 있다(790). 단계(790)의 확인 결과, 최대 우선 순위 큐 benefitQ 가 비어 있지 않다면, 마스터 노드는 단계(765) 내지 단계(795)의 과정을 반복할 수 있다. The master node may check whether the maximum priority queue benefitQ is empty (790). If the verification result of step 790 indicates that the maximum priority queue benefitQ is not empty, the master node may repeat the process of steps 765 to 795.
단계(790)의 확인 결과, 최대 우선 순위 큐 benefitQ 가 비어 있다면, 마스터 노드는 데이터베이스 분할 계획을 반환하고(795), 동작을 종료할 수 있다. 따라서, 반환된 데이터베이스 분할 계획 내의 각 분할 테이블 타입의 테이블들은 파티셔닝 컬럼의 갯수가 최대 k를 넘지 않게 된다. If the verification result of step 790 indicates that the maximum priority queue benefitQ is empty, the master node may return the database partitioning plan (795) and terminate the operation. Therefore, the tables of each partition table type in the returned database partition plan do not exceed the maximum k of partitioning columns.
도 8은 일 실시예에 따라 삼각 엣지를 탐색하는 방법을 나타낸 흐름도이다. 도 8을 참조하면, 도 1에 도시된 마스터 노드(110)(의 삼갓 엣지 탐색 모듈(124))에 의해 아래의 단계(820) 내지 단계(840)의 삼각 엣지 조건에 맞는 두 엣지 e1과 e2를 탐색하는 과정이 도시된다. 삼각 엣지 조건에 맞는 엣지들은 분할 그래프에 추가될 수 있다. 8 is a flowchart illustrating a method of searching for a triangular edge according to an embodiment. Referring to FIG. 8, two edges e1 and e2 satisfying the triangular edge conditions of steps 820 to 840 by the master node 110 (of Samgat edge search module 124 of FIG. 1) shown in FIG. 1. The process of searching for is shown. Edges that meet triangular edge conditions can be added to the split graph.
입력 엣지 e가 입력되면(810), 마스터 노드는 입력 엣지 e의 타입이 인트라 엣지 타입인지, 다시 말해 입력 엣지 e의 양 끝 분할될 테이블 타입의 두 테이블들 R과 S가 동일한 테이블 T와 엣지 e1 및 e2를 통해 연결되어 있는지를 판단할 수 있다(820). 단계(820)의 판단 결과, 두 테이블들 R과 S가 동일한 테이블 T와 엣지 e1과 e2를 통해 연결되지 않는다면, 마스터 노도는 동작을 종료할 수 있다. When the input edge e is input (810), the master node determines whether the type of the input edge e is an intra edge type, that is, the two tables R and S of the table type to be split at both ends of the input edge e are the same table T and edge e1. And it may be determined whether the connection is through e2 (820). As a result of the determination of step 820, if the two tables R and S are not connected through the same table T and the edges e1 and e2, the master nodo may terminate the operation.
단계(820)의 판단 결과, 두 테이블들 R과 S가 동일한 테이블 T와 엣지 e1과 e2를 통해 연결되면, 마스터 노도는 엣지 e1과 e2의 레이블이 동일한 테이블 T의 컬럼을 포함하고 있는지를 판단할 수 있다(830). 단계(830)의 판단 결과, 엣지 e1과 e2의 레이블이 동일한 테이블 T의 컬럼을 포함하지 않는 경우, 마스터 노드는 동작을 종료할 수 있다.As a result of the determination in step 820, when the two tables R and S are connected through the same table T and edges e1 and e2, the master slaver may determine whether the labels of the edges e1 and e2 include the columns of the same table T. It may be 830. As a result of the determination of step 830, when the labels of the edges e1 and e2 do not include the columns of the same table T, the master node may terminate the operation.
단계(830)의 판단 결과, 엣지 e1과 e2의 레이블이 동일한 테이블 T의 컬럼을 포함하는 경우, 마스터 노드는 테이블 T의 타입이 복제될 테이블인지를 판단할 수 있다(840). 단계(840)에서 테이블 T의 타입이 복제될 테이블이 아니라고 판단되면, 마스터 노드는 동작을 종료할 수 있다.As a result of the determination in step 830, when the labels of the edges e1 and e2 include columns of the same table T, the master node may determine whether the type of the table T is a table to be replicated (840). If it is determined in step 840 that the type of table T is not a table to be replicated, then the master node may terminate the operation.
단계(840)에서 테이블 T의 타입이 복제될 테이블이라고 판단되면, 마스터 노드는 엣지 e1과 e2를 삼각 엣지 타입으로 구분할 수 있다(850).If it is determined in step 840 that the type of table T is a table to be replicated, the master node may distinguish the edges e1 and e2 into triangular edge types (850).
도 9는 일 실시예에 따라 허브 테이블을 탐색하는 방법을 나타낸 흐름도이다. 도 9를 참조하면, 도 1에 도시된 마스터 노드(의 허브 테이블 탐색 모듈(126))가 허브 테이블 조건을 만족하는 테이블을 탐색하는 과정이 도시된다. 마스터 노드(의 허브 테이블 탐색 모듈(126))은 주어진 엣지 e에 대해 허브 테이블 조건을 만족하는 하나 이상의 복제할 테이블 타입의 테이블을 탐색할 수 있다.9 is a flowchart illustrating a method of searching a hub table according to an embodiment. Referring to FIG. 9, a process of searching for a table that satisfies a hub table condition by the master node (the hub table search module 126 of FIG. 1) is illustrated. The hub node search module 126 of the master node may search for a table of one or more table types to be replicated that satisfies the hub table condition for a given edge e.
마스터 노드는 입력 엣지 e가 분할될 테이블 타입의 두 테이블 R과 S 사이의 인트라 엣지 혹은 간접 엣지이면(910), 엣지 e 와 인접하며, 공통의 테이블 Ti와 컬럼 Ti[k] 로 연결되어 있는 테이블 R 과 S 의 삼각 엣지 e1과 e2 가 존재하는지를 판단할 수 있다(920). The master node is adjacent to the edge e if the input edge e is an intra edge or an indirect edge between two tables R and S of the table type to be split (910), and is connected to the common table T i and the column T i [k]. In operation 920, it may be determined whether the triangular edges e1 and e2 of the tables R and S exist.
단계(920)에서 공통의 테이블 Ti와 컬럼 Ti[k]로 연결되어 있는 테이블 R 과 S 의 삼각 엣지 e1과 e2 가 존재하지 않는다면, 마스터 노드는 다른 테이블 Tj와 컬럼 Tj[k]와 연결되어 있는 테이블 R과 S의 두 삼각 엣지가 존재하는지를 판단할 수 있다(940).If there are no triangular edges e1 and e2 of tables R and S connected to a common table T i and column T i [k] in step 920, then the master node has another table T j and column T j [k]. In operation 940, it may be determined whether two triangular edges of the tables R and S connected to the P and S are present.
단계(920)에서 공통의 테이블 Ti와 컬럼 Ti[k]로 연결되어 있는 테이블 R 과 S 의 삼각 엣지 e1과 e2 가 존재하면, 마스터 노드는 공통의 테이블 Ti를 허브 테이블(Hub-table)로 구분할 수 있다(930). 여기서, '공통의 테이블 Ti와 컬럼 Ti[k]로 연결되어 있는 테이블 R 과 S의 삼각 엣지 e1과 e2 가 존재한다'는 것은 테이블 R과 S의 엣지 e1과 e2가 공통의 테이블 Ti 의 컬럼 Ti[k]에 대해 삼각 엣지 조건을 만족하는 엣지들임을 의미하는 것으로 이해될 수 있다. 공통의 테이블 Ti 는 삼각 엣지 조건에 따라 복제될 테이블 타입의 테이블일 수 있다. In step 920, if the triangular edges e1 and e2 of the tables R and S connected to the common table T i and the column T i [k] exist, the master node converts the common table T i to the hub table (Hub-table). (930). Here, 'the triangular edges e1 and e2 of the tables R and S connected by the common table T i and the column T i [k] exist' means that the edges e1 and e2 of the tables R and S have a common table T i. It can be understood to mean that the edges satisfying the triangular edge condition with respect to the column T i [k] of. The common table T i may be a table of a table type to be replicated according to a triangular edge condition.
마스터 노드는 다른 테이블 Tj의 컬럼 Tj[k]와 연결되어 있는 테이블 R과 S의 두 삼각 엣지가 존재하는지, 다시 말해 다른 테이블 Tj의 컬럼 Tj[k]에 대해 삼각 엣지 조건을 만족하는 두 삼각 엣지가 존재하는지를 판단할 수 있다(940). The master node satisfies the triangle edge conditions for the column T j [k] in that the two triangular edge of the table R and S that are connected to the columns of T j [k] of the other tables T j exists, in other words, a different table T j In operation 940, it may be determined whether two triangular edges exist.
단계(940)에서 다른 테이블 Tj의 컬럼 Tj[k]와 연결되어 있는 테이블 R과 S의 두 삼각 엣지가 존재하면, 마스터 노도는 다른 테이블 Tj를 추가적으로 허브 테이블로 구분할 수 있다(950).If there are two triangular edges of the tables R and S connected to the columns T j [k] of the other table T j in step 940, the master degree may further divide the other table T j into a hub table (950). .
단계(940)에서 다른 테이블 Tj의 컬럼 Tj[k]와 연결되어 있는 테이블 R과 S의 두 삼각 엣지가 존재하지 않으면, 마스터 노도는 동작을 종료할 수 있다. In operation 940, if two triangular edges of the tables R and S connected to the columns T j [k] of the other table T j do not exist, the master rigor may terminate the operation.
도 10은 일 실시예에 따른 마스터 노드에 포함된 데이터 로더의 맵(Map) 동작을 나타낸 흐름도이다. 도 10을 참조하면, 일 실시예에 따른 마스터 노드(의 테이블 분할 저장 장치(130))가 주어진 테이블의 튜플들마다에 대하여 해시 함수 기반으로 테이블 분할을 수행하는 과정이 도시된다. 10 is a flowchart illustrating a map operation of a data loader included in a master node according to an embodiment. Referring to FIG. 10, a process of performing table partitioning based on a hash function for each tuple of a given table is performed by a master node (table partition storage device 130) according to an embodiment.
마스터 노드는 테이블 T에 포함된 튜플 t를 선택할 수 있다(1005). 마스터 노드는 데이터베이스 분할 계획으로부터 테이블 T의 파티셔닝 컬럼 정보를 파악할 수 있다. The master node may select a tuple t included in the table T (1005). The master node can grasp the partitioning information of the table T from the database partitioning plan.
마스터 노드는 단계(1005)에서 선택한 튜플 t의 모든 파티셔닝 컬럼값이 널(null) 인지를 검사할 수 있다(1010). The master node may check whether all partitioning column values of the tuple t selected in step 1005 are null (1010).
단계(1010)에서 선택한 튜플 t의 모든 파티셔닝 컬럼값이 널(null)이라면, 마스터 노드는 튜플 t가 저장될 파티션 위치 pid를 라운드로빈(round robin) 방식으로 선택(1045)한 후, 파티션 인덱스의 집합 pidS에 저장되어 있는 모든 파티션 위치 pid에 대해 <pid, bitM[pid]> 쌍을 키로, 튜플 t를 값으로 하는 키-값 쌍 <<pid, bitM[pid]>, t >을 셔플할 수 있다(1050).If all partitioning column values of the tuple t selected in step 1010 are null, the master node selects 1045 the partition location pid in which the tuple t is to be stored in a round robin manner, and then You can shuffle the key-value pairs << pid, bitM [pid]>, t> with tuple t as the key and all the <pid, bitM [pid]> pairs as keys for all partition locations pid stored in the set pidS. 1050.
단계(1010)에서 선택한 튜플 t의 모든 파티셔닝 컬럼값이 널(null)이 아니라면, 마스터 노드는 튜플 t의 일부 파티셔닝 컬럼 c의 값 t.c 만이 널(null)인지 판단할 수 있다(1015). If all partitioning column values of the tuple t selected in step 1010 are not null, the master node may determine whether only the value t.c of some partitioning column c of the tuple t is null (1015).
단계(1015)에서 튜플 t의 일부 파티셔닝 컬럼 c의 값 t.c 만이 널(null)이라고 판단되면, 마스터 노드는 해당 파티셔닝 컬럼(들)(c)은 무시하고, 널(null) 값을 가지지 않는 다른 파티셔닝 컬럼을 선택할 수 있다(1020). 마스터 노드는 널(null) 값을 가지지 않는 다른 파티셔닝 컬럼에 대해 단계(1015)를 다시 판단할 수 있다. If it is determined in step 1015 that only the value tc of some partitioning column c of tuple t is null, the master node ignores the corresponding partitioning column (s) (c) and has no other partitioning that does not have a null value. The column may be selected (1020). The master node may again determine step 1015 for another partitioning column that does not have a null value.
단계(1015)에서 튜플 t의 일부 파티셔닝 컬럼 c의 값 t.c가 널(null)이 아니라고 판단되면, 마스터 노드는 파티셔닝 컬럼값 t.c 에 대해 해시 함수 hash()를 통해 해당 튜플이 저장될 파티션 위치 pid를 결정 후 파티션 위치의 집합 pidS에 저장할 수 있다(1025). 일 실시예에 따른 관계형 데이터베이스 저장 시스템의 분할 방법은 테이블의 분할을 위해 하나 이상의 파티셔닝 컬럼을 사용할 수 있기 때문에 파티션 위치의 집합 pidS는 하나 이상의 파티션 위치를 포함할 수 있다. If it is determined in step 1015 that the value tc of some partitioning column c of the tuple t is not null, the master node uses the hash function hash () for the partitioning column value tc to determine the partition location pid where the tuple will be stored. After the decision, it can be stored in the set pidS of the partition location (1025). Since the partitioning method of the relational database storage system according to an embodiment may use one or more partitioning columns for partitioning a table, the set of partition positions pidS may include one or more partition positions.
마스터 노드는 테이블 T의 파티셔닝 컬럼 집합 C(T) 내에서의 현 파티셔닝 컬럼의 인덱스 정보 i를 통해 비트맵 벡터 bitV를 생성할 수 있다(1030). 비트맵 벡터 정보는 추후 튜플을 파티션에 저장할 때 사용된다. The master node may generate a bitmap vector bitV through index information i of the current partitioning column in the partitioning column set C (T) of the table T (1030). Bitmap vector information is used later to store tuples in partitions.
마스터 노드는 단계(1030)에서 생성된 비트맵 벡터 bitV를 사용해 테이블 T의 pid번째 파티션의 비트맵 테이블 bitM[pid]에 튜플 t에 대한 비트맵 벡터를 업데이트할 수 있다(1035).The master node may update the bitmap vector for the tuple t to the bitmap table bitM [pid] of the pid-th partition of the table T using the bitmap vector bitV generated in operation 1030 (1035).
마스터 노드는 테이블 T의 튜플 내의 모든 파티셔닝 컬럼에 대해 해시 기반의 분할을 수행하였는지를 확인할 수 있다(1040). 단계(1040)에서 테이블 T의 튜플 내의 모든 파티셔닝 컬럼에 대해 해시 기반의 분할을 수행하지 않았다면, 마스터 노드는 다른 파티셔닝 컬럼을 선택(1020)하여 단계(1015) 내지 단계(1035)의 과정을 수행할 수 있다. The master node may check whether hash-based partitioning has been performed for all partitioning columns in the tuple of table T (1040). If in step 1040 no hash-based partitioning has been performed for all partitioning columns in the tuples of table T, the master node selects another partitioning column 1020 to perform the process of steps 1015 to 1035. Can be.
단계(1040)에서 테이블 T의 튜플 내의 모든 파티셔닝 컬럼에 대해 해시 기반의 분할을 수행했다면, 마스터 노드는 파티션 인덱스의 집합 pidS에 저장되어 있는 모든 파티션 위치 pid에 대해 <pid, bitM[pid]> 쌍을 키로, 튜플 t를 값으로 하는 키-값 쌍 <<pid, bitM[pid]>, t >을 셔플할 수 있다(1050). 여기서, bitM[pid]는 pid 번째 파티션의 비트맵 테이블로서, 테이블 T 내의 비트맵 벡터에서 현 튜플t가 저장될 서브 파티션 정보이다. If hash-based partitioning has been performed for all partitioning columns in the tuples of table T in step 1040, the master node has <pid, bitM [pid]> pairs for all partition location pids stored in the set pidS of the partition index. The key may be shuffled into a key-value pair << pid, bitM [pid]>, t> with tuple t as a value (1050). Here, bitM [pid] is a bitmap table of the pid-th partition, and is subpartition information in which the current tuple t is to be stored in the bitmap vector in the table T.
마스터 노드는 테이블 T의 모든 튜플에 대해 셔플을 완료하였는지를 확인할 수 있다(1055). 단계(1055)에서 테이블 T의 모든 튜플에 대해 셔플을 완료하지 않았다면, 마스터 노드는 다음 튜플을 선택(1060)하여 단계(1010) 내지 단계(1055)의 과정을 수행할 수 있다. 마스터 노드는 모든 튜플을 셔플할 때까지 상술한 과정을 반복할 수 있다. The master node may check whether shuffling has been completed for all tuples of the table T (1055). In step 1055, if the shuffle is not completed for all tuples of the table T, the master node may select 1060 the next tuple to perform the processes of steps 1010 to 1055. The master node may repeat the above process until it shuffles all tuples.
단계(1055)에서 테이블 T의 모든 튜플에 대해 셔플을 완료하였다면, 마스터 노드는 동작을 종료할 수 있다. If the shuffle is completed for all tuples of the table T in step 1055, the master node may end the operation.
도 11은 일 실시예에 따른 마스터 노드에 포함된 데이터 로더의 리듀스(Reduce) 동작을 나타낸 흐름도이다. 도 11을 참조하면, 도 10을 통해 셔플이 완료된 테이블 T의 모든 튜플에 대해 마스터 노드(의 테이블 분할 저장 장치(130))가 리듀스 동작을 수행하는 과정이 도시된다. 11 is a flowchart illustrating a reduce operation of a data loader included in a master node according to an embodiment. Referring to FIG. 11, a process in which a master node (table partition storage device 130) performs a reduce operation on all tuples of a table T that has been shuffled through is illustrated in FIG. 10.
마스터 노드는 도 10의 맵 과정을 통해 셔플되어 온 비트맵 벡터 bitV에 대한 동일한 파티션 위치 pid를 지닌 튜플 리스트 list(t)를 수신할 수 있다(1110).The master node may receive a tuple list list (t) having the same partition position pid for the bitmap vector bitV that has been shuffled through the mapping process of FIG. 10 (1110).
마스터 노드는 튜플 리스트 list(t)가 포함된 테이블 T의 파티셔닝 컬럼 정보를 통해 |C(T)|개의 비트맵 벡터 집합 V를 생성할 수 있다(1120). 예를 들어, |C(T)|=2일 경우 비트맵 벡터 집합 V = {00,01,10,11}이 될 수 있다. The master node may generate | C (T) | bitmap vector set V through the partitioning column information of the table T including the tuple list list (t) (1120). For example, if | C (T) | = 2, the bitmap vector set V = {00,01,10,11}.
마스터 노드는 단계(1120)에서 생성한 비트맵 벡터 집합 V 내에 포함된 비트맵 벡터 v에 대한 서브 파티션 SubPV 를 초기화할 수 있다(1130). 예를 들어, 비트맵 벡터 집합 V = {00,01,10,11}일 경우, 비트맵 벡터 집합 V 내에 포함된 비트맵 벡터 v에 대한 4개의 서브 파티션들(SubP00, SubP01, SubP10 , SubP11) 이 초기화될 수 있다. The master node may initialize the subpartition SubP V for the bitmap vector v included in the bitmap vector set V generated in step 1120 (1130). For example, if the bitmap vector set V = {00,01,10,11}, four subpartitions (SubP 00 , SubP 01 , SubP 10) for the bitmap vector v included in the bitmap vector set V , SubP 11 ) may be initialized.
마스터 노드는 튜플 리스트 list(t)에 포함된 튜플 t를 선택할 수 있다(1140).The master node may select a tuple t included in the tuple list list (t) (1140).
마스터 노드는 선택된 튜플 t를 서브파티션 SubPbitV 에 저장할 수 있다(1150). 이때, 마스터 노드는 선택된 튜플 t가 셔플될 때 키로 사용된 <pid, bitV> 쌍에서 서브 파티션 정보인 비트맵 벡터 bitV를 이용하여 해당하는 서브 파티션 SubPbitV 에 튜플 t를 저장할 수 있다. The master node may store the selected tuple t in the subpartition SubP bitV (1150). In this case, when the selected tuple t is shuffled, the master node may store the tuple t in the corresponding subpartition SubP bitV using the bitmap vector bitV, which is subpartition information, in the <pid, bitV> pair used as a key.
마스터 노드는 튜플 리스트 list(t) 내의 모든 튜플 t가 서브 파티션에 저장되었는지를 확인할 수 있다(1160). 단계(1160)의 확인 결과, 모든 튜플 t가 서브 파티션에 저장되지 않았다면, 마스터 노드는 튜플 리스트 list(t) 내의 다음 튜플을 선택(1170)하여 단계(1150) 내지 단계(1160)의 동작을 수행할 수 있다. The master node may check whether all tuples t in the tuple list list (t) are stored in the subpartition (1160). If all tuples t have not been stored in the subpartition as a result of checking in step 1160, the master node selects 1170 the next tuple in the tuple list list (t) to perform the operations of steps 1150 to 1160. can do.
단계(1160)의 확인 결과, 모든 튜플 t가 서브 파티션에 저장되었다면, 마스터 노드는 튜플 리스트 list(t) 내의 모든 튜플을 서브 파티션 SubPV 에 저장한 후, 모든 서브 파티션들의 합집합(U SubPV)으로 현재 파티션 Pi(T) 을 구성할 수 있다(1180).As a result of checking in step 1160, if all tuples t are stored in the subpartition, the master node stores all the tuples in the tuple list list (t) in the subpartition SubP V , and then unions all subpartitions (U SubP V ). In this case, the current partition P i (T) may be configured (1180).
마스터 노드는 단계(1180)에서 구성된 데이터베이스 파티션 Pi(T) 을 N개의 슬레이브 노드들 중 i번째 (1 ≤ i ≤ N) 슬레이브 노드의 주기억 장치 혹은 보조 기억 장치에 저장할 수 있다(1190). 이때, 데이터베이스 파티션 Pi(T) 은 서브 파티셔닝 개념을 사용하여 분할 저장될 수 있다. 서브 파티셔닝된 데이터베이스 파티션에 대하여는 도 12 내지 도 13에 도시된 데이터베이스의 테이블을 분할 저장하는 실시예들을 통해 구체적으로 설명한다. The master node may store the database partition P i (T) configured in operation 1180 in a main memory device or an auxiliary storage device of an i th (1 ≦ i ≦ N) slave node among N slave nodes (1190). In this case, the database partition P i (T) may be divided and stored using a sub-partitioning concept. Subpartitioned database partitions will be described in detail with reference to embodiments in which the tables of the database shown in FIGS. 12 to 13 are divided and stored.
도 12는 일 실시예에 따른 비트맵 테이블을 이용하여 테이블을 분할 저장할 때의 파티션의 일 예를 도시한 도면이다. 도 12를 참조하면, 비트맵 테이블을 매 데이터베이스 파티션마다 추가적으로 저장해 분할 저장하는 방식에 대한 실시예가 도시된다. 12 is a diagram illustrating an example of partitions when a table is divided and stored using a bitmap table, according to an exemplary embodiment. Referring to FIG. 12, an embodiment of a method of additionally storing and dividing a bitmap table for each database partition is shown.
테이블 R(1210)의 두 개의 파티셔닝 컬럼 R[1](1210a)와 R[2](1210b)은 도 10 내지 도 11의 전술한 과정을 통해 분할 저장될 수 있다.Two partitioning columns R [1] 1210a and R [2] 1210b of the table R 1210 may be divided and stored through the above-described processes of FIGS. 10 to 11.
테이블 R(1210)은 총 세 개의 파티션들(1220)로 분할 저장될 수 있다. 이때, 테이블 R(1210)의 파티셔닝 컬럼 집합의 개수 |C(R)|=2이므로, 가능한 비트맵 벡터는 (0,0)(1230b), (0,1) (1230d), (1,0)(1230c) 및 (1,1)(1230a)가 된다.The table R 1210 may be divided and stored into three partitions 1220 in total. Since the number of partitioning column sets of table R 1210 | C (R) | = 2, the possible bitmap vectors are (0,0) (1230b), (0,1) (1230d), (1,0 ) 1230c and (1, 1) 1230a.
테이블 R(1210)의 각 튜플들이 분할 저장될 파티션의 위치 pid는 두 파티셔닝 컬럼 값에 따라 결정될 수 있다. The location pid of the partition where tuples of the table R 1210 are to be divided and stored may be determined according to two partitioning column values.
예를 들어, 튜플 (1,1)은 모든 파티셔닝 컬럼의 값이 동일하게 '1' 이므로 첫번째 데이터베이스 파티션 P1(R)에만 저장되고, 비트맵 벡터는 (1,1)이 될 수 있다. 그 이유는 첫번째 데이터베이스 파티션 P1(R)에 저장된 튜플 (1,1)은 파티셔닝 컬럼 관점에서 살펴볼 때 중복되지 않은 원래의 튜플이기 때문이다. For example, the tuple (1,1) is stored only in the first database partition P 1 (R) because all partitioning columns have the same value '1', and the bitmap vector may be (1,1). This is because the tuples (1,1) stored in the first database partition P 1 (R) are the original tuples that are not duplicated from the partitioning column perspective.
튜플 (2,3)은 첫번째 파티셔닝 컬럼R[1](1210a)에 의해서는 두번째 데이터베이스 파티션 P2(R)에, 두번째 파티셔닝 컬럼R[2](1210b)에 의해서는 세번째 데이터베이스 파티션 P3(R)에 분할 저장될 수 있다. 따라서, 중복된 튜플 하나가 추가적으로 저장되었기 때문에, 튜플 (2,3)에 대한 비트맵 벡터중 한 비트는 값이 '0'이 될 수 있다.The tuples (2, 3) are allocated to the second database partition P 2 (R) by the first partitioning column R [1] 1210a, and the third database partition P 3 (R by the second partitioning column R [2] 1210b. Can be divided and stored. Therefore, since one redundant tuple is additionally stored, one bit of the bitmap vector for the tuple (2,3) may have a value of '0'.
보다 구체적으로, 두번째 데이터베이스 파티션 P2(R)에 저장된 튜플 (2,3)의 비트맵 벡터는 (1,0)(1230c)이지만, 세번째 데이터베이스 파티션 P3(R)에 저장된 튜플 (2,3)의 비트맵 벡터는 (0,1)이 될 수 있다. 이러한 차이점은 추후에 데이터베이스 파티션을 사용해 쿼리를 처리하는 경우에 중복 결과를 제거하는 데에 이용될 수 있다. More specifically, the bitmap vector of tuple (2,3) stored in the second database partition P 2 (R) is (1,0) (1230c), but the tuple (2,3) stored in the third database partition P 3 (R) ) May be (0,1). This difference can later be used to eliminate duplicate results when processing queries using database partitions.
예를 들어, 입력 쿼리 내에 포함된 테이블 R이 파티셔닝 컬럼 R[1]을 사용한다면, 비트맵 벡터 중 첫번째 비트값이 '0'인 튜플을 쿼리 처리에서 배제하여야 한다. 따라서, 세번째 데이터베이스 파티션 P3(R)에 저장된 튜플 (2,3)은 해당 쿼리의 처리 시에 사용되지 않는다.For example, if the table R included in the input query uses the partitioning column R [1], the tuple whose first bit value of the bitmap vector is '0' should be excluded from the query processing. Thus, the tuples (2, 3) stored in the third database partition P 3 (R) are not used when processing the query.
이렇듯, 데이터베이스 파티션 마다 비트맵 테이블을 같이 저장하고, 쿼리 처리시 저장된 비트맵 테이블 정보를 활용해 데이터베이스 파티션 내에 포함된 중복된 튜플을 제외하고 쿼리 처리를 할 수 있다.As such, a bitmap table can be stored for each database partition, and query processing can be performed by excluding duplicate tuples included in the database partition by using the stored bitmap table information during query processing.
도 13은 일 실시예에 따른 서브 파티셔닝에 의해 테이블을 분할 저장할 때의 파티션의 일 예를 도시한 도면이다. 도 13을 참조하면, 서브 파티셔닝 개념을 이용하여 테이블을 분할 저장하는 방법이 도시된다. FIG. 13 is a diagram illustrating an example of partitions when a table is divided and stored by subpartitioning according to an embodiment. Referring to FIG. 13, a method of partitioning and storing a table by using a subpartitioning concept is illustrated.
테이블 R(1310)은 도 12의 테이블 R(1210)과 동일한 튜플을 저장하고 있으며, 파티셔닝 컬럼도 R[1](1310a)와 R[2](1310b)의 두개로 동일하다. 이때, 도 12의 실시예와 마찬가지로 세 개의 데이터베이스 파티션들(1320)을 사용해 테이블 R(1310)을 분할 저장한다고 가정하자.The table R 1310 stores the same tuple as the table R 1210 of FIG. 12, and the partitioning column is also the same as two of R [1] 1310a and R [2] 1310b. In this case, it is assumed that the table R 1310 is divided and stored using three database partitions 1320 as in the embodiment of FIG. 12.
이때, 테이블 R(1310)의 파티셔닝 컬럼 집합의 개수 |C(R)| =2이므로, 비트맵 벡터 집합에는 {00,01,10,11} 총 4개의 비트맵 벡터가 포함될 수 있다. At this time, the number of partitioning column sets of the table R 1310 | C (R) | Since = 2, the bitmap vector set may include four bitmap vectors in total {00,01,10,11}.
따라서, 각 데이터베이스 파티션 Pi(R)은 각각 4개씩의 서브 파티션들(1320a, 1320b, 1320c, 1320d)들을 포함할 수 있다. 일 실시예에서 각 데이터베이스 파티션 Pi (R)을 구성하는 서브 파티션들은 4개의 비트맵 벡터 중 하나를 대표할 수 있다. Accordingly, each database partition Pi (R) may include four subpartitions 1320a, 1320b, 1320c, and 1320d, respectively. In one embodiment, the subpartitions constituting each database partition Pi (R) may represent one of four bitmap vectors.
따라서, 테이블 R(1310)의 튜플은 사용한 파티셔닝 컬럼값에 따라 저장된 파티션의 위치가 결정되며, 계산된 비트맵 벡터에 따라 최종적으로 저장될 해당 파티션의 서브 파티션이 결정될 수 있다. Accordingly, the location of the stored partition is determined according to the partitioning column value used for the tuple of the table R 1310, and the subpartition of the corresponding partition to be finally stored is determined according to the calculated bitmap vector.
예를 들어, 테이블 R(1310)의 튜플(1,1)은 두 파티셔닝 컬럼 값에 대한 해시 함수 값이 같고, 모두 첫번째 데이터베이스 파티션 P1(R)으로 셔플되기 때문에 중복이 발생하지 않는다. 따라서, 비트맵 벡터는 (1,1)로 계산될 수 있다. For example, the tuples 1, 1 of table R 1310 have the same hash function values for the two partitioning column values, and both are shuffled to the first database partition P 1 (R), so no duplication occurs. Therefore, the bitmap vector can be calculated as (1,1).
그리고, 첫번째 데이터베이스 파티션 P1(R)에 저장될 튜플 (1,1)의 비트맵 벡터 역시 (1,1)이기 때문에 비트맵 벡터 (1,1)을 대표하는 첫번째 데이터베이스 파티션 P1(R)의 네번째 서브 파티션(1320d)에 저장될 수 있다. 이때, 각 서브 파티션은 비트맵 테이블을 따로 저장할 필요가 없다.Since the bitmap vector of the tuple (1,1) to be stored in the first database partition P 1 (R) is also (1,1), the first database partition P 1 (R) representing the bitmap vector (1,1) May be stored in the fourth sub-partition 1320d. At this time, each subpartition does not need to store a bitmap table separately.
도 13에 도시된 서브 파티셔닝에 의해 테이블을 분할하는 경우, 쿼리 처리 시에 비트 맵 테이블에 대한 접근을 필요로 하지 않게 되므로 도 12에 도시된 테이블 분할 저장 방법보다 쿼리 처리 성능이 향상될 수 있다. In the case of partitioning a table by subpartitioning illustrated in FIG. 13, since the access to the bitmap table is not required during query processing, query processing performance may be improved compared to the table partitioning storage illustrated in FIG. 12.
테이블 분할 저장 장치(130)를 통해 분할 저장된 테이블에 대한 쿼리 처리는 마스터 노드의 분할된 테이블 읽기 장치(140)에 의해 수행될 수 있다. 분할된 테이블 읽기 장치(140)가 분할 저장된 테이블에 대한 쿼리를 처리하는 방법은 도 14를 참조하여 설명한다. Query processing for the table partitioned and stored through the table partition storage device 130 may be performed by the partition table reading device 140 of the master node. A method of processing the query for the partitioned and stored table by the partitioned table reading device 140 will be described with reference to FIG. 14.
도 14는 일 실시예에 따라 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법을 나타낸 흐름도이다. 도 14를 참조하면, 마스터 노드(의 분할된 테이블 읽기 장치(140)가 테이블 분할 저장 장치(130)를 통해 분할 저장된 테이블에 대한 쿼리를 처리하는 과정이 도시된다.14 is a flowchart illustrating a method of processing a query based on a relational database storage method, according to an exemplary embodiment. Referring to FIG. 14, a process in which a partitioned table reading device 140 of a master node processes a query for a table partitioned and stored through the table partitioning storage device 130 is illustrated.
마스터 노드는 입력 질의(쿼리) Q를 수신할 수 있다(1405).The master node may receive an input query (query) Q (1405).
마스터 노드는 분할된 테이블 R이 단계(1405)에서 수신한 입력 쿼리 Q 내의 조인 연산에 사용되는지 여부 및 테이블 R이 관계형 데이터베이스 저장 방법에 따라 저장된 것인지 여부를 판단할 수 있다. The master node may determine whether the partitioned table R is used for the join operation in the input query Q received in step 1405 and whether the table R is stored according to the relational database storage method.
마스터 노드는 테이블 R이 입력 쿼리 Q 내의 조인 연산에 사용되는지를 판단할 수 있다(1410). 단계(1410)에서 마스터 노드는 테이블 R이 입력 쿼리 Q 내의 조인 연산에 사용되는 경우와 테이블 R이 조인 연산에 사용되지 않거나 또는 입력 쿼리Q가 조인 연산을 포함하고 있지 않을 경우 두 가지 중 하나로 상태를 구분할 수 있다. The master node may determine whether table R is used for a join operation in input query Q (1410). In step 1410, the master node transitions to one of two states: when table R is used for join operations in input query Q, and when table R is not used for join operations, or if input query Q does not include a join operation. Can be distinguished.
단계(1410)에서 테이블 R이 입력 쿼리 Q 내의 조인 연산에 사용되지 않거나, 또는 입력 쿼리 Q가 조인 연산을 포함하지 않을 경우, 마스터 노드는 싱글 스캔 모드(single scan mode)를 테이블 R의 스캔 모드로 결정할 수 있다(1425). 마스터 노드는 싱글 스캔 모드에 따라 분할된 테이블 R의 파티셔닝 컬럼 집합 C(R)에 포함된 파티셔닝 컬럼 중 임의의 파티셔닝 컬럼 j를 선택할 수 있다(1435).If at step 1410 the table R is not used for a join operation in the input query Q, or if the input query Q does not include a join operation, then the master node switches the single scan mode to the scan mode of the table R. It may be determined (1425). The master node may select any partitioning column j among partitioning columns included in the partitioning column set C (R) of the divided table R according to the single scan mode (1435).
단계(1410)에서 테이블 R이 입력 쿼리 Q 내의 조인 연산에 사용되는 경우, 마스터 노드는 데이터베이스 파티셔닝 계획 PG에 포함된 테이블들의 파티셔닝 컬럼 정보를 통해 테이블 R과 조인될 테이블 S의 파티셔닝 컬럼의 교집합이 공집합인지를 검사할 수 있다(1415). 단계(1415)에서 교집합이 공집합인 경우, 마스터 노드는 단계(1425) 및 단계(1435)를 수행할 수 있다. If the table R is used in the join operation in the input query Q in step 1410, the master node empty the intersection of the partitioning columns of the table S to be joined with the table R through the partitioning column information of the tables included in the database partitioning plan PG. Cognition may be checked (1415). If the intersection is empty in step 1415, the master node may perform steps 1425 and 1435.
단계(1415)에서 교집합이 공집합이 아닌 경우, 마스터 노드는 조인 스캔 모드(join scan mode)를 테이블 R의 스캔 모드로 결정할 수 있다(1420). 마스터 노드는 조인 스캔 모드에 따라 테이블 R과 S의 파티셔닝 컬럼 집합의 교집합
Figure PCTKR2017000346-appb-I000011
에 포함된 하나 이상의 파티셔닝 컬럼 중 하나의 파티셔닝 컬럼 j를 선택할 수 있다(1430).
If the intersection is not an empty set in step 1415, the master node may determine a join scan mode as the scan mode of the table R (1420). The master node intersects the set of partitioning columns of tables R and S according to the join scan mode.
Figure PCTKR2017000346-appb-I000011
One partitioning column j among one or more partitioning columns included in may be selected (1430).
마스터 노드는 단계(1430) 또는 단계(1435)에서 선택된 파티셔닝 컬럼 j에 대응하는 비트맵 벡터의 리스트를 계산할 수 있다(1440). 단계(1440)에서 마스터 노드는 파티셔닝 컬럼 j에 대해 분할된 테이블을 읽기 전 비트맵 벡터의 리스트 V를 계산할 수 있다. 예를 들어, 파티셔닝 컬럼 집합의 개수 |C(R)|=2일 경우 파티셔닝 컬럼 j가 C(R)내에서 첫번째 파티셔닝 컬럼이라면 비트맵 벡터 리스트V={10,11}이 될 수 있다. 비트맵 벡터 리스트 V에 포함된 두 비트맵 벡터는 비트맵 벡터를 대표하는 두 서브 파티션에 파티셔닝 컬럼 j를 사용해 분할 저장된 테이블 R의 중복을 포함하지 않는 튜플들이 저장되어 있음을 의미한다.The master node may calculate a list of bitmap vectors corresponding to the partitioning column j selected in step 1430 or 1435 (1440). In operation 1440, the master node may calculate a list V of bitmap vectors before reading the partitioned table for the partitioning column j. For example, when the number | C (R) | = 2 of the partitioning column set, if the partitioning column j is the first partitioning column in C (R), the bitmap vector list V = {10,11} may be obtained. Two bitmap vectors included in the bitmap vector list V mean that tuples that do not include a duplicate of the table R partitioned using the partitioning column j are stored in two subpartitions representing the bitmap vector.
따라서, 마스터 노드는 비트맵 벡터의 리스트에 포함된 적어도 하나의 비트맵 벡터에 대응하는 서브 파티션을 선택하고(1445), 선택된 서브 파티션을 스캔할 수 있다(1450).Accordingly, the master node may select a subpartition corresponding to at least one bitmap vector included in the list of bitmap vectors (1445) and scan the selected subpartition (1450).
단계(1445)에서, 마스터 노드는 예를 들어, 비트맵 벡터 리스트 V에 포함된 비트맵 벡터를 대표하는 데이터베이스 파티션 Pi(R) 의 서브 파티션 SubPv (
Figure PCTKR2017000346-appb-I000012
) 중 하나를 선택할 수 있다.
In step 1445, the master node is, for example, a subpartition SubP v (of database partition P i (R) representing a bitmap vector included in bitmap vector list V;
Figure PCTKR2017000346-appb-I000012
) Can be selected.
마스터 노드는 필요한 모든 튜플을 스캔했는지를 확인할 수 있다(1455). 단계(1455)에서 필요한 튜플을 모두 읽지 않았다면, 마스터 노드는 필요한 모든 튜플을 읽을 때까지 비트맵 벡터 리스트 V 내의 다른 비트맵 벡터 v를 선택하고(1460), 단계(1450) 내지 단계(1460)의 과정을 반복할 수 있다. The master node may check whether all necessary tuples have been scanned (1455). If all the required tuples have not been read in step 1455, the master node selects another bitmap vector v in the bitmap vector list V (1460) until all the required tuples have been read (step 1460). The process can be repeated.
단계(1455)에서 필요한 튜플을 모두 읽었다면 마스터 노드는 동작을 종료할 수 있다. If all the necessary tuples have been read in step 1455, the master node may terminate the operation.
이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented as hardware components, software components, and / or combinations of hardware components and software components. For example, the devices, methods, and components described in the embodiments may include, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gates (FPGAs). It may be implemented using one or more general purpose or special purpose computers, such as an array, a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of the software. For convenience of explanation, one processing device may be described as being used, but one of ordinary skill in the art will appreciate that the processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device. Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. Or may be permanently or temporarily embodied in a signal wave to be transmitted. The software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner. Software and data may be stored on one or more computer readable recording media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described with reference to the accompanying drawings, those skilled in the art may apply various technical modifications and variations based on the above. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.

Claims (19)

  1. 데이터베이스 테이블들 간의 참조 및 제약 조건에 대한 정보를 포함하는 데이터베이스 스키마(database schema) 및 조인 술어(join predicate) 정보를 포함하는 쿼리 집합(query set) 중 적어도 하나를 기초로, 테이블들 및 엣지들을 포함하는 조인 그래프(join graph)를 생성하는 단계;Include tables and edges based on at least one of a database schema that includes information about references and constraints between database tables and a query set that includes join predicate information. Generating a join graph;
    상기 조인 그래프에 포함된 테이블들 간의 조인 연산의 비용에 기초하여 상기 테이블들의 타입을 구분하는 단계;Classifying the types of the tables based on a cost of a join operation between the tables included in the join graph;
    엣지에 의해 서로 연결되는 상기 테이블들의 타입에 기초하여, 상기 조인 그래프 내의 엣지들의 타입을 구분하는 단계;Distinguishing a type of edges in the join graph based on the type of the tables connected to each other by an edge;
    상기 조인 그래프 내에서 간접 엣지 조건을 만족하는 두 테이블 사이에 가상의 엣지를 추가하는 단계; 및Adding a virtual edge between two tables that satisfy an indirect edge condition in the join graph; And
    상기 가상의 엣지를 포함하는 엣지들의 타입에 기초하여, 상기 조인 그래프에 대한 데이터베이스 분할 계획을 생성하는 단계Generating a database partitioning plan for the join graph based on the type of edges including the virtual edge
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  2. 제1항에 있어서,The method of claim 1,
    상기 조인 그래프를 생성하는 단계는Generating the join graph
    상기 참조 및 제약 조건에 대한 정보 및 상기 조인 술어 정보 중 적어도 하나를 이용하여 상기 조인 그래프에 포함된 테이블들 간의 엣지를 구성하는 단계Configuring edges between tables included in the join graph using at least one of the reference and constraint information and the join predicate information.
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  3. 제1항에 있어서,The method of claim 1,
    상기 테이블들의 타입을 구분하는 단계는The step of classifying the types of tables
    상기 조인 그래프 내의 테이블과 상기 테이블에 인접한 인접 테이블들 간의 조인 연산(join operation)의 비용에 기초하여 상기 테이블들의 타입을 구분하는 단계Classifying the types of the tables based on a cost of a join operation between a table in the join graph and adjacent tables adjacent to the table
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  4. 제3항에 있어서,The method of claim 3,
    상기 테이블들의 타입을 구분하는 단계는The step of classifying the types of tables
    상기 테이블과 상기 인접 테이블들의 집합 정보를 기초로, 상기 테이블을 기억 장치에 분할 저장하는 경우의 제1 조인 연산 비용의 합 및 상기 테이블을 복수 개의 슬레이브 노드들에 복제하는 경우의 제2 조인 연산 비용의 합을 산출하는 단계;The sum of the first join operation cost when the table is divided and stored in a storage device and the second join operation cost when the table is replicated to a plurality of slave nodes based on the set information of the table and the adjacent tables. Calculating a sum of;
    상기 제1 조인 연산 비용의 합과 상기 제2 조인 연산 비용의 합 간의 비교 결과에 따라 상기 테이블의 타입을 제1 타입 및 제2 타입 중 어느 하나로 구분하는 단계; 및Dividing the type of the table into one of a first type and a second type according to a comparison result between the sum of the first join operation cost and the second join operation cost; And
    상기 구분된 테이블의 타입에 따라 상기 테이블을 저장하는 단계Storing the table according to the type of the divided table
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  5. 제1항에 있어서,The method of claim 1,
    상기 엣지들 각각의 타입을 구분하는 단계는The step of classifying each type of the edges
    상기 엣지에 의해 서로 연결되는 테이블들의 타입에 기초하여, 상기 엣지들 각각의 타입을 인터 엣지(inter edge) 및 인트라 엣지(intra edge) 중 어느 하나로 구분하는 단계Classifying each type of each of the edges into one of an inter edge and an intra edge, based on a type of tables connected to each other by the edge;
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  6. 제5항에 있어서,The method of claim 5,
    상기 인터 엣지 및 인트라 엣지 중 어느 하나로 구분하는 단계는The step of dividing into any one of the inter edge and intra edge
    상기 엣지에 의해 서로 연결되는 테이블들의 타입이 모두 제1 타입인 경우, 상기 엣지의 타입을 인트라 엣지로 결정하는 단계; 및If the types of tables connected to each other by the edges are all first types, determining the type of the edge as an intra edge; And
    상기 엣지에 의해 서로 연결되는 테이블들의 타입 중 어느 하나의 타입은 제1 타입이고, 다른 하나의 타입은 제2 타입인 경우, 상기 엣지의 타입을 인터 엣지로 결정하는 단계If any one of the types of tables connected to each other by the edge is a first type and the other type is a second type, determining the type of the edge as an inter edge
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  7. 제1항에 있어서,The method of claim 1,
    상기 가상의 엣지를 추가하는 단계는Adding the virtual edge
    상기 조인 그래프 내에 포함된 제1 타입의 테이블들의 쌍(pair)가 상기 간접 엣지 조건을 만족하는지 여부를 검사하는 단계; 및Checking whether a pair of tables of a first type included in the join graph satisfy the indirect edge condition; And
    상기 간접 엣지 조건을 만족하는 제1 타입의 테이블들의 쌍 사이에 상기 가상의 엣지를 추가하는 단계Adding the virtual edge between pairs of tables of a first type that satisfy the indirect edge condition
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  8. 제7항에 있어서,The method of claim 7, wherein
    상기 간접 엣지 조건은The indirect edge condition is
    상기 제1 타입의 테이블들의 쌍인 제1 테이블과 제2 테이블이 동일한 제3 테이블과 상기 제1 테이블의 제1 엣지 및 상기 제2 테이블의 제2 엣지를 통해 연결되는 제1 조건;A first condition in which the first table and the second table, which are pairs of the tables of the first type, are connected through the same third table, a first edge of the first table, and a second edge of the second table;
    상기 제1 엣지 및 상기 제2 엣지의 레이블에 상기 제3 테이블의 동일 컬럼이 포함되어 있는 제2 조건; 및A second condition that the same column of the third table is included in the labels of the first edge and the second edge; And
    상기 제3 테이블의 타입이 제2 타입인 제3 조건A third condition that the type of the third table is a second type
    을 포함하는, 관계형 데이터베이스 저장 방법.Including, relational database storage method.
  9. 제1항에 있어서,The method of claim 1,
    상기 데이터베이스 분할 계획을 생성하는 단계는Generating the database partitioning plan
    상기 엣지들의 타입에 따라, 상기 엣지들을 이용하여 제1 타입의 테이블에 의해 상기 조인 연산을 수행할 때의 이득(benefit)을 계산하는 단계;Calculating, according to the types of edges, a benefit when performing the join operation by a table of a first type using the edges;
    상기 이득이 큰 순서로 상기 엣지들을 정렬하는 단계;Sorting the edges in ascending order of gain;
    상기 조인 그래프 내 제1 타입의 테이블들을 노드로 하는 분할 그래프를 초기화하는 단계; 및Initializing a partition graph having nodes of a first type of tables in the join graph; And
    상기 정렬된 순서로 상기 엣지들을 처리함으로써, 상기 분할 그래프를 갱신하는 단계Updating the segmentation graph by processing the edges in the sorted order
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  10. 제9항에 있어서,The method of claim 9,
    상기 엣지들의 타입은The type of edges
    인트라 엣지, 인터 엣지 및 간접 엣지 중 적어도 하나를 포함하고,At least one of an intra edge, an inter edge, and an indirect edge,
    상기 이득을 계산하는 단계는The step of calculating the gain
    상기 엣지들의 타입에 따른 서로 다른 분할 이득 모델을 사용하여 상기 이득을 계산하는 단계Calculating the gain using different split gain models according to the types of edges
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  11. 제9항에 있어서,The method of claim 9,
    상기 분할 그래프를 갱신하는 단계는Updating the split graph
    상기 데이터베이스 분할 계획에 기초하여, 상기 조인 그래프 내의 엣지에 대해서 삼각 엣지 조건을 만족하는 인접한 두 개의 삼각 엣지를 탐색하는 단계;Searching for two adjacent triangular edges satisfying triangular edge conditions for the edges in the join graph based on the database partitioning plan;
    상기 데이터베이스 분할 계획에 기초하여, 상기 조인 그래프 내의 엣지에 대해서 허브 테이블 조건을 만족하는 허브 테이블을 탐색하는 단계; 및Searching for a hub table that satisfies a hub table condition for an edge in the join graph based on the database partitioning plan; And
    상기 엣지, 상기 두 개의 삼각 엣지, 및 상기 허브 테이블을 상기 분할 그래프에 추가하는 단계Adding the edge, the two triangular edges, and the hub table to the split graph
    를 더 포함하는, 관계형 데이터베이스 저장 방법.Further comprising, relational database storage method.
  12. 제11항에 있어서,The method of claim 11,
    상기 삼각 엣지 조건은The triangular edge condition is
    상기 조인 그래프 내의 상기 엣지의 타입이 인트라 엣지인 조건;The type of the edge in the join graph is an intra edge;
    상기 인트라 엣지에 연결된 제1 타입의 두 개의 테이블들 각각의 엣지들이 존재하고, 상기 각각의 엣지들이 동일한 테이블과 연결되는 조건;A condition that edges of each of two tables of a first type connected to the intra edge are present, and wherein each of the edges is connected to the same table;
    상기 각각의 엣지들의 레이블들이 상기 동일한 테이블의 컬럼을 포함하는 조건; 및A condition in which the labels of each of the edges include a column of the same table; And
    상기 동일한 테이블의 타입이 제2 타입인 조건The condition that the type of the same table is a second type
    을 포함하는, 관계형 데이터베이스 저장 방법.Including, relational database storage method.
  13. 제11항에 있어서,The method of claim 11,
    상기 허브 테이블 조건은The hub table condition is
    상기 조인 그래프 내의 상기 엣지의 타입이, 제1 타입의 두 개의 테이블들 사이의 인트라 엣지 또는 간접 엣지이고, 상기 제1 타입의 두 개의 테이블들 각각의 엣지가 상기 삼각 엣지 조건에 따라 제2 타입으로 구분된 하나 이상의 공통 테이블의 컬럼에 대하여 상기 삼각 엣지 조건을 만족하는 엣지들인 조건The type of the edge in the join graph is an intra edge or an indirect edge between two tables of the first type, and the edge of each of the two tables of the first type is the second type according to the triangular edge condition. Conditions that are edges that satisfy the triangular edge condition for one or more partitioned common table columns
    을 포함하는, 관계형 데이터베이스 저장 방법.Including, relational database storage method.
  14. 제1항에 있어서,The method of claim 1,
    상기 데이터베이스 분할 계획에 기초하여, 상기 테이블들에 포함된 튜플들(tuples)을 해시(hash) 함수 기반으로 분할하는 단계; 및Partitioning tuples included in the tables based on a hash function based on the database partitioning plan; And
    상기 분할된 튜플들 각각에 대응하는 파티션 내에, 해당하는 튜플의 파티셔닝 컬럼과 관련된 정보에 기초하여 상기 해당하는 튜플을 저장하는 단계Storing the corresponding tuple in a partition corresponding to each of the divided tuples based on information associated with a partitioning column of the corresponding tuple.
    를 더 포함하는, 관계형 데이터베이스 저장 방법.Further comprising, relational database storage method.
  15. 제14항에 있어서,The method of claim 14,
    상기 해시 기반으로 분할하는 단계는Partitioning based on the hash
    상기 튜플들의 모든 파티셔닝 컬럼값에 대한 해시 함수 기반으로 해당 튜플이 저장될 파티션의 위치를 결정하는 단계;Determining a location of a partition in which the tuple is to be stored based on a hash function for all partitioning column values of the tuples;
    파티셔닝 컬럼 집합 내에서의 해당 파티셔닝 컬럼의 인덱스 정보를 이용하여 비트맵 벡터를 생성하는 단계; 및Generating a bitmap vector using index information of the corresponding partitioning column in the partitioning column set; And
    상기 비트맵 벡터를 이용하여 상기 테이블의 비트맵 테이블에 상기 해당 튜플의 비트맵 벡터 정보를 업데이트하는 단계Updating bitmap vector information of the corresponding tuple in the bitmap table of the table by using the bitmap vector.
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  16. 제14항에 있어서,The method of claim 14,
    상기 해당하는 튜플을 저장하는 단계는The storing of the corresponding tuple
    상기 분할된 튜플들 각각에 대응하는 파티션마다 셔플되어 온 튜플 리스트가 포함된 테이블의 파티셔닝 컬럼 정보를 이용하여 비트맵 벡터 집합을 생성하는 단계;Generating a bitmap vector set using partitioning column information of a table including a list of tuples shuffled for each partition corresponding to each of the divided tuples;
    상기 비트맵 벡터 집합에 포함된 비트맵 벡터에 대한 서브 파티션을 초기화하는 단계;Initializing a subpartition for a bitmap vector included in the bitmap vector set;
    상기 튜플 리스트에 포함된 각 튜플에 대응하는 비트맵 벡터를 이용하여 해당하는 서브 파티션에 상기 각 튜플을 저장하는 단계; 및Storing each tuple in a corresponding subpartition using a bitmap vector corresponding to each tuple included in the tuple list; And
    상기 튜플 리스트에 포함된 모든 튜플이 상기 서브 파티션에 저장된 경우, 모든 서브 파티션들의 합집합에 의해 상기 튜플 리스트가 포함된 테이블의 파티션을 구성하는 단계When all the tuples included in the tuple list are stored in the subpartition, configuring a partition of the table including the tuple list by the union of all the subpartitions.
    를 포함하는, 관계형 데이터베이스 저장 방법.Including a relational database storage method.
  17. 테이블이 입력 쿼리 내의 조인 연산에서 사용되는지 여부를 판단하는 단계;Determining whether the table is used in a join operation in the input query;
    상기 테이블의 분할 칼럼 정보를 통해 상기 테이블의 제1 파티셔닝 컬럼 집합 및 상기 테이블과 조인될 테이블의 제2 파티셔닝 컬럼 집합 간의 교집합이 공집합인지 여부를 판단하는 단계;Determining whether the intersection between the first partitioning column set of the table and the second partitioning column set of the table to be joined with the table is empty by using the partition column information of the table;
    상기 판단에 기초하여 결정된 상기 테이블의 스캔 모드에 따라, 상기 테이블과 관련된 어느 하나의 파티셔닝 컬럼을 선택하는 단계;Selecting one partitioning column associated with the table according to the scan mode of the table determined based on the determination;
    상기 선택된 어느 하나의 파티셔닝 컬럼에 대응하는 비트맵 벡터의 리스트를 계산하는 단계;Calculating a list of bitmap vectors corresponding to the selected partitioning column;
    상기 비트맵 벡터의 리스트에 포함된 적어도 하나의 비트맵 벡터에 대응하는 서브 파티션을 선택하는 단계; 및Selecting a subpartition corresponding to at least one bitmap vector included in the list of bitmap vectors; And
    상기 선택된 서브 파티션을 스캔하는 단계Scanning the selected subpartition
    를 포함하는, 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법.A method of processing a query based on a relational database storage method comprising a.
  18. 제17항에 있어서, The method of claim 17,
    상기 어느 하나의 파티셔닝 컬럼을 선택하는 단계는The step of selecting any one partitioning column
    상기 판단에 기초하여 상기 테이블을 판독할 제1 스캔 모드 및 제2 스캔 모드 중 어느 하나의 스캔 모드를 결정하는 단계; 및 Determining a scan mode of one of a first scan mode and a second scan mode to read the table based on the determination; And
    상기 어느 하나의 스캔 모드에 따라, 상기 교집합에 포함된 파티셔닝 컬럼 및 상기 제1 파티셔닝 컬럼 집합에 포함된 파티셔닝 컬럼 중 어느 하나의 파티셔닝 컬럼을 선택하는 단계Selecting one partitioning column among the partitioning column included in the intersection and the partitioning column included in the first partitioning column set according to any one of the scan modes.
    를 포함하는, 관계형 데이터베이스 저장 방법에 기초한 쿼리를 처리하는 방법.A method of processing a query based on a relational database storage method comprising a.
  19. 하드웨어와 결합되어 제1항의 방법을 실행시키기 위하여 매체에 저장된 컴퓨터 프로그램. A computer program stored on a medium in combination with hardware to carry out the method of claim 1.
PCT/KR2017/000346 2016-08-31 2017-01-11 Relational database storage system and method for supporting quick query processing with low data redundancy, and method for processing query on basis of relational database storage method WO2018043843A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/327,274 US11068504B2 (en) 2016-08-31 2017-01-11 Relational database storage system and method for supporting fast query processing with low data redundancy, and method for query processing based on the relational database storage method

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20160112065 2016-08-31
KR10-2016-0112065 2016-08-31
KR10-2016-0178421 2016-12-23
KR1020160178421A KR101951999B1 (en) 2016-08-31 2016-12-23 Storage system and storing method of relational database for high query performance with low data redundancy and processing method of query based on storing method of relational database

Publications (1)

Publication Number Publication Date
WO2018043843A1 true WO2018043843A1 (en) 2018-03-08

Family

ID=61309205

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/000346 WO2018043843A1 (en) 2016-08-31 2017-01-11 Relational database storage system and method for supporting quick query processing with low data redundancy, and method for processing query on basis of relational database storage method

Country Status (1)

Country Link
WO (1) WO2018043843A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782654A (en) * 2020-07-01 2020-10-16 浪潮云信息技术股份公司 Method for storing data in distributed database in partition mode
CN116935846A (en) * 2023-06-29 2023-10-24 珠海谷田科技有限公司 Offline conference light control method, device, equipment and storage medium
US11882141B1 (en) * 2017-11-27 2024-01-23 Lacework Inc. Graph-based query composition for monitoring an environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150010694A (en) * 2013-06-07 2015-01-28 후아웨이 테크놀러지 컴퍼니 리미티드 Data partitioning method and apparatus
US9031994B1 (en) * 2012-12-27 2015-05-12 Emc Corporation Database partitioning for data processing system
US20150347473A1 (en) * 2014-05-29 2015-12-03 International Business Machines Corporation Database partition

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9031994B1 (en) * 2012-12-27 2015-05-12 Emc Corporation Database partitioning for data processing system
KR20150010694A (en) * 2013-06-07 2015-01-28 후아웨이 테크놀러지 컴퍼니 리미티드 Data partitioning method and apparatus
US20150347473A1 (en) * 2014-05-29 2015-12-03 International Business Machines Corporation Database partition

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CARLO CURINO ET AL.: "SCHISM", PROCEEDINGS OF THE VLDB ENDOWMENT, vol. 3, no. 1, September 2010 (2010-09-01), pages 48 - 57, XP055142294, DOI: 10.14778/1920841.1920853 *
SHIVANJALI KANASE: "GRAPH BASED WORKLOAD DRIVEN PARTITIONING SYSTEM FOR NOSQL DATABASE", JOURNAL OF THEORETICAL AND APPLIED INFORMATION TECHNOLOGY, vol. 89, no. 1, 15 July 2016 (2016-07-15), pages 85 - 95, XP055605104 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11882141B1 (en) * 2017-11-27 2024-01-23 Lacework Inc. Graph-based query composition for monitoring an environment
CN111782654A (en) * 2020-07-01 2020-10-16 浪潮云信息技术股份公司 Method for storing data in distributed database in partition mode
CN116935846A (en) * 2023-06-29 2023-10-24 珠海谷田科技有限公司 Offline conference light control method, device, equipment and storage medium
CN116935846B (en) * 2023-06-29 2024-03-19 珠海谷田科技有限公司 Offline conference light control method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2018043843A1 (en) Relational database storage system and method for supporting quick query processing with low data redundancy, and method for processing query on basis of relational database storage method
KR101951999B1 (en) Storage system and storing method of relational database for high query performance with low data redundancy and processing method of query based on storing method of relational database
WO2021060609A1 (en) Distributed computing system comprising plurality of edges and cloud and method for providing model for adaptive intelligence usage thereof
WO2018076868A1 (en) Data synchronization method, device and system, storage medium and server
WO2017213281A1 (en) Method for de-identifying big data
WO2014044136A1 (en) Distributed data-based concurrent processing method and system, and computer storage medium
WO2012165709A1 (en) Instance path searching and visualizing method and device
WO2015190755A1 (en) Method and system for providing map data of navigation device
WO2018101640A1 (en) Consistency recovery method for seamless database duplication
US20170075931A1 (en) Deleting rows from tables in a database without an index
WO2020177376A1 (en) Data extraction method and apparatus, terminal and computer-readable storage medium
WO2017185296A1 (en) Method and system for detecting outlier based on multiple support points index
WO2020222347A1 (en) Virtual machine arrangement method and virtual machine arrangement device implementing same
WO2013111949A1 (en) Whitelist synchronization server and client apparatus
WO2023163405A1 (en) Method and apparatus for updating or replacing credit evaluation model
EP3659073A1 (en) Electronic apparatus and control method thereof
WO2014069767A1 (en) Base sequence alignment system and method
WO2011020360A1 (en) Document storage method
WO2011068315A2 (en) Apparatus for selecting optimum database using maximal concept-strength recognition technique and method thereof
WO2019190030A1 (en) Method for anonymizing personal information in big data and combining anonymized data
WO2024106624A1 (en) Circuit design method and device
WO2024071505A1 (en) Multi-query scheduler-based multi-query processing method, and data processing system for implementing same method
WO2016153288A9 (en) Virtual cluster management system and method for controlling same
WO2024071504A1 (en) Method for processing structured data and unstructured data by assigning resources of different processes, and data processing system for providing method
WO2023128273A1 (en) System and method for accessing ledger information by using common keyset information

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

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

Country of ref document: EP

Kind code of ref document: A1