WO2016047866A1 - 데이터베이스 마이그레이션 방법 및 그 장치 - Google Patents

데이터베이스 마이그레이션 방법 및 그 장치 Download PDF

Info

Publication number
WO2016047866A1
WO2016047866A1 PCT/KR2014/013112 KR2014013112W WO2016047866A1 WO 2016047866 A1 WO2016047866 A1 WO 2016047866A1 KR 2014013112 W KR2014013112 W KR 2014013112W WO 2016047866 A1 WO2016047866 A1 WO 2016047866A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference table
node
relation
database
referenced
Prior art date
Application number
PCT/KR2014/013112
Other languages
English (en)
French (fr)
Inventor
김재홍
이재영
원영선
Original Assignee
삼성에스디에스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성에스디에스 주식회사 filed Critical 삼성에스디에스 주식회사
Publication of WO2016047866A1 publication Critical patent/WO2016047866A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • G06F16/24565Triggers; Constraints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion

Definitions

  • the present invention relates to a database migration method and apparatus therefor. More particularly, the present invention relates to a method and apparatus for migrating a relational database to a graph database.
  • a relational database is a collection of data items made up of a series of structured tables that can be accessed or combined in various ways without reorganizing the database tables. Much of the existing data is managed through relational databases.
  • the graph database manages data in a way that defines the entities and the relationships between them.
  • graph databases can quickly retrieve related information, such as data for social network services. It is well known that using a graph database, an existing relational database can easily solve a problem that can only be searched through multiple joins between tables.
  • the technical problem to be solved by the present invention is to provide an automated migration method and apparatus therefor from a relational database to a graph database.
  • the database migration method for achieving the above technical problem, the constraint of the reference table (referencing table) having a column set as a foreign key of the table of the relational database that is the migration source database ( gathering a constraint; determining, by the database migration apparatus, a relationship type of each of the reference tables from constraints of each reference table, and wherein the database migration apparatus is based on a relationship type of the reference table. Determining a node generation table and a relation frame for the reference table, converting data of each row of the node generation table to a node of a graph database which is a migration target database, and The method may include generating a relation of the graph database connecting the generated nodes.
  • determining the relationship type of each of the reference tables includes determining the relationship type of each of the reference tables using the number of constraints of each reference table.
  • the data of each row of the node generation table is converted into a node of a graph database which is a migration target database, and a relation of the graph database is connected to connect the generated nodes according to the relation frame.
  • the method may include generating a node list and a relation list by collecting the node generation table and the relation frame corresponding to each of the reference tables, and extracting data of each row of the node generation table included in the node list. Repeating the step of converting to a node of the graph database for all node generation tables included in the node list, and generating a relation of the graph database according to each relation frame included in the relation list. On the list Contained and a step for repeating with respect to all of the relations frame.
  • the step of gathering the constraints may include a query to obtain data for the constraints of all reference tables of the relational database from an information schema (information_schema). Management system), and obtaining data on the constraints in response to the query.
  • the determining of the relationship type may include setting a primary key among the constraints of the reference table when the number of constraints of the reference table, which is the object of determining the relationship type, is two or more. If the number of constraints is two or more, determining the relationship type of the reference table as an M: N relationship.
  • the determining of the relationship type may include setting a primary key among the constraints of the reference table when the number of constraints of the reference table, which is the object of determining the relationship type, is two or more. If the number of constraints is less than two, determining whether two or more constraints having the same constraint among the constraints of the reference table exist.
  • the determining of the relationship type may include setting the relationship type of the reference table to one of a 1: N relationship and a recursive relationship when there is only one constraint on the reference table that is the object of which the relationship type is to be determined. Determining.
  • the determining of the node generation table and the relation frame for the reference table may include: when the relationship type of the reference table is a 1: N relationship, the node generation table is a reference of the reference table and the reference table. And the relation frame connects between the node of the reference table and the node of the referenced table, wherein the data of the column designated as the foreign key of the node of the reference table and the data of the referenced column of the referenced table are Determining to connect between matching nodes.
  • the determining of the node generation table and the relation frame for the reference table may include: when the relationship type of the reference table is an M: N relationship, the node generation table may be a target of the first constraint of the reference table. A reference table and a referenced table of the second constraint of the reference table are determined, and the relation frame includes a node of the referenced table of the first constraint of the reference table and a referenced table of the second constraint of the reference table. A node between the nodes of which the data of the referenced column of the referenced table of the first constraint of the reference table and the data of the referenced column of the referenced table of the second constraint of the reference table match. Determining to connect.
  • the determining of the node generation table and the relation frame for the reference table may include a different reference table that refers to the reference table while the relationship type of the reference table is an M: N relationship.
  • the node generation table of the reference table may include the referenced table of the first constraint of the reference table, the referenced table of the second constraint of the reference table, and the reference.
  • a relation frame includes a first relation frame and a second relation frame, wherein the first relation frame includes a node between the node of the referenced table of the first constraint of the reference table and the node of the reference table. Connect the second relation frame to a reference table of the referenced table of the second constraint of the reference table.
  • the first relation frame includes data of the referenced column of the referenced table of the first constraint of the reference table and data of the reference column of the first constraint of the reference table.
  • a node connecting the matching nodes, wherein the second relation frame is a node in which the data of the referenced column of the referenced table of the second constraint of the reference table and the data of the reference column of the second constraint of the reference table match. Determining to connect between.
  • the determining of the node generation table and the relation frame for the reference table may include: when the relationship type of the reference table is a parallel relationship, the node generation table is a reference table of the reference table and the reference table.
  • the relation frame includes a first relation frame and a second relation frame, wherein the first relation frame is between a node of a referenced table of the reference table and a node of a reference table of the first constraint of the reference table.
  • the second relation frame is a connection between a node of a referenced table of the reference table and a node of a reference table of a second constraint of the reference table
  • the first relation frame is a peer of the reference table.
  • the data of the primary key column of the weak reference table is matched, and the second relation frame is a reference of the data of the referenced column of the referenced table of the reference table and the second constraint of the reference table. Determining that the data in the primary key column of the table is to connect between matching nodes.
  • the determining of the node generation table and the relation frame for the reference table may include determining that the node generation table is the reference table when the relation type of the reference table is a recursive relationship. Connecting between the first node and the second node of the reference table, and determining that the data of the column designated as the foreign key of the first node and the node where the data of the primary key column of the second node coincide. Include.
  • the database migration apparatus is a constraint query for collecting constraints of a referencing table having a column set as a foreign key among tables of a relational database that is a migration source database.
  • a relationship type determination unit that determines a relationship type of each of the reference tables from a constraint of each reference table, and determines a node generation table and a relation frame for the reference table based on the relationship type of the reference table.
  • a graph database for converting the data of each row of the node generation table to the node and the relation determination unit and a node of the graph database which is a migration target database, and connecting the generated nodes according to the relation frame.
  • Reel of It includes a graph DB generator that generates a migration.
  • a computer program is coupled with a computer device, and has a constraint on a referencing table having a column set as a foreign key among tables of a relational database that is a migration source database. ), Determining a relationship type of each of the reference tables from the constraints of each reference table, and generating a node generation table and a relation frame for the reference table based on the relationship type of the reference table. Determining, and converting data of each row of the node generation table into nodes of a graph database that is a migration target database, and generating a relation of the graph database connecting between the generated nodes according to the relation frame.
  • running steps It is stored in the medium group in order.
  • Embodiments of the invention presented herein allow for the migration of data recorded in a relational database to a graph database in an automated manner.
  • Performing the migration in an automated manner means that the logic that performs the series of operations must identify the relationships between each table in the relational database, which is the source database, and be created as a node of the graph database by the connections. This means that the node generation table is automatically selected, and a relation is automatically generated between nodes of the graph database in consideration of the connection relationship.
  • 1 is a conceptual diagram of a graph database.
  • FIG. 2 is a diagram illustrating five relationship types between entities in a relational database.
  • FIG. 3 is a flowchart of a database migration method according to an embodiment of the present invention.
  • FIG. 4 is an example of a query input to obtain a constraint in some operations of FIG. 3.
  • FIG. 5 is an example of data output as an input result of the query shown in FIG. 4.
  • FIG. 6 is a flowchart illustrating some operations of FIG. 3 in detail.
  • FIG. 7 is a diagram illustrating a table for explaining how a node and a relation are generated for each relationship type.
  • 8 to 10 are diagrams for describing an embodiment of applying exception processing to the node and relation generation method shown in FIG. 7 in some relationship types.
  • FIG. 11 is a diagram illustrating a relationship between tables of a relational database to be migrated to a graph database according to embodiments of the present invention.
  • 12A to 12F are diagrams showing row data input to tables displayed in the diagram illustrated in FIG. 11.
  • FIG. 13 is an example of data output as a result of inputting a query for obtaining a constraint to the relational database shown in FIGS. 11 through 12F.
  • FIG. 14 is a diagram illustrating a table in which a relationship type, a node generation table, and a relation frame are displayed for each of the referencing tables derived from FIG. 13.
  • FIG. 15 is a diagram illustrating a node list and a relation list generated by combining a node generation table and a relation frame for each reference table shown in FIG. 14.
  • FIG. 16 is a diagram illustrating a state in which data of a relational database displayed through FIGS. 11 to 12F is migrated to a graph database.
  • 17 is a flowchart of a database migration method according to another embodiment of the present invention.
  • FIG. 18 is an example of a node property and a label setting UI that may be provided by a user according to some operations shown in the flowchart of FIG. 17.
  • FIG. 19 is an example of a relation property and a label setting UI that can be provided by a user according to some operations shown in the flowchart of FIG. 17.
  • FIG. 20 is a configuration diagram of a database migration system according to another embodiment of the present invention.
  • 21 is a block diagram of a database migration apparatus according to another embodiment of the present invention.
  • FIG. 22 is a hardware configuration diagram of a database migration apparatus according to another embodiment of the present invention.
  • FIG. 1 is a conceptual diagram of a graph database.
  • a graph database is composed of relations representing nodes and data representing data using the concept of graphs.
  • One node represents each row of each table in a relational database.
  • Data contained in a node is represented by a property.
  • the properties of the node displayed on the left side of FIG. 1 are Id, Name, and Age.
  • the node may also have a label.
  • the relation connects between nodes, and may have directionality of the connection. Like a node, the relation may have properties.
  • FIG. 2 is a diagram illustrating five relationship types between entities in a relational database.
  • the entity shown in FIG. 2 may be understood in the same concept as a table in a relational database.
  • relationships between entities can be classified into five types as shown in FIG. 2.
  • five types of relationships will be described.
  • the 1: 1 relationship means that Table A and Table B have the same column as a primary key. For example, if table A is user basic information and table B is user additional information, table A and table B have a 1: 1 relationship.
  • the 1: N relationship refers to a relationship in which table B refers to a primary key of table A as a foreign key. For example, if table A is department information and table B is employee information, table A and table B have a 1: N relationship.
  • the M: N relationship means a relationship between Table A and Table B through an intermediate relationship definition table that references both primary keys of Table A and Table B. For example, if table A is product information, table B is customer information, and table C is order information, table A and table B have an M: N relationship.
  • a parallel relationship is a relationship in which the primary key of table A is referenced as a foreign key in two or more columns of table B.
  • table A is branch management data
  • table B is account management data
  • a recursive relationship refers to a relationship in which the primary key of table A is referenced as a foreign key in a column of table A. For example, if table A is employee data, the columns of table A are employee number and manager employee number, and the manager employee number column is a foreign key referring to the employee number, then table A is in a recursive relationship.
  • a database migration method according to an embodiment of the present invention will be described with reference to FIG. 3.
  • This embodiment may be performed by a computing device having computing means.
  • the computing device may be, for example, a database migration device according to another embodiment of the present invention.
  • the configuration and operation of the database migration apparatus will be described in detail later.
  • the subject performing each operation of the database migration method according to the present embodiment will not be described.
  • a query may be generated to obtain constraints of all the reference tables of the relational database, and an operation may be performed in which the query is entered into a database management system (DBMS) of the relational database.
  • DBMS database management system
  • the constraints of all the reference tables having columns set as foreign keys among the tables of the relational database may be collected by the query, and the migration may be performed using the collected constraints.
  • the constraints of some reference tables having columns set as foreign keys among the tables of the relational database may be collected by the query, and the migration may be performed using the collected constraints. That is, according to the user's setting or the like, among the tables of the relational database, tables that do not need to be reflected in the migration task may be previously excluded from the collection of constraints.
  • the query includes syntaxes for obtaining a constraint of the lookup table from an information schema (information_schema) 10.
  • an information schema information_schema
  • a view table for constraints as shown in FIG. 5 can be obtained.
  • the constraint may be a key constraint or a table constraint.
  • a query written differently from FIG. 4 may also be used as long as the constraints (key constraints or table constraints) of all the reference tables of the relational database can be obtained.
  • the information schema provides access to the metadata of the database, namely the name of the database, tables, access rights, and so on.
  • the information schema introduced in MySQL 5.0 follows Chapter 11, Schema, of the ANSI / ISO SQL 2003 standard definition, and satisfies most of the Basic Information Schema, the core definition of the SQL 2003 standard.
  • access to the information schema is done through a commonly used SELECT statement.
  • For more information about the information schema see http://en.wikipedia.org/wiki/Information_schema.
  • the information schema is a virtual database.
  • the tables of information_schema are all view tables.
  • the constraint may be a key constraint or a table constraint.
  • the key constraint can be accessed by 'information_schema.KEY_COLUMN_USAGE' and the table constraint can be accessed by 'information_schema.TABLE_CONSTRAINTS'.
  • both key constraints and table constraints are accessed in the information schema.
  • the query is found using the constraint name CONSTRAINT_NAME as a key to find substantially the same key constraint and table constraint, and gathers the information obtained from the key constraint and the information obtained from the table constraint. Output as data.
  • CONSTRAINT_NAME (20) is a column indicating a constraint name ('information_schema.TABLE_CONSTRAINTS.CONSTRAINT_NAME' or 'information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME') obtained from a key constraint or a table constraint of the information schema.
  • CONSTRAINT_NAME 20 may be understood to correspond one-to-one to each foreign key.
  • TABLE_NAME (22) is a column that points to a table name ('information_schema.TABLE_CONSTRAINTS.TABLE_NAME' or 'information_schema.KEY_COLUMN_USAGE.TABLE_NAME') obtained from the key constraint or table constraint of the information schema.
  • TABLE_NAME (22) can be understood as a column indicating the name of a referencing table with a foreign key.
  • COLUMN_NAME 24 is a column indicating the column name ('information_schema.KEY_COLUMN_USAGE.COLUMN_NAME') obtained from the key constraint of the information schema.
  • COLUMN_NAME 24 may be understood as a column indicating the name of a column set as a foreign key among columns of the reference table.
  • REFERENCED_TABLE_NAME 26 is a column indicating the referenced table name ('information_schema.KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME') obtained from the key constraint of the information schema.
  • REFERENCED_COLUMN_NAME 28 is the referenced column name ('information_schema.KEY_COLUMN_USAGE.REFERENCED_COLUMN_NAME') obtained from the key constraint of the information schema.
  • PK_YN (30) is a column indicating whether COLUMN_NAME (24) is a primary key. That is, it indicates whether the foreign key COLUMN_NAME is also set as the primary key.
  • the data on the constraints output according to the input of the query may include identification information of a reference table, identification information of a column set as a foreign key in the reference table, identification information of a referenced table referenced by the foreign key,
  • the identification information of the referenced column referred to by the foreign key and a flag indicating whether the column set as the foreign key is a primary key may be understood as data including each column.
  • the query includes identification information of the reference table, identification information of a column set as a foreign key in the reference table, identification information of a referenced table by the foreign key, and a column referenced by the foreign key in the referenced table. It is preferable that the identification information and a flag indicating whether or not the foreign key is a primary key are included as a column, and each constraint is created such that it is row data.
  • the first row that is, the first constraint, means that COLUMN_A1, the foreign key of TABLE_A, refers to COLUMN_B1 of TABLE_B, and COLUMN_B1 of TABLE_B is the primary key. I can see that.
  • the output data is analyzed to determine a relationship type for each reference table (S200).
  • the relationship type is one of those shown in FIG. However, a 1: 1 relationship is considered to be the same as a 1: N relationship, and the relationship type may be one of a 1: N relationship, an M: N relationship, a parallel relationship, and a recursive relationship.
  • the reference table for determining the relationship type is determined by the reference table name described in the TABLE_NAME 22 column of the data for the constraint. For example, in the case of the data for the constraints shown in FIG. 5 (except for omitted), the reference table names (TABLE_NAME) for all three constraints (TABLE_A_ibfk_1, TABLE_A_ibfk_2, TABLE_D_ibfk_1) are TABLE_A, TABLE_D Therefore, you will need to determine the relationship type for TABLE_A and TABLE_D, respectively.
  • the relationship type of the reference table may be determined using the number of constraints of the reference table.
  • Using the number of constraints means that the number of constraints is included as a decision factor in determining the relationship type of the reference table, and that the relationship type of the reference table is determined depending on the number of constraints. no.
  • the referenced table does not have two or more constraints that are identical, the same as the currently referenced object. It is determined whether there is a constraint having a referenced table (S210). If there is a constraint having the same referenced table as the reference table currently being determined, the relationship type of the currently determined reference table is determined as a recursive relationship (S216). If there is no constraint having the same referenced table as the reference table currently being determined, the relationship type of the currently determined reference table is determined to be a 1: N relationship (S218).
  • the relationship type of the currently determined reference table is determined as a recursive relationship (S216). If the referenced table of the only constraint of the currently determined reference table is different from the currently determined reference table, the relationship type of the currently determined reference table is determined to be a 1: N relationship (S218).
  • the node creation table refers to the table produced by the nodes in the graph database. That is, each row of the node generation table is calculated as each node. For example, if there are 10 rows in a node generation table, a total of 10 nodes are generated in that node generation table. Row is a term widely used in the database field and has the same meaning as a record and a tuple.
  • a relation frame is a rule for generating a relation of a graph database.
  • the relation frame specifies what kind of nodes the relation should connect to. For example, you can specify that a relation between a node created from TABLE_A and a node created from TABLE_B should be created.
  • the relation frame can also specify which nodes should be connected. For example, a node X whose COLUMN_A0 value is 10 among the nodes created from TABLE_A and a node Y whose COLUMN_B3 value is 10 among the nodes created from TABLE_B can be specified to be connected to each other.
  • 'TB_EMAIL (SENDER_ID)? If you display a relation frame like 'TB_USER (USER_ID)', it connects the relation from the node created from the table named TB_EMAIL to the node created from the table named TB_USER, and the two nodes connected are the values of the SENDER_ID column and the USER_ID column, respectively. This may mean that the values of must be the same.
  • a rule according to the relationship type of the reference table is used.
  • a node generation table and a relation frame for the reference table are determined using the data of each column included in the data for the constraint in a manner according to a rule according to the relationship type of the reference table. This will be described in detail with reference to FIG. 7.
  • FIG. 7 is a diagram illustrating a table for explaining how a node and a relation are generated for each relationship type.
  • the node generation table is determined as the reference table and the referenced table of the reference table.
  • the relation frame is connected between the node of the reference table and the node of the referenced table, wherein the reference column (foreign key) data of the node of the reference table and the data of the referenced column of the referenced table match. Decide on connecting between nodes.
  • the directionality of the relation is from the reference table to the referenced table. However, this is only one example, and the directionality of the relation does not exist or may change according to a user's setting. Regarding setting the directionality of the relation will be further described with reference to FIGS. 17 to 19.
  • the node generation table determines the referenced table of the first constraint of the reference table and the referenced table of the second constraint of the reference table.
  • the relation frame connects a node of the referenced table of the first constraint of the reference table and a node of the referenced table of the second constraint of the reference table, but avoids the first constraint of the reference table. It is determined to connect between nodes where the data of the referenced column of the reference table and the data of the referenced column of the referenced table of the second constraint of the reference table match.
  • the M: N relationship may exist when two or more constraints exist (see FIG. 4). It can be established even when there are three or more of these.
  • the node generation table may include a referenced table of the first constraint of the reference table, a referenced table of the second constraint of the reference table, and a referenced table of the third constraint.
  • the relation frame may include a first relation connecting a node of a referenced table of a first constraint and a node of a referenced table of a second constraint, a node of a referenced table of a second constraint, and a third constraint.
  • the first relation is between nodes whose data of the referenced column of the referenced table of the first constraint of the reference table and the data of the referenced column of the referenced table of the second constraint of the reference table match.
  • the second relation is a node in which the data of the referenced column of the referenced table of the second constraint of the reference table and the data of the referenced column of the referenced table of the third constraint of the reference table match.
  • the third relation is equal to the data of the referenced column of the referenced table of the third constraint of the reference table and the data of the referenced column of the referenced table of the first constraint of the reference table. Connect between nodes.
  • the reference table When a generalized description is made for a reference table having a constraint and having an M: N relationship, the reference table includes a referenced table of a first constraint, a referenced table of a second constraint, ..., a constraint
  • Each referenced table of the condition is a node generation table, and has a relation frame including a relation of aC2 (number of two selected out of a sequence).
  • Steps S100 and S200 of FIG. 3 are performed with respect to a connection relationship between tables of the relational database shown in FIG. 8, and a node generation table and a relation frame are generated according to the description with reference to FIG. 7 for each reference table (medical and medical information).
  • a treatment table that is a reference table having an M: N relationship
  • it is not included as a node generation table due to its constraint.
  • the node generation table and the relation frame for the medical care table are preferably determined as shown in FIG. 10.
  • the node generation table of the reference table is the first constraint of the reference table.
  • first relation frame is a reference knife of the referenced table of the first constraint of the reference table.
  • the data of the column and the node in which the data of the reference column of the first constraint of the reference table match, and the second relation frame is the data of the referenced column of the referenced table of the second constraint of the reference table. And a node matching data of the reference column of the second constraint of the reference table.
  • the node generation table is determined as the reference table and the referenced table of the reference table
  • the relation frame includes a first relation frame and a second relation frame
  • the relation frame connects between a node of the referenced table of the reference table and a node of the reference table of the first constraint of the reference table
  • the second relation frame is a node of the referenced table of the reference table and the reference table.
  • the frame determines to connect between nodes in which the data of the referenced column of the referenced table of the reference table and the data of the primary key column of the reference table of the second constraint of the reference table match.
  • the node generation table is determined as the reference table, and the relation frame connects between the first node and the second node of the reference table, and includes the reference column of the first node ( Foreign data) and the data of the primary key column of the second node are determined to connect.
  • FIG. 11 is a diagram showing a relationship between tables of a relational database to be migrated to a graph database according to embodiments of the present invention
  • FIGS. 12A to 12F are rows inputted to tables displayed in the diagram shown in FIG. Figures show the data.
  • the database migration method according to the present embodiment converts the relational database shown in FIGS. 11 to 12F into a graph database.
  • the reference table has a total of five TB_EMAIL, TB_EMAIL_FILE, TB_EMAIL_RECIPIENT, TB_GROUP, and TB_GROUP_USER, and the total number of constraints is eight.
  • TB_EMAIL_ibfk_1 The number of constraints of TB_EMAIL is one (TB_EMAIL_ibfk_1). Also, another table TB_USER is referenced (REFERENCED_TABLE_NAME). Therefore, TB_EMAIL is determined to have a 1: N relationship with TB_USER.
  • TB_EMAIL_FILE has an M: N relationship with TB_EMAIL and TB_FILE.
  • TB_GROUP_ibfk_1 The number of constraints of TB_GROUP is one (TB_GROUP_ibfk_1). He is also referring to himself (REFERENCED_TABLE_NAME). Thus, TB_GROUP is determined to have a recursive relationship with itself.
  • TB_GROUP_USER has an M: N relationship with TB_GROUP and TB_USER.
  • the node creation table is TB_USER, which is a referenced table
  • TB_EMAIL which is a reference table
  • a connection frame is made between a node of TB_EMAIL and a node of TB_USER, but a connection between a node in which data of the SENDER_ID column, which is a column designated as a foreign key of TB_EMAIL, and data of a column of USER_ID, which is a referenced column of TB_USER, match. .
  • the node generation table is TB_EMAIL, which is a reference table (REFERENCED_TABLE_NAME) of the first constraint TB_EMAIL_FILE_ibfk_1, and TB_FILE, which is a reference table (REFERENCED_TABLE_NAME), of the second constraint TB_EMAIL_FILE_ibfk_1.
  • a relation is connected between the referenced table TB_EMAIL of the first constraint and the referenced table TB_FILE of the second constraint, and the data of the referenced column EMAIL_ID of the referenced table of the first constraint is A relation frame is such that data of the referenced column FILE_ID of the referenced table of the second constraint is connected between the same nodes.
  • the other two tables (TB_EMAIL_RECIPIENT, TB_GROUP_USER) having the M: N relationship type are also determined in the same manner as the node creation table and the relation frame.
  • TB_GROUP For TB_GROUP with a recursive relationship type, its own TB_GROUP is the node creation table.
  • the relation template is a connection between nodes of TB_GROUP, but the nodes of which the data of the PARENT_GROUP_ID column, which is the reference column of TB_GROUP, and the data of the GROUP_ID column, which is the primary key of TB_GROUP match.
  • the node generation table is collected to generate a node list
  • the relation frame is collected to generate a relation list.
  • the node list is a list of tables containing data to be computed as a node of the graph database
  • the relation list is a generation rule of relations to be calculated as a relation of the graph database (which must be connected between nodes generated from a table). Is a list of which nodes should be connected based on the column values of each node.
  • FIG. 15 is a node list and a relation list reflecting FIG. 14.
  • FIG. 16 is a diagram illustrating a state in which data of a relational database displayed through FIGS. 11 to 12F is migrated to a graph database.
  • FIG. 16 The reason for generating all of the nodes and relations shown in FIG. 16 will be described.
  • the node generation tables included in the node list in the case of TB_USER, there are a total of 12 rows according to FIG. 12A. Therefore, it can be seen in FIG. 16 that 12 nodes are generated from TB_USER.
  • FIG. 15 there are three relations that connect a node created from TB_USER to another node.
  • a node generated from TB_USER and a node generated from TB_EMAIL are connected (Relation Label: SEND)
  • a node generated from TB_EMAIL and a node generated from TB_USER are connected (Relation Label: RECEIVE)
  • a node generated from TB_GROUP The node created from TB_USER is connected.
  • the 'Jungeunji' node created from the TB_USER table is connected to the 'Apink' node created from TB_GROUP, and the 'first congratulation' node created from the TB_EMAIL table. It's easy to see that Jung Eun-ji belongs to the A-Pink group and sent a message of congratulations to # 1. If the data is managed using the existing relational database, SELECT query must be executed to find the group to which 'Jungeunji' belongs, and SELECT query must be executed to find the mail sent by 'Jungeunji' user. As such, using a graph database, the amount of computation for grasping the correlation between data is reduced compared to the existing relational database.
  • Steps S100 to S500 of FIG. 17 are the same as those shown in FIG. 3.
  • a UI User Interface
  • FIG. 18 is an example of a node property and label setting UI that can be provided by a user. As shown in FIG. 18, the user may select which of the columns of the specific table to use as a property of a node generated from the specific table. In addition, the user may input a label name of a node generated from a specific table.
  • a property and a label to be included in a relation generated by each relation frame included in the relation list may be input, and a user UI may be provided for specifying a direction of the relation (S600). According to an embodiment, only one of the two user UIs may be provided.
  • FIG. 19 is an example of a relation property and a label setting UI that can be provided by a user. As shown in FIG. 19, a user may input a direction of a relation and a label of a relation for a specific relation frame. In addition, the user may select a source table to provide a property of a relation, and select at least a part of columns of the source table as a property of the relation.
  • the source table may be basically set as a reference table when the relation frame is generated.
  • FIG. 17 illustrates that a step S600 of providing a user UI is performed after execution of step S500, but according to an embodiment, the property and label of a node and a relation are determined by providing a user UI (S600). Thereafter, step S500 may be executed.
  • property information and label information according to the property and label setting items are additionally recorded in the node data and the relation data of the graph database (S700).
  • the database migration method according to the embodiments of the present invention described above with reference to FIGS. 1 to 19 may be implemented as computer readable codes on a computer readable medium.
  • the computer-readable medium may be, for example, a removable recording medium (CD, DVD, Blu-ray disc, USB storage device, removable hard disk) or a fixed recording medium (ROM, RAM, computer equipped hard disk).
  • the computer program recorded in the computer-readable recording medium may be transmitted to another computing device and installed in the other computing device through a network such as the Internet, thereby being used in the other computing device.
  • a computer program for performing each step of the database migration method according to the embodiments of the present invention described above with reference to FIGS. 1 to 19 may be provided.
  • the computer program may be executed in combination with a computer, a smartphone, or a device equipped with computing means, and may be recorded on a computer-readable medium.
  • the database migration system includes a relational DB server 200, a graph DB server 300, and a database conversion device 100.
  • the database conversion apparatus 100 receives data of a source database from the relational DB server 200, generates a node for the graph database and relation data using the provided data, and provides the data to the graph DB server 300. .
  • the graph DB server 300 may be implemented in a server providing a social network service or connected to a server providing the social network service.
  • the database conversion apparatus 100 collects the constraints of a referencing table having a column set as a foreign key among the tables of the relational database that is the migration source database, and the constraints of each reference table have. Determine a relationship type of each of the reference tables from a condition, determine a node generation table and a relation frame for the reference table based on the relationship type of the reference table, and determine a node generation table and a relation corresponding to each of the reference tables Generate a node list and a relation list by collecting frames, and converting data of each row of the node generation table included in the node list into nodes of the graph database, generating all nodes included in the node list. Iterate over the table, To the generation of a relation graph of the database according to each frame included in the group relation relation list is repeated for all the relations included in the relation frame list.
  • the apparatus for migrating a database includes a constraint query unit 104, a relationship type determiner 106, a node and relation determiner 108, a graph DB generator 112,
  • the communication unit 102 may be included.
  • the communication unit 102 relays the connection between the database migration apparatus 100 and the network.
  • the constraint inquiry unit 104 collects constraints of a referencing table having a column set as a foreign key among tables of a relational database that is a migration source database.
  • the relationship type determination unit 106 determines the relationship type of each of the reference tables from the constraints of the respective reference tables.
  • the node and relation determination unit 108 determines a node generation table and a relation frame for the reference table based on the relationship type of the reference table.
  • the graph DB generator 112 converts data of each row of the node generation table into a node of a graph database which is a migration target database, and connects the generated nodes according to the relation frame. Create a relation.
  • the graph DB generator 112 generates a node list and a relation list by collecting the node generation table and the relation frame corresponding to each of the reference tables, and generates each node of the node generation table included in the node list. Converting the row data into nodes of the graph database is repeated for all node generation tables included in the node list, and generating relations of the graph database according to each relation frame included in the relation list. It may be repeated for all relation frames included in the relation list.
  • the database migration apparatus 100 may further include a label and property setting unit 110.
  • the label and property setting unit 110 may provide a UI as illustrated in FIG. 18 or 19 to a user terminal (not shown) through the communication unit 102. That is, the label and property setting unit 110 selects a property to be included in a node generated for each node generation table included in the node list from among columns of the node generation table, and generates each node included in the node list. A user UI for inputting a label of a node generated for the table may be provided.
  • the label and property setting unit 110 may input a property and a label to be included in a relation generated by each relation frame included in the relation list, and provide a user UI for specifying a direction of the relation.
  • the label and property setting unit 110 may be deactivated or not provided in the database migration apparatus 100.
  • the node and relation determination unit 108 sets properties and labels of each node and relation to default values based on preset criteria.
  • the database migration apparatus 100 includes a system bus 150, a processor 151, a memory (for example, random access memory) 152, a storage 153, and a network for communication with an external device. It may include an interface 154.
  • Computer program code for implementing a database migration method according to embodiments of the present invention described with reference to FIGS. 1 through 19 may be stored in storage 153, loaded into memory 152, and executed by processor 151. have.

Landscapes

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

Abstract

관계형 데이터베이스로부터 그래프 데이터베이스로의 자동화된 마이그레이션 방법이 제공 된다. 본 발명의 일 실시예에 따른 데이터베이스 마이그레이션 방법은, 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 단계와, 각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 단계와, 상기 데이터베이스 마이그레이션 장치가, 상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계와, 상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계를 포함한다.

Description

데이터베이스 마이그레이션 방법 및 그 장치
본 발명은 데이터베이스 마이그레이션 방법 및 그 장치에 관한 것이다. 보다 자세하게는, 관계형 데이터베이스(relational database)를 그래프 데이터베이스(graph database)로 마이그레이션 하는 방법 및 그 장치에 관한 것이다.
데이터베이스 마이그레이션은 제1 형식의 데이터베이스에 기록된 데이터를 제2 형식의 데이터베이스에 기록하기 위한 작업을 의미한다.
관계형 데이터베이스는 일련의 정형화된 테이블로 구성된 데이터 항목들의 집합체로서, 그 데이터들은 데이터베이스 테이블을 재구성하지 않더라도 다양한 방법으로 접근하거나 조합될 수 있다. 기존의 많은 데이터는 관계형 데이터베이스를 통하여 관리되고 있다.
그래프 데이터베이스는 엔티티(entity)와 엔티티 사이의 관계(relation)를 정의하는 방식으로 데이터를 관리한다. 소셜 네트워크 서비스를 위한 데이터처럼 데이터들 간의 연관정보를 빠르게 검색할 수 있는 그래프 데이터베이스에 대한 관심이 높아 지고 있다. 그래프 데이터베이스를 이용하면 기존 관계형 데이터베이스에서는 테이블들 간의 여러 번의 조인을 통해야만 검색이 가능했던 문제를 쉽게 해결할 수 있는 점이 널리 알려져 있다.
이렇게 데이터간의 연관관계 검색 등과 유사한 요구사항을 갖고 있는 서비스의 경우 좀더 쉽고 빠르게 데이터 탐색이 가능하도록 기존의 관계형 데이터베이스에 저장되어 있는 데이터를 그래프 데이터베이스로 옮길 필요가 제기된다. 그러나, 관계형 데이터베이스로부터 그래프 데이터베이스로의 자동화된 마이그레이션 기술은 아직 제공되고 있지 않다.
본 발명이 해결하고자 하는 기술적 과제는 관계형 데이터베이스로부터 그래프 데이터베이스로의 자동화된 마이그레이션 방법 및 그 장치를 제공하는 것이다.
본 발명의 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당업자에게 명확하게 이해 될 수 있을 것이다.
상기 기술적 과제를 달성하기 위한 본 발명의 일 실시예에 따른 데이터베이스 마이그레이션 방법은, 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 단계와, 상기 데이터베이스 마이그레이션 장치가, 각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 단계와, 상기 데이터베이스 마이그레이션 장치가, 상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계와, 상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계를 포함할 수 있다.
일 실시예에서, 상기 참조 테이블 각각의 관계 타입을 결정하는 단계는, 각각의 참조 테이블이 가지는 제약조건의 개수를 이용하여 상기 참조 테이블 각각의 관계 타입을 결정하는 단계를 포함한다.
일 실시예에서, 상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계는, 각각의 상기 참조 테이블에 대응하는 노드 생성 테이블 및 릴레이션 프레임을 취합하여 노드 리스트 및 릴레이션 리스트를 생성하는 단계와, 상기 노드 리스트에 포함된 노드 생성 테이블의 각 행(row)의 데이터를 상기 그래프 데이터베이스의 노드로 변환하는 것을, 상기 노드 리스트에 포함된 모든 노드 생성 테이블에 대하여 반복하는 단계와, 상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 따라 상기 그래프 데이터베이스의 릴레이션을 생성하는 것을, 상기 릴레이션 리스트에 포함된 모든 릴레이션 프레임에 대하여 반복하는 단계를 포함한다.
일 실시예에서, 상기 제약조건을 취합하는 단계는, 인포메이션 스키마(information_schema)로부터, 상기 관계형 데이터베이스의 모든 참조 테이블의 상기 제약조건에 대한 데이터를 얻기 위한 쿼리(query)를 상기 관계형 데이터베이스의 DBMS(Database Management System)에 입력하는 단계와, 상기 쿼리에 대한 응답으로 상기 제약조건에 대한 데이터를 얻는 단계를 포함한다.
일 실시예에서, 상기 관계 타입을 결정하는 단계는, 관계 타입의 결정 대상인 상기 참조 테이블이 가지는 제약조건의 개수가 2개 이상인 경우, 상기 참조 테이블이 가지는 제약조건 중 기본 키(primary key)로 설정된 제약조건의 개수가 2개 이상이면, 상기 참조 테이블의 관계 타입을 M:N 관계로 결정하는 단계를 포함한다.
일 실시예에서, 상기 관계 타입을 결정하는 단계는, 관계 타입의 결정 대상인 상기 참조 테이블이 가지는 제약조건의 개수가 2개 이상인 경우, 상기 참조 테이블이 가지는 제약조건 중 기본 키(primary key)로 설정된 제약조건의 개수가 2개 미만이면, 상기 참조 테이블이 가지는 제약조건 중 피참조 테이블이 동일한 제약조건이 2개 이상 존재하는지 판정하는 단계를 포함한다.
일 실시예에서, 상기 관계 타입을 결정하는 단계는, 관계 타입의 결정 대상인 상기 참조 테이블이 가지는 제약조건의 개수가 1개뿐인 경우, 상기 참조 테이블의 관계 타입을 1:N 관계 및 재귀 관계 중 하나로 결정하는 단계를 포함한다.
일 실시예에서, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는, 상기 참조 테이블의 관계 타입이 1:N 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블 및 상기 참조 테이블의 피참조 테이블로 결정하고, 상기 릴레이션 프레임은 상기 참조 테이블의 노드와 상기 피참조 테이블의 노드 사이를 연결하되, 상기 참조 테이블의 노드의 외래 키로 지정된 칼럼의 데이터와 상기 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함한다.
일 실시예에서, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는, 상기 참조 테이블의 관계 타입이 M:N 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블의 제1 제약조건의 피참조 테이블 및 상기 참조 테이블의 제2 제약조건의 피참조 테이블로 결정하고, 상기 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 노드 사이를 연결하되, 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함한다.
일 실시예에서, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는, 상기 참조 테이블의 관계 타입이 M:N 관계이면서, 상기 참조 테이블을 참조 하는 다른 참조 테이블이 존재하며, 상기 다른 참조 테이블의 관계 타입이 1:N 관계인 경우, 상기 참조 테이블의 상기 노드 생성 테이블은, 상기 참조 테이블의 제1 제약조건의 피참조 테이블, 상기 참조 테이블의 제2 제약조건의 피참조 테이블 및 상기 참조 테이블으로 결정하고, 상기 릴레이션 프레임은 제1 릴레이션 프레임 및 제2 릴레이션 프레임을 포함하고, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 노드 사이를 연결하되, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 참조 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함한다.
일 실시예에서, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는, 상기 참조 테이블의 관계 타입이 병렬 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블 및 상기 참조 테이블의 피참조 테이블으로 결정하고, 상기 릴레이션 프레임은 제1 릴레이션 프레임 및 제2 릴레이션 프레임을 포함하되, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 노드와 상기 참조 테이블의 제1 제약조건의 참조 테이블의 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 노드와 상기 참조 테이블의 제2 제약조건의 참조 테이블의 노드 사이를 연결하는 것이며, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 참조 테이블의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 참조 테이블의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함한다.
일 실시예에서, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는, 상기 참조 테이블의 관계 타입이 재귀 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블로 결정하고, 상기 릴레이션 프레임은 상기 참조 테이블의 제1 노드와 제2 노드 사이를 연결하되, 상기 제1 노드의 외래 키로 지정된 칼럼의 데이터와 상기 제2 노드의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함한다.
본 발명의 다른 실시예에 따른 데이터베이스 마이그레이션 장치는 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 제약조건 조회부와, 각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 관계 타입 결정부와, 상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 노드 및 릴레이션 결정부와, 및 상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 그래프 DB 생성부를 포함한다.
본 발명의 또 다른 실시예에 따른 컴퓨터 프로그램은, 컴퓨터 장치와 결합되어, 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 단계와, 각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 단계와, 상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계와, 상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계를 실행시키기 위하여 매체에 저장된 것이다.
본 명세서에서 제시되는 본 발명의 실시예들은, 관계형 데이터베이스에 기록된 데이터를 자동화된 방식으로 그래프 데이터베이스로 마이그레이션 할 수 있도록 한다. 자동화된 방식으로 마이그레이션을 수행한다는 것은, 일련의 연산들을 수행하는 로직(logic)이 소스 데이터베이스인 관계형 데이터베이스의 각 테이블 간 연결 관계를 파악하고, 상기 연결 관계에 의할 때 그래프 데이터베이스의 노드로 생성되어야 하는 노드 생성 테이블을 자동으로 선정하며, 상기 연결 관계를 고려하여 그래프 데이터베이스의 노드 간에 릴레이션(relation)을 자동으로 생성한다는 것을 의미한다.
따라서, 관계형 데이터베이스로부터 그래프 데이터베이스로의 마이그레이션을 위한 인력 투입이 전혀 필요 없거나, 기존의 인력 투입량에 비하여 인력 투입량을 대폭 감소시킬 수 있다.
도 1은 그래프 데이터베이스의 개념도이다.
도 2는 관계형 데이터베이스에서 엔티티(entity) 간의 5가지 관계 타입을 나타내는 도면이다.
도 3은 본 발명의 일 실시예에 따른 데이터베이스 마이그레이션 방법의 순서도이다.
도 4는 도 3의 일부 동작에서 제약조건(constraint)을 얻기 위하여 입력되는 쿼리의 일 예이다.
도 5는 도 4에 도시된 쿼리의 입력 결과로 출력되는 데이터의 일 예이다.
도 6은 도 3의 일부 동작을 상세히 설명하기 위한 순서도이다.
도 7은 관계 타입 별로 노드 및 릴레이션(relation)이 어떻게 생성되는지 설명하기 위한 표를 도시하는 도면이다.
도 8 내지 도 10은 일부 관계 타입에서 도 7에 도시된 노드 및 릴레이션 생성 방법에 대한 예외 처리를 적용하는 실시예를 설명하기 위한 도면들이다.
도 11은 본 발명의 실시예들에 따라 그래프 데이터베이스로 마이그레이션 할 관계형 데이터베이스의 테이블 간 관계를 나타내는 다이어그램이다.
도 12a 내지 도 12f는 도 11에 도시된 다이어그램에 표시된 테이블들에 입력된 행(row) 데이터들을 표시한 도면들이다.
도 13은 도 11 내지 도 12f를 통해 표시된 관계형 데이터베이스에, 제약조건을 얻기 위한 쿼리를 입력한 결과로 출력 되는 데이터의 일 예이다.
도 14는 도 13에서 도출 된 참조 테이블(referencing table) 각각에 대하여 관계 타입, 노드 생성 테이블 및 릴레이션 프레임이 표시된 표를 도시하는 도면이다.
도 15는 도 14에 표시된 각 참조 테이블 별 노드 생성 테이블과 릴레이션 프레임을 취합하여 생성된 노드 리스트 및 릴레이션 리스트를 표시하는 도면이다.
도 16은 도 11 내지 도 12f를 통해 표시된 관계형 데이터베이스의 데이터가 그래프 데이터베이스로 마이그레이션 된 모습을 도시한 도면이다.
도 17은 본 발명의 다른 실시예에 따른 데이터베이스 마이그레이션 방법의 순서도이다.
도 18은 도 17의 순서도에 표시된 일부 동작에 따라 사용자가 제공 받을 수 있는 노드 프로퍼티 및 라벨 설정 UI의 일 예이다.
도 19는 도 17의 순서도에 표시된 일부 동작에 따라 사용자가 제공 받을 수 있는 릴레이션 프로퍼티 및 라벨 설정 UI의 일 예이다.
도 20은 본 발명의 또 다른 실시예에 따른 데이터베이스 마이그레이션 시스템의 구성도이다.
도 21은 본 발명의 또 다른 실시예에 따른 데이터베이스 마이그레이션 장치의 블록 구성도이다.
도 22는 본 발명의 또 다른 실시예에 따른 데이터베이스 마이그레이션 장치의 하드웨어 구성도이다.
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명한다. 본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시 예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 게시되는 실시 예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시 예들은 본 발명의 게시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.
다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.
본 발명의 실시예들을 설명하기 전에, 그래프 데이터베이스 및 관계형 데이터베이스에서의 엔티티(entity) 간 관계 타입에 대하여 먼저 설명한다.
도 1은 그래프 데이터베이스의 개념도이다. 도 1에 도시된 바와 같이, 그래프 데이터베이스는 그래프의 개념을 차용하여 데이터를 가리키는 노드 및 데이터 간의 관계를 나타내는 릴레이션(relation)으로 구성된다. 하나의 노드는 관계형 데이터베이스에서 각 테이블의 각 행(row)을 의미한다. 하나의 노드에 담겨진 데이터는 프로퍼티(property)로 표현한다. 예를 들어, 도 1의 좌측에 표시된 노드의 프로퍼티는 Id, Name, Age이다. 또한, 노드는 라벨을 가질 수도 있다. 상기 릴레이션은 노드 간을 연결하는데, 연결의 방향성을 가질 수 있다. 노드와 마찬가지로 상기 릴레이션도 프로퍼티를 가질 수 있다.
도 2는 관계형 데이터베이스에서 엔티티(entity) 간의 5가지 관계 타입을 나타내는 도면이다. 도 2에 표시된 엔티티는 관계형 데이터베이스의 테이블과 동일한 개념으로 이해될 수 있다. 관계형 데이터베이스에서 엔티티 간의 관계는 도 2에 도시된 것과 같이 5가지로 구분할 수 있다. 이하, 5가지의 관계 타입을 설명한다.
1:1 관계는 테이블 A와 테이블 B가 동일한 칼럼을 기본 키(Primary Key)로 가지는 관계를 의미한다. 예를 들어, 테이블 A는 사용자 기본 정보이고, 테이블 B는 사용자 추가 정보인 경우 테이블 A와 테이블 B는 1:1 관계이다.
1:N 관계는 테이블 A의 기본 키를 테이블 B가 외래 키(Foreign Key)로 참조하는 관계를 의미한다. 예를 들어, 테이블 A는 부서 정보이고, 테이블 B는 사원 정보인 경우, 테이블 A와 테이블 B는 1:N 관계이다.
M:N 관계는 테이블 A와 테이블 B 각각의 기본 키를 모두 참조하는 중간 관계 정의용 테이블을 통하여 테이블 A와 테이블 B가 연결되는 관계를 의미한다. 예를 들어, 테이블 A는 제품 정보이고, 테이블 B가 고객 정보이며, 테이블 C가 주문 정보인 경우, 테이블 A와 테이블 B는 M:N 관계이다.
병렬 관계는 테이블 A의 기본 키를 테이블 B의 두개 이상 칼럼에서 외래 키로 참조하는 관계를 의미한다. 예를 들어, 테이블 A가 지점 관리 데이터이고, 테이블 B가 계좌 관리 데이터이며, 테이블 A의 기본 키(예를 들어, 지점 ID)를 참조 하는 두 개의 외래 키, 개설 지점 코드와 관리 지점 코드가 테이블 B에 있다면, 테이블 A와 테이블 B는 병렬 관계이다.
재귀 관계는 테이블 A의 기본 키를 테이블 A의 칼럼에서 외래 키로 참조하는 관계를 의미한다. 예를 들어, 테이블 A가 사원 데이터이고, 테이블 A의 칼럼이 사원 번호 및 관리자 사원 번호이며, 관리자 사원 번호 칼럼이 사원 번호를 참조하는 외래 키라면, 테이블 A는 재귀 관계에 있다.
이하, 도 3을 참조하여 본 발명의 일 실시예에 따른 데이터베이스 마이그레이션 방법을 설명한다. 본 실시예는 연산 수단을 구비한 컴퓨팅 장치에 의하여 수행 될 수 있다. 상기 컴퓨팅 장치는, 예를 들어 본 발명의 다른 실시예에 따른 데이터베이스 마이그레이션 장치일 수 있다. 상기 데이터베이스 마이그레이션 장치의 구성 및 동작에 대하여는 추후 자세히 설명한다. 이하, 설명의 편의를 위하여, 본 실시예에 따른 데이터베이스 마이그레이션 방법의 각 동작을 실시하는 주체는 그 기재를 생략한다.
먼저, 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합한다. 일 실시예에서, 상기 취합을 위해, 상기 관계형 데이터베이스의 모든 상기 참조 테이블의 제약조건을 얻기 위한 쿼리가 생성되고, 상기 쿼리가 상기 관계형 데이터베이스의 DBMS(Database Management System)에 입력되는 동작이 수행 될 수 있다(S100).
일 실시예에 따르면, 상기 쿼리에 의하여 관계형 데이터베이스의 테이블 중 외래 키로 설정된 칼럼을 가지는 모든 참조 테이블의 제약조건이 취합되고, 상기 취합된 제약조건을 이용하여 마이그레이션이 수행될 수 있다.
다른 실시예에 따르면, 상기 쿼리에 의하여 관계형 데이터베이스의 테이블 중 외래 키로 설정된 칼럼을 가지는 일부 참조 테이블의 제약조건이 취합되고, 상기 취합된 제약조건을 이용하여 마이그레이션이 수행될 수 있다. 즉, 사용자의 설정 등에 따라, 상기 관계형 데이터베이스의 테이블 중, 마이그레이션 작업에 반영할 필요가 없는 테이블은 미리 제약조건의 취합 대상에서 제외 될 수도 있다.
도 4는 도 3의 상기 쿼리의 일 예이다. 도 4에 도시된 바와 같이, 상기 쿼리는 인포메이션 스키마(information_schema)(10)로부터 상기 참조 테이블의 제약조건을 얻기 위한 구문들을 포함한다. 도 4의 쿼리를 관계형 데이터베이스의 DBMS에 입력하면 도 5에 도시된 것과 같은 제약조건에 대한 뷰 테이블을 얻을 수 있다. 상기 제약조건은 키 제약조건(key constraint)이거나, 테이블 제약조건(table constraint)일 수 있다.
본 발명의 다른 실시예에 따르면, 관계형 데이터베이스의 모든 상기 참조 테이블의 제약조건(키 제약조건 또는 테이블 제약조건)을 얻을 수만 있다면, 도 4와 다르게 작성 된 쿼리도 사용될 수 있음은 물론이다.
인포메이션 스키마는 데이터베이스의 메타데이터, 즉 데이터베이스, 테이블의 이름, 접속권한 등에 대한 접근을 제공한다. MySQL 5.0에 도입된 인포메이션 스키마는 ANSI/ISO SQL 2003 표준 정의의 11챕터 ‘Schemata’를 따르고 있으며 SQL 2003 표준의 핵심 정의인 ‘Basic Information Schema’를 대부분 만족시킨다. MySQL 5.0에서 인포메이션 스키마에 대한 접근은 일반적으로 사용하는 SELECT문을 통해 이뤄진다. 인포메이션 스키마에 대한 보다 자세한 정보는(http://en.wikipedia.org/wiki/Information_schema)를 참조한다. 인포메이션 스키마는 가상의 데이터 베이스로, information_schema의 테이블들은 모두 뷰 테이블(view table)들이다.
상기 제약조건은 키 제약조건(key constraint)이거나, 테이블 제약조건(table constraint)일 수 있다. 인포메이션 스키마에서는 'information_schema.KEY_COLUMN_USAGE'에 의하여 상기 키 제약조건을 억세스 할 수 있고, 'information_schema.TABLE_CONSTRAINTS'에 의하여 상기 테이블 제약조건을 억세스 할 수 있다.
도 4에 도시된 쿼리에서는 인포메이션 스키마에서 키 제약조건 및 테이블 제약조건을 모두 억세스 하고 있다. 도 4에 도시된 쿼리에서는 제약조건 명(CONSTRAINT_NAME)을 키로 하여 실질적으로 동일한 키 제약조건 및 테이블 제약조건을 찾고, 키 제약조건에서 얻은 정보 및 테이블 제약조건에서 얻은 정보를 취합하여 상기 쿼리에 대한 응답 데이터로 출력한다.
도 4의 쿼리를 입력하면 도 5에 도시된 칼럼을 가지는 데이터가 출력된다. 출력된 데이터는 CONSTRAINT_NAME(20), TABLE_NAME(22), COLUMN_NAME(24), REFERENCED_TABLE_NAME(26), REFERENCED_COLUMN_NAME(28), PK_YN(30)의 총 6개 칼럼을 가진다. 도 5에 도시된 테이블(관계형 데이터베이스 상의 실제 테이블은 아님)의 각 행(row)이 각각의 제약조건을 의미한다.
CONSTRAINT_NAME(20)은 인포메이션 스키마의 키 제약조건 또는 테이블 제약조건에서 얻은 제약조건명('information_schema.TABLE_CONSTRAINTS.CONSTRAINT_NAME' 또는 ' information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME')을 가리키는 칼럼이다. CONSTRAINT_NAME(20)은 각 외래 키에 일대일 대응하는 것으로 이해 될 수 있다.
TABLE_NAME(22)은 인포메이션 스키마의 키 제약조건 또는 테이블 제약조건에서 얻은 테이블명('information_schema.TABLE_CONSTRAINTS.TABLE_NAME' 또는 ' information_schema.KEY_COLUMN_USAGE.TABLE_NAME')을 가리키는 칼럼이다. TABLE_NAME(22)은 외래 키를 가지는 참조 테이블(referencing table)의 이름을 가리키는 칼럼으로 이해될 수 있다.
COLUMN_NAME(24)은 인포메이션 스키마의 키 제약조건에서 얻은 칼럼명(' information_schema.KEY_COLUMN_USAGE.COLUMN_NAME')을 가리키는 칼럼이다. COLUMN_NAME(24)은 참조 테이블의 칼럼 중 외래 키로 설정된 칼럼의 명칭을 가리키는 칼럼으로 이해될 수 있다.
REFERENCED_TABLE_NAME(26)은 인포메이션 스키마의 키 제약조건에서 얻은 피참조 테이블명(' information_schema.KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME')을 가리키는 칼럼이다. REFERENCED_TABLE_NAME(26)은 COLUMN_NAME(24)에 기재된 칼럼(=외래 키)에 의하여 참조되는, 피참조 테이블의 명칭을 가리키는 칼럼으로 이해 될 수 있다.
REFERENCED_COLUMN_NAME(28)은 인포메이션 스키마의 키 제약조건에서 얻은 피참조 칼럼명(' information_schema.KEY_COLUMN_USAGE.REFERENCED_COLUMN_NAME')이다. REFERENCED_COLUMN_NAME(28)은 COLUMN_NAME(24)에 기재된 칼럼(=외래 키)에 의하여 참조되는, 피참조 테이블의 피참조 칼럼의 명칭을 가리키는 칼럼으로 이해 될 수 있다.
PK_YN(30)는 COLUMN_NAME(24)이 기본 키인지 여부를 가리키는 칼럼이다. 즉, 외래 키인 COLUMN_NAME이 기본 키로도 설정 되어 있는지 여부를 가리킨다.
정리하면, 상기 쿼리의 입력에 따라 출력되는 제약조건에 대한 데이터는, 참조 테이블의 식별 정보, 상기 참조 테이블에서 외래 키로 설정된 칼럼의 식별 정보, 상기 외래 키에 의하여 참조 된 피참조 테이블의 식별 정보, 상기 외래 키에 의하여 참조된 피참조 칼럼의 식별 정보 및 상기 외래 키로 설정 된 칼럼이 기본 키(Primary Key)인지 여부를 가리키는 플래그를 각각 칼럼으로 포함하는 데이터로 이해할 수 있다.
다시 말하면, 상기 쿼리는 상기 참조 테이블의 식별 정보, 상기 참조 테이블에서 외래 키로 설정된 칼럼의 식별 정보, 상기 외래 키에 의하여 피참조 테이블의 식별 정보, 상기 피참조 테이블에서 상기 외래 키에 의하여 참조된 칼럼의 식별 정보 및 상기 외래 키가 기본 키(Primary Key)인지 여부를 가리키는 플래그가 칼럼으로서 포함되고, 각 제약조건이 행(row) 데이터가 되도록 작성되는 것이 바람직하다.
도 5에 도시된 제약조건에 대한 데이터에서, 첫 번째 행(row), 즉 첫 번째 제약조건은, 'TABLE_A의 외래 키인 COLUMN_A1이 TABLE_B의 COLUMN_B1을 참조하고 있으며, TABLE_B의 COLUMN_B1은 기본 키임'을 의미하는 것을 알 수 있다.
다시 도 1으로 돌아와서 다음 동작을 설명한다. 상기 쿼리를 입력(S100) 한 결과 제약조건에 대한 데이터가 출력하면, 출력된 데이터를 분석하여 각 참조 테이블에 대하여 관계 타입을 결정한다(S200). 상기 관계 타입은 도 2에 도시된 것 중에 하나이다. 다만, 1:1 관계는 1:N 관계와 동일한 것으로 간주하여, 관계 타입은 1:N 관계, M:N 관계, 병렬 관계, 재귀 관계 중 하나가 될 것이다.
관계 타입을 결정해줄 참조 테이블은, 상기 제약조건에 대한 데이터의 TABLE_NAME(22) 칼럼에 기재된 참조 테이블 명에 의하여 결정한다. 예를 들어, 도 5에 도시된 제약조건에 대한 데이터의 경우(생략된 부분은 제외하고 판단), 총 3개의 제약조건(TABLE_A_ibfk_1, TABLE_A_ibfk_2, TABLE_D_ibfk_1)에 대한 참조 테이블 명(TABLE_NAME)이 TABLE_A, TABLE_D이므로, TABLE_A와 TABLE_D에 대하여 각각 관계 타입을 결정해야 할 것이다.
일 실시예에 따르면, 참조 테이블의 관계 타입은 상기 참조 테이블의 제약조건의 개수를 이용하여 결정될 수 있다. '제약조건의 개수를 이용'한다는 것은, 참조 테이블의 관계 타입 결정 과정에 제약조건이 몇 개인지가 하나의 판단 요소로 포함된다는 것이지, 참조 테이블의 관계 타입이 제약조건의 개수에 종속적으로 결정되는 것은 아니다.
이하, 도 6을 참조하여, 쿼리 결과 출력된 제약조건에 대한 데이터를 이용하여, 어떻게 각 참조 테이블의 관계 타입을 결정하는지 설명한다.
이미 설명한대로, 쿼리 결과 출력된 제약조건에 대한 데이터가 획득되면(S202), 현재 판단 대상인 참조 테이블에 몇 개의 제약조건이 존재하는지 판단한다(S204). 이후의 판단 과정은, 참조 테이블에 2개 이상의 제약조건이 존재하는 경우와, 1개의 제약조건만 존재하는 경우로 나뉜다.
현재 판단 대상인 참조 테이블에 2개 이상의 제약조건이 존재하는 경우, 상기 참조 테이블에, 기본 키로 지정 된 제약조건이 2개 이상 존재하는지 여부를 판단한다. 즉, 상기 참조 테이블의 제약조건들 중 PK_YN 칼럼(30)의 값이 'Y'인 것이 2개 이상인지 여부를 판단한다(S206). 다시 말하면, 참조 테이블에 기본 키로 지정 된 외래 키가 2개 이상 존재하는지 여부를 판단한다. 상기 참조 테이블에, 기본 키로 지정 된 외래 키가 2개 이상 존재하면, 현재 판단 대상인 참조 테이블의 관계 타입은 M:N 관계인 것으로 결정된다(S212).
현재 판단 대상인 참조 테이블에 2개 이상의 제약조건이 존재하지만, 기본 키로 지정 된 제약조건이 2개 이상 존재하지는 않는 경우, 피참조 테이블이 동일한 제약조건이 2개 이상 존재하는지 판단한다(S208). 피참조 테이블이 동일한 제약조건이 2개 이상 존재한다면, 현재 판단 대상인 참조 테이블의 관계 타입은 병렬 관계인 것으로 결정된다(S214).
현재 판단 대상인 참조 테이블에 2개 이상의 제약조건이 존재하지만, 기본 키인 제약조건이 2개 이상 존재하지 않고, 피참조 테이블이 동일한 제약조건이 2개 이상 존재하지도 않는 경우, 현재 판단 대상인 참조 테이블과 동일한 피참조 테이블을 가지는 제약조건이 있는지 판단한다(S210). 현재 판단 대상인 참조 테이블과 동일한 피참조 테이블을 가지는 제약조건이 있는 경우, 현재 판단 대상인 참조 테이블의 관계 타입은 재귀 관계로 결정된다(S216). 현재 판단 대상인 참조 테이블과 동일한 피참조 테이블을 가지는 제약조건도 없는 경우, 현재 판단 대상인 참조 테이블의 관계 타입은 1:N 관계로 결정된다(S218).
현재 판단 대상인 참조 테이블에 1개의 제약조건만 존재하는 경우(S204), 그 제약조건이 동일한 테이블을 참조 테이블과 피참조 테이블로 가지는 지 판단한다(S210). 현재 판단 대상인 참조 테이블의 유일한 제약조건의 피참조 테이블이 현재 판단 대상인 참조 테이블과 동일하다면, 현재 판단 대상인 참조 테이블의 관계 타입은 재귀 관계로 결정된다(S216). 현재 판단 대상인 참조 테이블의 유일한 제약조건의 피참조 테이블이 현재 판단 대상인 참조 테이블과 다르다면, 현재 판단 대상인 참조 테이블의 관계 타입은 1:N 관계로 결정된다(S218).
현재 판단 대상인 참조 테이블의 관계 타입을 결정하는 것이 마무리 되면, 쿼리 입력 결과 출력된 제약조건에 대한 데이터에 관계 타입을 결정해야 할 참조 테이블이 아직 남아 있는지 판단한다(S220). 아직 관계 타입을 결정해야 할 참조 테이블이 남아 있다면, 다음 테이블으로 판단 대상을 이동한다(S224).
다시 도 3으로 돌아와서, 각 참조 테이블 별 관계 타입을 결정한 이후의 동작을 설명한다. 관계 타입의 결정이 마무리 되면, 각 참조 테이블 별로 노드 생성 테이블 및 릴레이션 프레임을 생성한다.
노드 생성 테이블은, 그래프 데이터베이스의 노드로 산출 되는 테이블을 가리킨다. 즉, 노드 생성 테이블의 각 행(row)이 각각의 노드로 산출된다. 예를 들어, 어떤 노드 생성 테이블에 10개의 행이 있다면, 그 노드 생성 테이블에서 총 10개의 노드가 생성된다. 행(row)은 데이터베이스 분야에서 널리 사용되는 용어로, 레코드(record), 튜플(tuple)과 동일한 의미이다.
릴레이션 프레임(relation frame)은 그래프 데이터베이스의 릴레이션을 생성하기 위한 규칙이다. 릴레이션 프레임은, 릴레이션이 어떤 종류의 노드 사이를 연결해야 할 지를 지정한다. 예를 들어, TABLE_A로부터 생성된 노드와 TABLE_B로부터 생성된 노드를 연결하는 릴레이션이 생성되어야 하는 것으로 지정할 수 있다. 또한, 릴레이션 프레임은, 어떤 노드 사이를 연결해야 할지도 지정할 수 있다. 예를 들어, TABLE_A로부터 생성된 노드 중 COLUMN_A0의 값이 10인 노드 X와, TABLE_B로부터 생성된 노드 중 COLUMN_B3의 값이 10인 노드 Y를 서로 연결하도록 지정할 수 있다.
예를 들어, 'TB_EMAIL(SENDER_ID) ? 'TB_USER(USER_ID)'와 같이 릴레이션 프레임을 표시한다면, 이는 TB_EMAIL이라는 테이블로부터 생성된 노드에서 TB_USER라는 테이블로 생성된 노드로 릴레이션을 연결하되, 연결되는 두 개의 노드는 각각 SENDER_ID 칼럼의 값과 USER_ID 칼럼의 값이 동일한 것이어야 함을 의미할 수 있다.
참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 생성하는 데에는, 상기 참조 테이블의 관계 타입에 따른 규칙이 사용된다. 상기 제약조건에 대한 데이터에 포함된 각 칼럼의 데이터를 상기 참조 테이블의 관계 타입에 따른 규칙에 따른 방식으로 이용하여, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임이 결정된다. 이에 대하여, 도 7을 참조하여 자세히 설명하기로 한다.
이미 언급한 바와 같이, 1:1 관계는 1:N 관계와 동일한 것으로 취급한다. 따라서, 도 2에 도시된 5개의 관계 타입 중, 4개의 관계 타입에 대하여 어떻게 노드 생성 테이블 및 릴레이션 프레임을 생성할 것인지 도 7을 참조하여 설명한다. 도 7은 관계 타입 별로 노드 및 릴레이션(relation)이 어떻게 생성되는지 설명하기 위한 표를 도시하는 도면이다.
참조 테이블의 관계 타입이 1:N 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블 및 상기 참조 테이블의 피참조 테이블로 결정한다. 또한, 상기 릴레이션 프레임은 상기 참조 테이블의 노드와 상기 피참조 테이블의 노드 사이를 연결하되, 상기 참조 테이블의 노드의 참조 칼럼(외래 키) 데이터와 상기 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정한다. 도 7에서는 릴레이션의 방향성이 참조 테이블에서 피참조 테이블을 향하는 것으로 되어 있으나, 이는 하나의 예시에 불과하며, 릴레이션의 방향성이 존재하지 않거나, 존재하더라도 사용자의 설정에 따라 바뀔 수 있다. 릴레이션의 방향성을 설정하는 것과 관련하여는 도 17 내지 19를 참조하여 더 설명하기로 한다.
참조 테이블의 관계 타입이 M:N 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블의 제1 제약조건의 피참조 테이블 및 상기 참조 테이블의 제2 제약조건의 피참조 테이블으로 결정한다. 또한, 상기 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 노드 사이를 연결하되, 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정한다.
도 7에는 특정 참조 테이블에 대하여 제약조건이 2개만 존재하는 경우에 대하여 도시 되어 있으나, M:N 관계는 제약조건이 2개 이상일 때 존재할 수 있으므로(도 4 참조), M:N 관계는 제약조건이 3개 이상일 때에도 성립할 수 있다. 예를 들어, 제약조건이 3개라면, 상기 노드 생성 테이블은 상기 참조 테이블의 제1 제약조건의 피참조 테이블, 상기 참조 테이블의 제2 제약조건의 피참조 테이블 및 제3 제약조건의 피참조 테이블으로 결정한다. 또한, 상기 릴레이션 프레임은 제1 제약조건의 피참조 테이블의 노드와 제2 제약조건의 피참조 테이블의 노드 사이를 연결하는 제1 릴레이션, 제2 제약조건의 피참조 테이블의 노드와 제3 제약조건의 피참조 테이블의 노드 사이를 연결하는 제2 릴레이션, 제3 제약조건의 피참조 테이블의 노드와 제1 제약조건의 피참조 테이블의 노드 사이를 연결하는 제3 릴레이션을 생성하도록 할 수 있다. 이 때, 상기 제1 릴레이션은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제3 제약조건의 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제3 릴레이션은 상기 참조 테이블의 제3 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결한다.
제약조건이 a개이고, M:N 관계를 갖는 참조 테이블에 대하여 일반화 하여 설명하면, 상기 참조 테이블은 제1 제약조건의 피참조 테이블, 제2 제약조건의 피참조 테이블, ... , 제a 제약조건의 피참조 테이블을 각각 노드 생성 테이블로 갖고, aC2 개(a개 중에 순서 관계 없이 2개를 선택하는 수)의 릴레이션을 포함하는 릴레이션 프레임을 갖는다.
한편, M:N 관계에 대하여는 상기 설명한 방식에 의하여 노드 생성 테이블 및 릴레이션 프레임을 생성하되, M:N 관계를 갖는 참조 테이블을 참조 하는 다른 참조 테이블이 존재하며, 상기 다른 참조 테이블의 관계 타입이 1:N 관계인 경우, 예외 처리가 이뤄질 필요가 있다. 이 경우에 대하여 도 8 내지 도 10을 참조하여 설명한다.
도 8에 도시 된 관계형 데이터베이스의 테이블 간 연결 관계에 대하여 도 3의 단계 S100, S200 수행하고, 각 참조 테이블(진료, 진료정보)에 대하여 도 7을 참조한 설명에 따라 노드 생성 테이블 및 릴레이션 프레임을 생성한 결과가, 도 9에 도시 되어 있다. 도 9에 도시된 바와 같이, M:N 관계를 갖는 참조 테이블인 진료 테이블의 경우, 자신의 제약조건에 의하여는 노드 생성 테이블로 포함 되지 않는다. 그러나, 상기 진료 테이블을 1:N 관계로 참조하는 진료정보 테이블의 존재로 인해, 상기 진료 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임은 도 10에 도시된 것과 같이 결정되는 것이 바람직하다.
즉, M:N 관계를 갖는 참조 테이블을 참조 하는 다른 참조 테이블이 존재하며, 상기 다른 참조 테이블의 관계 타입이 1:N 관계인 경우, 상기 참조 테이블의 노드 생성 테이블은, 상기 참조 테이블의 제1 제약조건의 피참조 테이블, 상기 참조 테이블의 제2 제약조건의 피참조 테이블 및 상기 참조 테이블으로 결정하고, 상기 릴레이션 프레임은 제1 릴레이션 프레임 및 제2 릴레이션 프레임을 포함하고, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 노드 사이를 연결하되, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 참조 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정할 수 있다.
다시 도 7으로 돌아와서 참조 테이블의 관계 타입이 병렬 관계인 경우와 재귀 관계인 경우 노드 생성 테이블 및 릴레이션 프레임이 각각 어떻게 생성 되는지 설명한다.
참조 테이블의 관계 타입이 병렬 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블 및 상기 참조 테이블의 피참조 테이블으로 결정하고, 상기 릴레이션 프레임은 제1 릴레이션 프레임 및 제2 릴레이션 프레임을 포함하되, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 노드와 상기 참조 테이블의 제1 제약조건의 참조 테이블의 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 노드와 상기 참조 테이블의 제2 제약조건의 참조 테이블의 노드 사이를 연결하는 것이며, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 참조 테이블의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 참조 테이블의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정한다.
참조 테이블의 관계 타입이 재귀 관계인 경우, 상기 노드 생성 테이블은 상기 참조 테이블로 결정하고, 상기 릴레이션 프레임은 상기 참조 테이블의 제1 노드와 제2 노드 사이를 연결하되, 상기 제1 노드의 참조 칼럼(외래 키)의 데이터와 상기 제2 노드의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정한다.
이하, 도 11 내지 16을 참조하여 지금까지 설명된 본 발명의 일 실시예에 따른 데이터베이스 마이그레이션 방법의 적용 예를 설명한다.
도 11은 본 발명의 실시예들에 따라 그래프 데이터베이스로 마이그레이션 할 관계형 데이터베이스의 테이블 간 관계를 나타내는 다이어그램이고, 도 12a 내지 도 12f는 도 11에 도시된 다이어그램에 표시된 테이블들에 입력된 행(row) 데이터들을 표시한 도면들이다. 본 실시예에 따른 데이터베이스 마이그레이션 방법은 도 11 내지 도 12f에 표시된 관계형 데이터베이스를 그래프 데이터베이스로 변환한다.
도 11 내지 도 12f에 표시된 관계형 데이터베이스를 관리하는 DBMS에, 상기 관계형 데이터베이스에 포함된 테이블 중 외래 키로 설정된 칼럼을 가지는 모든 참조 테이블의 제약조건을 취합하는 쿼리를 입력한 결과, 도 13에 도시된 것과 같은 제약조건의 데이터가 출력 된다. 도 13에 도시된 데이터에 따르면, 참조 테이블이 TB_EMAIL, TB_EMAIL_FILE, TB_EMAIL_RECIPIENT, TB_GROUP, TB_GROUP_USER의 총 5개이고, 전체 제약조건의 개수는 8개임을 알 수 있다.
각 참조 테이블 별로, 관계 타입이 어떻게 결정되는지 설명한다. 아래의 설명들은, 도 6을 참조한 설명에서 제시한 로직을 실제 예시에 적용하는 과정으로 볼 수 있다.
TB_EMAIL의 제약조건의 개수는 1개이다(TB_EMAIL_ibfk_1). 또한, 다른 테이블(TB_USER)를 참조(REFERENCED_TABLE_NAME)하고 있다. 따라서, TB_EMAIL은 TB_USER와 1:N 관계를 맺는 것으로 결정된다.
TB_EMAIL_FILE의 제약조건의 개수가 2개이다(TB_EMAIL_FILE_ibfk_1, TB_EMAIL_FILE_ibfk_2). 또한, 2개의 제약조건 모두 기본 키로 지정 되어 있는 것을 알 수 있다(PK 칼럼의 값이 Y). 따라서, TB_EMAIL_FILE은 TB_EMAIL 및 TB_FILE과 M:N 관계를 맺고 있다.
TB_EMAIL_RECIPIENT의 제약조건의 개수도 2개이다 (TB_EMAIL_RECIPIENT_ibfk_1, TB_EMAIL_RECIPIENT_ibfk_2). 또한, 2개의 제약조건 모두 기본 키로 지정 되어 있는 것을 알 수 있다(PK 칼럼의 값이 Y). 따라서, TB_EMAIL_FILE은 TB_EMAIL 및 TB_FILE과 M:N 관계를 맺고 있다.
TB_GROUP의 제약조건의 개수는 1개이다(TB_GROUP_ibfk_1). 또한, 자기 자신을 참조(REFERENCED_TABLE_NAME)하고 있다. 따라서, TB_GROUP은 재귀 관계를 자기 자신과 맺는 것으로 결정된다.
TB_GROUP_USER의 제약조건의 개수는 2개이다(TB_GROUP_USER_ibfk_1, TB_GROUP_USER_ibfk_2). 또한, 2개의 제약조건 모두 기본 키로 지정 되어 있는 것을 알 수 있다(PK 칼럼의 값이 Y). 따라서, TB_GROUP_USER는 TB_GROUP 및 TB_USER와 M:N 관계를 맺고 있다.
다음으로, 각 참조 테이블 별로 관계 타입에 따른 노드 생성 테이블 및 릴레이션 프레임 생성 규칙이 어떻게 적용 되는지 설명한다. 아래의 설명들은, 도 7을 참조한 설명에서 제시한 규칙을 실제 예시에 적용하는 과정으로 볼 수 있다.
1:N 관계 타입을 가지는 TB_EMAIL의 경우, 피참조 테이블인 TB_USER와 참조 테이블인 TB_EMAIL이 노드 생성 테이블이 된다. 또한, TB_EMAIL의 노드와 TB_USER의 노드 사이를 연결하되, TB_EMAIL의 외래 키로 지정 된 칼럼인 SENDER_ID 칼럼의 데이터와 TB_USER의 피참조 칼럼인 USER_ID 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것이 릴레이션 프레임이 된다.
M:N 관계 타입을 가지는 TB_EMAIL_FILE의 경우, 제1 제약조건인 TB_EMAIL_FILE_ibfk_1의 피참조 테이블(REFERENCED_TABLE_NAME)인 TB_EMAIL과, 제2 제약조건인 TB_EMAIL_FILE_ibfk_2의 피참조 테이블(REFERENCED_TABLE_NAME)인 TB_FILE이 노드 생성 테이블이 된다. 또한, 제1 제약조건의 피참조 테이블(TB_EMAIL)과 제2 제약조건의 피참조 테이블(TB_FILE) 사이에 릴레이션을 연결하되, 제1 제약조건의 피참조 테이블의 피참조 칼럼(EMAIL_ID)의 데이터와 제2 제약조건의 피참조 테이블의 피참조 칼럼(FILE_ID)의 데이터가 동일한 노드 사이를 연결하는 것이 릴레이션 프레임이 된다. M:N 관계 타입을 가지는 다른 두 개의 테이블(TB_EMAIL_RECIPIENT, TB_GROUP_USER) 역시 동일한 방식으로 노드 생성 테이블 및 릴레이션 프레임이 결정된다.
재귀 관계 타입을 가지는 TB_GROUP의 경우, 자기 자신인 TB_GROUP이 노드 생성 테이블이 된다. 또한, TB_GROUP의 노드 사이를 연결하되, TB_GROUP의 참조 칼럼인 PARENT_GROUP_ID 칼럼의 데이터와, TB_GROUP의 기본 키인 GROUP_ID 칼럼의 데이터가 일치하는 노드끼리 연결하는 것이 릴레이션 템플릿이 된다.
도 14는 각 참조 테이블(referencing table)에 대하여 관계 타입, 노드 생성 테이블 및 릴레이션 프레임을 표시한다.
다음으로, 노드 생성 테이블을 취합하여 노드 리스트를 생성하고, 릴레이션 프레임을 취합하여 릴레이션 리스트를 생성한다. 상기 노드 리스트는 그래프 데이터베이스의 노드로 산출 되어야 하는 데이터를 포함하고 있는 테이블들의 리스트이고, 상기 릴레이션 리스트는 그래프 데이터베이스의 릴레이션으로 산출 되어야 하는 릴레이션 들의 생성 규칙(어떤 테이블로부터 산출 된 노드 사이를 연결해야 하는 지, 각 노드의 칼럼 값을 기준으로 어떤 노드 사이를 연결해야 하는지)들의 리스트이다. 도 15는 도 14를 반영하는 노드 리스트 및 릴레이션 리스트이다.
도 16은 도 11 내지 도 12f를 통해 표시된 관계형 데이터베이스의 데이터가 그래프 데이터베이스로 마이그레이션 된 모습을 도시한 도면이다.
도 16에 도시된 전체 노드 및 릴레이션 중 일부의 생성 이유를 설명한다. 노드 리스트에 포함된 노드 생성 테이블 중, TB_USER의 경우, 도 12a에 따르면 총 12개의 행(row)이 존재한다. 따라서, TB_USER로부터 12개의 노드가 생성된 것을 도 16에서 확인할 수 있다. 또한, TB_USER로부터 생성된 노드를 다른 노드와 연결해 주는 릴레이션은 3가지가 있는 점을 도 15에서 확인할 수 있다. 즉, TB_USER로부터 생성된 노드와 TB_EMAIL로부터 생성된 노드가 연결되고(릴레이션 라벨: SEND), TB_EMAIL로부터 생성된 노드와 TB_USER로부터 생성된 노드가 연결되며(릴레이션 라벨: RECEIVE), TB_GROUP으로부터 생성된 노드와 TB_USER로부터 생성된 노드가 연결된다.
예를 들어, TB_USER 테이블로부터 생성된 '정은지' 노드는 TB_GROUP으로부터 생성된 '에이핑크' 노드와 연결되고, TB_EMAIL 테이블로부터 생성된 '1위 축하' 노드와 연결된다. '정은지' 사용자가 '에이핑크' 그룹에 속하고, '1위 축하'라는 메일을 송신한 점을 쉽게 파악할 수 있다. 기존의 관계형 데이터베이스를 이용하여 데이터를 관리했다면, '정은지' 사용자가 속한 그룹을 찾기 위하여 SELECT 쿼리를 수행해야 하고, '정은지' 사용자가 송신한 메일을 찾기 위하여 SELECT 쿼리를 수행해야 할 것이다. 이와 같이, 그래프 데이터베이스를 이용하면 데이터 사이의 연관 관계를 파악하기 위한 연산량이 기존의 관계형 데이터베이스에 비하여 감소하는 효과가 있다.
이하, 본 발명의 다른 실시예에 따른 데이터베이스 마이그레이션 방법에 대하여 도 17을 참조하여 설명한다. 도 17의 S100 단계로부터 S500 단계까지는 도 3에 도시된 것과 동일하다. 본 실시예에 따르면, 노드의 프로퍼티 및 라벨과 릴레이션의 프로퍼티 및 라벨을 설정할 수 있는 UI(User Interface)가 제공된다.
상기 노드 리스트에 포함된 각 노드 생성 테이블에 대하여 생성되는 노드에 포함될 프로퍼티를, 상기 노드 생성 테이블의 칼럼 중에서 선정하고, 상기 노드 리스트에 포함된 각 노드 생성 테이블에 대하여 생성되는 노드의 라벨을 입력하기 위한 사용자 UI(User Interface)를 제공할 수 있다(S600).
도 18은 사용자가 제공 받을 수 있는 노드 프로퍼티 및 라벨 설정 UI의 일 예이다. 도 18에 도시된 바와 같이, 사용자는 특정 테이블로부터 생성되는 노드의 프로퍼티로 상기 특정 테이블의 칼럼 중 어떤 것을 사용할 지 선정할 수 있다. 또한, 사용자는 특정 테이블로부터 생성되는 노드의 라벨 명을 입력할 수 있다.
또한, 상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 의하여 생성되는 릴레이션에 포함될 프로퍼티 및 라벨을 입력하고, 릴레이션의 방향을 지정하기 위한 사용자 UI(User Interface)를 제공할 수 있다(S600). 일 실시예에 따르면, 상기 두 개의 사용자 UI 중 하나만 제공 될 수도 있다.
도 19는 사용자가 제공 받을 수 있는 릴레이션 프로퍼티 및 라벨 설정 UI의 일 예이다. 도 19에 도시된 바와 같이, 사용자는 특정 릴레이션 프레임에 대하여, 릴레이션의 방향 및 릴레이션의 라벨을 입력할 수 있다. 또한, 사용자는 릴레이션의 프로퍼티를 제공할 소스 테이블을 선정하고, 상기 소스 테이블의 칼럼 중 적어도 일부를 상기 릴레이션의 프로퍼티로 선정할 수 있다.
일 실시예에 따르면, 상기 소스 테이블은 상기 릴레이션 프레임의 생성 시 참조 테이블으로 기본 설정 될 수 있다.
도 17에는 S500 단계의 실행 이후에 사용자 UI를 제공 하는 단계(S600)가 수행 되는 것으로 도시 되어 있으나, 일 실시예에 따르면, 사용자 UI를 제공하여 노드 및 릴레이션의 프로퍼티 및 라벨을 확정(S600)한 후, S500 단계를 실행할 수도 있다.
다음으로, 그래프 데이터베이스의 노드 데이터 및 릴레이션 데이터에 프로퍼티 및 라벨의 설정 사항에 따른 프로퍼티 정보 및 라벨 정보를 추가 기록한다(S700).
지금까지 도 1 내지 도 19를 참조하여 설명된 본 발명의 실시예들에 따른 데이터베이스 마이그레이션 방법은 컴퓨터가 읽을 수 있는 매체 상에 컴퓨터가 읽을 수 있는 코드로 구현될 수 있다. 상기 컴퓨터가 읽을 수 있는 매체는, 예를 들어 이동형 기록 매체(CD, DVD, 블루레이 디스크, USB 저장 장치, 이동식 하드 디스크)이거나, 고정식 기록 매체(ROM, RAM, 컴퓨터 구비 형 하드 디스크)일 수 있다. 상기 컴퓨터로 읽을 수 있는 기록 매체에 기록 된 상기 컴퓨터 프로그램은 인터넷 등의 네트워크를 통하여 다른 컴퓨팅 장치에 전송되어 상기 다른 컴퓨팅 장치에 설치될 수 있고, 이로써 상기 다른 컴퓨팅 장치에서 사용될 수 있다.
또한, 본 발명의 또 다른 실시예에 따르면, 지금까지 도 1 내지 도 19를 참조하여 설명된 본 발명의 실시예들에 따른 데이터베이스 마이그레이션 방법의 각 단계를 실시하도록 하는 컴퓨터 프로그램이 제공 될 수 있다. 상기 컴퓨터 프로그램은 컴퓨터, 스마트폰 등 연산 수단이 구비된 장치와 결합하여 실행 될 수 있으며, 컴퓨터가 읽을 수 있는 매체 상에 기록될 수 있다.
도 20은 본 발명의 또 다른 실시예에 따른 데이터베이스 마이그레이션 시스템의 구성도이다. 본 실시예에 따른 데이터베이스 마이그레이션 시스템은 관계형 DB 서버(200), 그래프 DB 서버(300) 및 데이터베이스 변환 장치(100)를 포함한다. 데이터베이스 변환 장치(100)는 관계형 DB 서버(200)로부터 소스 데이터베이스의 데이터를 제공 받고, 상기 제공 받은 데이터를 이용하여 그래프 데이터베이스용 노드 및 릴레이션 데이터를 생성한 후, 그래프 DB 서버(300)에 제공한다.
일 실시예에 따르면, 그래프 DB 서버(300)는 소셜 네트워크 서비스를 제공 하는 서버에 구현 되거나, 상기 소셜 네트워크 서비스를 제공 하는 서버에 연결 된 것일 수 있다.
데이터베이스 변환 장치(100)는 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하고, 각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하며, 상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하고, 각각의 상기 참조 테이블에 대응하는 노드 생성 테이블 및 릴레이션 프레임을 취합하여 노드 리스트 및 릴레이션 리스트를 생성하고, 상기 노드 리스트에 포함된 노드 생성 테이블의 각 행(row)의 데이터를 상기 그래프 데이터베이스의 노드로 변환하는 것을, 상기 노드 리스트에 포함된 모든 노드 생성 테이블에 대하여 반복하며, 상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 따라 상기 그래프 데이터베이스의 릴레이션을 생성하는 것을, 상기 릴레이션 리스트에 포함된 모든 릴레이션 프레임에 대하여 반복한다.
이하, 본 발명의 또 다른 실시예에 따른 데이터베이스 마이그레이션 장치의 구성 및 동작을 도 21을 참조하여 설명한다. 도 21에 도시된 바와 같이, 본 실시예에 따른 데이터베이스 마이그레이션 장치는 제약조건 조회부(104), 관계 타입 결정부(106), 노드 및 릴레이션 결정부(108) 및 그래프 DB 생성부(112), 통신부(102)를 포함할 수 있다. 통신부(102)는 데이터베이스 마이그레이션 장치(100)와 네트워크 간의 연결을 중계한다.
제약조건 조회부(104)는 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합한다.
관계 타입 결정부(106)는 각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정한다.
노드 및 릴레이션 결정부(108)는 상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정한다.
그래프 DB 생성부(112)는 상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성한다.
일 실시예에서, 그래프 DB 생성부(112)는 각각의 상기 참조 테이블에 대응하는 노드 생성 테이블 및 릴레이션 프레임을 취합하여 노드 리스트 및 릴레이션 리스트를 생성하고, 상기 노드 리스트에 포함된 노드 생성 테이블의 각 행(row)의 데이터를 상기 그래프 데이터베이스의 노드로 변환하는 것을, 상기 노드 리스트에 포함된 모든 노드 생성 테이블에 대하여 반복하며, 상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 따라 상기 그래프 데이터베이스의 릴레이션을 생성하는 것을, 상기 릴레이션 리스트에 포함된 모든 릴레이션 프레임에 대하여 반복할 수 있다.
일 실시예에서, 데이터베이스 마이그레이션 장치(100)는 라벨 및 프로퍼티 설정부(110)를 더 포함할 수 있다. 라벨 및 프로퍼티 설정부(110)는 도 18 또는 도 19에 도시된 것과 같은 UI를 통신부(102)를 통해 사용자 단말(미도시)에 제공할 수 있다. 즉, 라벨 및 프로퍼티 설정부(110)는 상기 노드 리스트에 포함된 각 노드 생성 테이블에 대하여 생성되는 노드에 포함될 프로퍼티를, 상기 노드 생성 테이블의 칼럼 중에서 선정하고, 상기 노드 리스트에 포함된 각 노드 생성 테이블에 대하여 생성되는 노드의 라벨을 입력하기 위한 사용자 UI를 제공할 수 있다. 또한, 라벨 및 프로퍼티 설정부(110)는 상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 의하여 생성되는 릴레이션에 포함될 프로퍼티 및 라벨을 입력하고, 릴레이션의 방향을 지정하기 위한 사용자 UI를 제공할 수 있다.
일 실시예에서, 데이터베이스 마이그레이션 장치(100)에는 라벨 및 프로퍼티 설정부(110)가 비활성화 되거나, 미구비 될 수 있다. 이 경우, 노드 및 릴레이션 결정부(108)는 각 노드 및 릴레이션의 프로퍼티 및 라벨을 기 설정된 기준에 의하여 기본 값으로 세팅 한다.
본 발명의 또 다른 실시예에 따른 데이터베이스 마이그레이션 장치의 구성 및 동작에 대하여 도 22를 참조하여 설명한다. 본 실시예에 따른 데이터베이스 마이그레이션 장치(100)는 시스템 버스(150), 프로세서(151), 메모리(예를 들어, Random Access Memory)(152), 스토리지(153), 외부 장치와의 통신을 위한 네트워크 인터페이스(154)를 포함할 수 있다. 도 1 내지 도 19를 참조하여 설명된 본 발명의 실시예들에 따른 데이터베이스 마이그레이션 방법을 구현하는 컴퓨터 프로그램 코드는 스토리지(153)에 저장되어 메모리(152)에 로드 되고 프로세서(151)에 의해 실행될 수 있다.
이상 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.

Claims (23)

  1. 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 단계;
    각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 단계;
    상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계; 및
    상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  2. 제1 항에 있어서,
    상기 참조 테이블 각각의 관계 타입을 결정하는 단계는,
    각각의 참조 테이블이 가지는 제약조건의 개수를 이용하여 상기 참조 테이블 각각의 관계 타입을 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  3. 제1 항에 있어서,
    상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계는,
    각각의 상기 참조 테이블에 대응하는 노드 생성 테이블 및 릴레이션 프레임을 취합하여 노드 리스트 및 릴레이션 리스트를 생성하는 단계;
    상기 노드 리스트에 포함된 노드 생성 테이블의 각 행(row)의 데이터를 상기 그래프 데이터베이스의 노드로 변환하는 것을, 상기 노드 리스트에 포함된 모든 노드 생성 테이블에 대하여 반복하는 단계; 및
    상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 따라 상기 그래프 데이터베이스의 릴레이션을 생성하는 것을, 상기 릴레이션 리스트에 포함된 모든 릴레이션 프레임에 대하여 반복하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  4. 제3 항에 있어서,
    상기 노드 리스트에 포함된 각 노드 생성 테이블에 대하여 생성되는 노드에 포함될 프로퍼티를, 상기 노드 생성 테이블의 칼럼 중에서 선정하고, 상기 노드 리스트에 포함된 각 노드 생성 테이블에 대하여 생성되는 노드의 라벨을 입력하기 위한 사용자 UI(User Interface)를 제공하는 단계를 더 포함하는,
    데이터베이스 마이그레이션 방법.
  5. 제3 항에 있어서,
    상기 릴레이션 리스트에 포함된 각 릴레이션 프레임에 의하여 생성되는 릴레이션에 포함될 프로퍼티 및 라벨을 입력하고, 릴레이션의 방향을 지정하기 위한 사용자 UI(User Interface)를 제공하는 단계를 더 포함하는,
    데이터베이스 마이그레이션 방법.
  6. 제1 항에 있어서,
    상기 제약조건을 취합하는 단계는,
    인포메이션 스키마(information_schema)로부터, 상기 관계형 데이터베이스의 모든 참조 테이블의 상기 제약조건에 대한 정보를 포함하는 뷰 테이블(view table)을 얻기 위한 쿼리(query)를 상기 관계형 데이터베이스의 DBMS(Database Management System)에 입력하는 단계; 및
    상기 쿼리에 대한 응답으로 상기 제약조건에 대한 뷰 테이블을 얻는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  7. 제6 항에 있어서,
    상기 제약조건은, 키 제약조건(key constraint)인,
    데이터베이스 마이그레이션 방법.
  8. 제6 항에 있어서,
    상기 제약조건은, 테이블 제약조건(table constraint)인,
    데이터베이스 마이그레이션 방법.
  9. 제6 항에 있어서,
    상기 뷰 테이블은, 상기 참조 테이블의 식별 정보, 상기 참조 테이블에서 외래 키로 설정된 칼럼의 식별 정보, 상기 외래 키에 의하여 피참조 테이블의 식별 정보, 상기 피참조 테이블에서 상기 외래 키에 의하여 참조된 칼럼의 식별 정보 및 상기 참조 테이블에서 외래 키로 설정된 칼럼이 기본 키(Primary Key)인지 여부를 가리키는 플래그를 각각 칼럼으로서 포함하는,
    데이터베이스 마이그레이션 방법.
  10. 제6 항에 있어서,
    상기 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는,
    상기 제약조건에 대한 데이터에 포함된 각 칼럼의 데이터를 상기 참조 테이블의 관계 타입에 따른 규칙에 따른 방식으로 이용하여, 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  11. 제1 항에 있어서,
    상기 관계 타입을 결정하는 단계는,
    관계 타입의 결정 대상인 상기 참조 테이블이 가지는 제약조건의 개수가 2개 이상인 경우, 상기 참조 테이블이 가지는 제약조건 중, 기본 키(primary key)로 설정된 제약조건의 개수가 2개 이상이면, 상기 참조 테이블의 관계 타입을 M:N 관계로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  12. 제1 항에 있어서,
    상기 관계 타입을 결정하는 단계는,
    관계 타입의 결정 대상인 상기 참조 테이블이 가지는 제약조건의 개수가 2개 이상인 경우, 상기 참조 테이블이 가지는 제약조건 중, 기본 키(primary key)로 설정된 제약조건의 개수가 2개 미만이면, 상기 참조 테이블이 가지는 제약조건 중 피참조 테이블이 동일한 제약조건이 2개 이상 존재하는지 판정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  13. 제12 항에 있어서,
    상기 참조 테이블이 가지는 제약조건 중 피참조 테이블이 동일한 제약조건이 2개 이상 존재하는지 판정하는 단계는,
    상기 판정 결과 상기 참조 테이블이 가지는 제약조건 중 피참조 테이블이 동일한 제약조건이 2개 이상 존재하는 경우, 상기 참조 테이블의 관계 타입을 병렬 관계로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  14. 제12 항에 있어서,
    상기 참조 테이블이 가지는 제약조건 중 피참조 테이블이 동일한 제약조건이 2개 이상 존재하는지 판정하는 단계는,
    상기 판정 결과 상기 참조 테이블이 가지는 제약조건 모두가 서로 다른 피참조 테이블을 가지는 경우, 상기 참조 테이블의 제약조건에 따른 피참조 테이블과 상기 참조 테이블이 동일한지 여부를 판단하는 단계; 및
    상기 참조 테이블의 제약조건에 따른 피참조 테이블과 상기 참조 테이블이 동일한 경우 상기 참조 테이블의 관계 타입을 재귀 관계로 결정하고, 상기 참조 테이블의 제약조건에 따른 피참조 테이블과 상기 참조 테이블이 서로 다른 경우 상기 참조 테이블의 관계 타입을 1:N 관계로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  15. 제1 항에 있어서,
    상기 관계 타입을 결정하는 단계는,
    관계 타입의 결정 대상인 상기 참조 테이블이 가지는 제약조건의 개수가 1개 뿐인 경우, 상기 참조 테이블의 관계 타입을 1:N 관계 및 재귀 관계 중 하나로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  16. 제15 항에 있어서,
    상기 참조 테이블의 관계 타입을 1:N 관계 및 재귀 관계 중 하나로 결정하는 단계는,
    상기 참조 테이블의 제약조건에 따른 피참조 테이블과 상기 참조 테이블이 동일한 경우 상기 참조 테이블의 관계 타입을 재귀 관계로 결정하고, 상기 참조 테이블의 제약조건에 따른 피참조 테이블과 상기 참조 테이블이 서로 다른 경우 상기 참조 테이블의 관계 타입을 1:N 관계로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  17. 제1 항에 있어서,
    상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는,
    상기 참조 테이블의 관계 타입이 1:N 관계인 경우,
    상기 노드 생성 테이블은 상기 참조 테이블 및 상기 참조 테이블의 피참조 테이블으로 결정하고,
    상기 릴레이션 프레임은 상기 참조 테이블의 노드와 상기 피참조 테이블의 노드 사이를 연결하되, 상기 참조 테이블의 노드의 외래 키로 지정된 칼럼의 데이터와 상기 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함하되,
    데이터베이스 마이그레이션 방법.
  18. 제1 항에 있어서,
    상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는,
    상기 참조 테이블의 관계 타입이 M:N 관계인 경우,
    상기 노드 생성 테이블은 상기 참조 테이블의 제1 제약조건의 피참조 테이블 및 상기 참조 테이블의 제2 제약조건의 피참조 테이블으로 결정하고, 상기 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 노드 사이를 연결하되, 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  19. 제1 항에 있어서,
    상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는,
    상기 참조 테이블의 관계 타입이 M:N 관계이면서, 상기 참조 테이블을 참조 하는 다른 참조 테이블이 존재하며, 상기 다른 참조 테이블의 관계 타입이 1:N 관계인 경우,
    상기 참조 테이블의 상기 노드 생성 테이블은, 상기 참조 테이블의 제1 제약조건의 피참조 테이블, 상기 참조 테이블의 제2 제약조건의 피참조 테이블 및 상기 참조 테이블으로 결정하고,
    상기 릴레이션 프레임은 제1 릴레이션 프레임 및 제2 릴레이션 프레임을 포함하고, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 노드와 상기 참조 테이블의 노드 사이를 연결하되, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 제1 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 참조 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 제2 제약조건의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 참조 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  20. 제1 항에 있어서,
    상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는,
    상기 참조 테이블의 관계 타입이 병렬 관계인 경우,
    상기 노드 생성 테이블은 상기 참조 테이블 및 상기 참조 테이블의 피참조 테이블으로 결정하고,
    상기 릴레이션 프레임은 제1 릴레이션 프레임 및 제2 릴레이션 프레임을 포함하되, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 노드와 상기 참조 테이블의 제1 제약조건의 참조 테이블의 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 노드와 상기 참조 테이블의 제2 제약조건의 참조 테이블의 노드 사이를 연결하는 것이며, 상기 제1 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제1 제약조건의 참조 테이블의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하고, 상기 제2 릴레이션 프레임은 상기 참조 테이블의 피참조 테이블의 피참조 칼럼의 데이터와 상기 참조 테이블의 제2 제약조건의 참조 테이블의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  21. 제1 항에 있어서,
    상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계는,
    상기 참조 테이블의 관계 타입이 재귀 관계인 경우,
    상기 노드 생성 테이블은 상기 참조 테이블로 결정하고,
    상기 릴레이션 프레임은 상기 참조 테이블의 제1 노드와 제2 노드 사이를 연결하되, 상기 제1 노드의 외래 키로 지정된 칼럼의 데이터와 상기 제2 노드의 기본 키 칼럼의 데이터가 일치하는 노드 사이를 연결하는 것으로 결정하는 단계를 포함하는,
    데이터베이스 마이그레이션 방법.
  22. 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 제약조건 조회부;
    각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 관계 타입 결정부;
    상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 노드 및 릴레이션 결정부; 및
    상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 그래프 DB 생성부를 포함하는,
    데이터베이스 마이그레이션 장치.
  23. 마이그레이션 소스 데이터베이스인 관계형 데이터베이스의 테이블 중 외래 키(foreign key)로 설정된 칼럼을 가지는 참조 테이블(referencing table)의 제약조건(constraint)을 취합하는 단계;
    각각의 참조 테이블이 가지는 제약조건으로부터 상기 참조 테이블 각각의 관계 타입을 결정하는 단계;
    상기 참조 테이블의 관계 타입에 기반하여 상기 참조 테이블에 대한 노드 생성 테이블 및 릴레이션 프레임을 결정하는 단계; 및
    상기 노드 생성 테이블의 각 행(row)의 데이터를 마이그레이션 타겟 데이터베이스인 그래프 데이터베이스의 노드로 변환하고, 상기 릴레이션 프레임에 따라 상기 생성된 노드 사이를 연결하는 상기 그래프 데이터베이스의 릴레이션을 생성하는 단계를 실행하는 컴퓨터 프로그램이 기록 된,
    컴퓨터로 읽을 수 있는 기록 매체.
PCT/KR2014/013112 2014-09-26 2014-12-31 데이터베이스 마이그레이션 방법 및 그 장치 WO2016047866A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020140129311A KR101674924B1 (ko) 2014-09-26 2014-09-26 데이터베이스 마이그레이션 방법 및 그 장치
KR10-2014-0129311 2014-09-26

Publications (1)

Publication Number Publication Date
WO2016047866A1 true WO2016047866A1 (ko) 2016-03-31

Family

ID=55581371

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2014/013112 WO2016047866A1 (ko) 2014-09-26 2014-12-31 데이터베이스 마이그레이션 방법 및 그 장치

Country Status (4)

Country Link
US (1) US20160092596A1 (ko)
KR (1) KR101674924B1 (ko)
CN (1) CN105808553A (ko)
WO (1) WO2016047866A1 (ko)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019447A (zh) * 2017-09-18 2019-07-16 镇江雅迅软件有限责任公司 一种基于关系型数据库的数据标签管理办法
KR101997494B1 (ko) * 2017-09-28 2019-07-08 주식회사 티맥스 소프트 메인프레임 시스템의 데이터를 실시간으로 개방형 시스템에서 사용하기 위한 방법
CN107844581A (zh) * 2017-11-13 2018-03-27 成都蓝景信息技术有限公司 一种多源异质数据融合平台
CN108280159B (zh) * 2018-01-16 2021-08-20 云南大学 一种将图数据库转化为关系数据库的方法
CN108509556B (zh) * 2018-03-22 2021-03-23 上海达梦数据库有限公司 数据迁移方法和装置、服务器、存储介质
CN109376153B (zh) * 2018-09-27 2021-05-18 浪潮软件股份有限公司 一种基于NiFi的数据写入图数据库的系统及方法
KR102230821B1 (ko) 2018-12-26 2021-03-19 한남대학교 산학협력단 데이터베이스 전환 시스템 및 이를 이용한 데이터베이스 전환 방법
CN110209886A (zh) * 2019-02-18 2019-09-06 唯简科技(北京)有限公司 一种基于bigtable数据模型构造面向对象的图的存储方式
CN111459914B (zh) * 2020-03-31 2023-09-05 北京金山云网络技术有限公司 分布式图数据库的优化方法、装置和电子设备
WO2021215101A1 (ja) * 2020-04-21 2021-10-28 株式会社日立製作所 データ管理システムおよびデータ管理方法
CN111881110B (zh) * 2020-06-18 2024-04-09 贝壳技术有限公司 数据迁移方法及装置
KR102453595B1 (ko) 2020-10-20 2022-10-14 (주)퍼스트정보 관계형 데이터베이스 보존 방법 및 시스템
CN112800136A (zh) * 2021-01-30 2021-05-14 上海宝旗信息科技有限公司 一种数据选择性级联同步工具及其同步方法
CN113220659B (zh) * 2021-04-08 2023-06-09 杭州费尔斯通科技有限公司 一种数据迁移的方法、系统、电子装置和存储介质
WO2023227921A1 (en) * 2022-05-23 2023-11-30 Coupang Corp. Systems and methods for database migration
CN117312276A (zh) * 2023-10-24 2023-12-29 上海栈略数据技术有限公司 一种关系型数据库至图数据库的数据迁移方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320023A1 (en) * 2005-02-03 2008-12-25 Fong Joseph S P System and method of translating a relational database into an xml document and vice versa
US8037108B1 (en) * 2009-07-22 2011-10-11 Adobe Systems Incorporated Conversion of relational databases into triplestores

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6704744B1 (en) * 1994-12-07 2004-03-09 Next Computer, Inc. Method and apparatus for mapping objects to multiple tables of a database
AU2001243277A1 (en) * 2000-02-25 2001-09-03 Synquiry Technologies, Ltd. Conceptual factoring and unification of graphs representing semantic models
US7941453B1 (en) * 2003-05-09 2011-05-10 Vignette Software Llc Method and system for deployment of content using proxy objects
US20050004918A1 (en) * 2003-07-02 2005-01-06 International Business Machines Corporation Populating a database using inferred dependencies
KR100666942B1 (ko) * 2005-01-07 2007-01-11 삼성전자주식회사 관계형 dbms를 이용한 xml 데이터 관리 방법
US20070266041A1 (en) * 2006-05-11 2007-11-15 Microsoft Corporation Concept of relationshipsets in entity data model (edm)
KR101510355B1 (ko) * 2008-02-26 2015-04-14 아브 이니티오 테크놀로지 엘엘시 데이터 관계의 그래픽 표현
US8010521B2 (en) * 2009-03-23 2011-08-30 Sap Ag Systems and methods for managing foreign key constraints
CA2831135A1 (en) * 2011-03-31 2012-10-04 Coral Networks, Inc. System and method for the structuring and interpretation of organic computer programs
WO2012083679A1 (zh) * 2011-07-13 2012-06-28 华为技术有限公司 一种数据迁移方法、数据迁移装置及数据迁移系统
EP2755148A1 (en) 2013-01-15 2014-07-16 Fujitsu Limited Data storage system, and program and method for execution in a data storage system
CN103530327B (zh) * 2013-09-25 2016-08-17 清华大学深圳研究生院 一种从非关系型数据库到关系型数据库的数据迁移方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320023A1 (en) * 2005-02-03 2008-12-25 Fong Joseph S P System and method of translating a relational database into an xml document and vice versa
US8037108B1 (en) * 2009-07-22 2011-10-11 Adobe Systems Incorporated Conversion of relational databases into triplestores

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DE VIRGILIO, ROBERTO ET AL.: "Converting Relational to Graph Databases", PROCEEDINGS OF THE FIRST INTERNATIONAL WORKSHOP ON GRAPH DATA MANAGEMENT EXPERIENCE AND SYSTEMS (GRADES 2013, 23 June 2013 (2013-06-23) *
PANKOWSKI, TADEUSZ: "Using Data-to-Knowledge Exchange for Transforming Relational Databases to Knowledge Bases", PROCEEDINGS OF 6TH INTERNATIONAL SYMPOSIUM, RULEML 2012, LNCS 7438, 27 August 2012 (2012-08-27), pages 256 - 263, XP047014913 *
SOUSSI, RANIA: "SPIDER-Graph: A Model for Heterogeneous Graphs Extracted from a Relational Database", 31ST INTERNATIONAL CONFERENCE ER 2012, LNCS 7532, 2012, pages 543 - 552, XP047020669 *

Also Published As

Publication number Publication date
KR101674924B1 (ko) 2016-11-22
KR20160036944A (ko) 2016-04-05
US20160092596A1 (en) 2016-03-31
CN105808553A (zh) 2016-07-27

Similar Documents

Publication Publication Date Title
WO2016047866A1 (ko) 데이터베이스 마이그레이션 방법 및 그 장치
WO2021218021A1 (zh) 数据血缘分析方法、装置、设备及计算机可读存储介质
JP6045706B2 (ja) データ処理システム、データ処理方法およびデータ処理装置
WO2017076263A1 (zh) 融合知识库处理方法和装置及知识库管理系统、存储介质
WO2020015067A1 (zh) 数据采集方法、装置、设备及存储介质
US20200143919A1 (en) Automatic knowledge-based feature extraction from electronic medial records
WO2011136425A1 (ko) 개체명 사전 및 마이닝 규칙이 결합된 온톨로지 스키마를 이용한 리소스 기술 프레임워크 네트워크 구축 장치 및 방법
WO2010123168A1 (ko) 데이터베이스 관리 방법 및 시스템
WO2014189190A1 (ko) 데이터 부재 태깅 기반의 정보 검색 시스템 및 방법
WO2011162446A1 (ko) 온톨로지 스키마와 결합된 개체명 사전 및 마이닝 규칙을 이용한 용어의 개체명 결정모듈 및 방법
JP2010250450A (ja) データベース・メッセージ分析支援プログラム、方法及び装置
US9589022B2 (en) Traversing a SPARQL query and translation to a semantic equivalent SQL
WO2022134363A1 (zh) 整合业务报表的方法、装置、设备以及存储介质
CN114443854A (zh) 多源异构数据的处理方法、装置、计算机设备及存储介质
WO2013008978A1 (ko) 개체 식별 결과 검색 시스템 및 방법
WO2021107448A1 (ko) 효율적 문서 분류 처리를 지원하는 지식 그래프 기반 마케팅 정보 분석 서비스 제공 방법 및 그 장치
US20070033178A1 (en) Quality of service feedback for technology-neutral data reporting
JP2010020634A (ja) 業務フロー処理プログラム、方法及び装置
CN106682107B (zh) 数据库表关联关系确定方法及装置
WO2021107446A1 (ko) 지식 그래프 기반 마케팅 정보 분석 챗봇 서비스 제공 방법 및 그 장치
WO2022145503A1 (ko) 시맨틱 레스트 에이피아이 제공 방법
US20180101596A1 (en) Deriving and interpreting users collective data asset use across analytic software systems
JP2023534239A (ja) 修飾された関係スコアを用いたマスタデータの改善されたエンティティ解決
JPH1040255A (ja) ハッシュ表管理装置
CN111563123A (zh) 一种hive仓库元数据实时同步方法

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

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

Country of ref document: EP

Kind code of ref document: A1