WO2012083679A1 - Data migration method, data migration device and data migration system - Google Patents

Data migration method, data migration device and data migration system Download PDF

Info

Publication number
WO2012083679A1
WO2012083679A1 PCT/CN2011/077102 CN2011077102W WO2012083679A1 WO 2012083679 A1 WO2012083679 A1 WO 2012083679A1 CN 2011077102 W CN2011077102 W CN 2011077102W WO 2012083679 A1 WO2012083679 A1 WO 2012083679A1
Authority
WO
WIPO (PCT)
Prior art keywords
relational database
mapping
mapping relationship
data
schema
Prior art date
Application number
PCT/CN2011/077102
Other languages
French (fr)
Chinese (zh)
Inventor
李丽娟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2011/077102 priority Critical patent/WO2012083679A1/en
Priority to CN2011800012395A priority patent/CN102308297B/en
Publication of WO2012083679A1 publication Critical patent/WO2012083679A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • 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
    • G06F16/86Mapping to a database

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a data migration method, a data migration device, and a data migration system.
  • relational databases As the scope of database applications expands, the functionality of relational databases is expanded, but the complexity and cost of use are also greatly increased. Many applications do not require the complex functions of a relational database, and are not limited by the data model of the relational database. Especially with the development of web2.0 services and the proliferation of network content, new demands have arisen on database systems, which require massive storage and concurrency, flexible expansion, high reliability, high availability, low cost, and flexible tables. Features such as structure, however, traditional relational databases cannot implement these features. Based on this, the industry has proposed various no sql non-relational databases, such as self-organizing, self-management, low cost, flexible scalability, mass storage, high concurrent access, and query relationship.
  • the embodiment of the present invention provides a data migration method, device, and data migration system, which can smoothly migrate data in a relational database to a non-relational database.
  • An embodiment of the present invention provides a data migration method, where the method includes:
  • the data of the relational database is imported into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
  • the embodiment of the invention further provides a data migration device, the device comprising:
  • a first obtaining unit configured to obtain a relational database library table SCHEMA information from a relational database
  • a mapping unit configured to map the SCHEMA information into a non-relational database XML model, and record a corresponding mapping relationship in the mapping relationship table
  • the data migration unit is configured to import the data of the relational database into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
  • the embodiment of the present invention further provides a data migration system, including at least one relational database and one non-relational database, and further comprising: a data migration device, configured to obtain a relational database library table SCHEMA information from a relational database; and map the SCHEMA information
  • a data migration device configured to obtain a relational database library table SCHEMA information from a relational database; and map the SCHEMA information
  • the non-relational database XML model is formed, and the corresponding mapping relationship is recorded in the mapping relationship table; according to the mapping relationship recorded in the mapping relationship table, the data of the relational database is imported into the non-relational database.
  • the embodiment of the present invention provides a method for data migration between a relational database and a non-relational database, a data migration device, and a data migration system, which can be used to migrate data of a traditional relational database to a non-relational database. Smooth migration of data services.
  • the data migration in the embodiment of the present invention is automatic, not only ensures the reliability of migration, but also improves the efficiency of data migration, thereby achieving smooth switching of services.
  • FIG. 1 is a flowchart of a data migration method according to Embodiment 1 of the present invention.
  • FIG. 2 is a flowchart of a method for data migration according to Embodiment 2 of the present invention.
  • FIG. 3 is a flowchart of a SCHEMA mapping in various modes according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a data importing process according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a data migration system according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of an application example of providing a data migration system according to an embodiment of the present invention.
  • FIG. 1 a flowchart of a data migration method according to Embodiment 1 of the present invention is provided.
  • the method includes:
  • Step 101 Obtain a relational database table SCHEMA information from a relational database; - an acquisition process in which the SCHEMA mapping engine first sends a request for obtaining SCHEMA information to the relational database; receiving the SCHEMA information fed back by the relational database.
  • Step 102 Mapping the SCHEMA information into a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table;
  • the SCHEMA mapping engine maps the SCHEMA information to a relational database
  • the XML model according to the definition of SCHEMA, the relational database XML model is mapped to the non-relational database XML model, and the corresponding mapping relationship is recorded in the mapping relationship table.
  • the mapping the relational database XML model to the non-relational database XML model includes: configuring the relational database XML model to be a normalized processing mode or a non-normalized processing mode, where
  • each table in the relational database is mapped to a column family in the non-relational database, and the corresponding mapping relationship is recorded in the mapping relationship table;
  • Step 103 Import the data of the relational database into the non-relational database XML model according to the mapping relationship table.
  • the method may further include: adding a definition of the non-relational data object table SCHEMA in the non-relational database; specifically: adding a SCHEMA constraint definition of a primary key of the column family; Add a SCHEMA constraint definition for a specific column of the column family; map the relational database table of one or more union primary keys to a super column family in a non-relational database.
  • the method may further include: establishing a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database, and recording the foregoing SCHEMA definition in the mapping relationship table. Mapping relations.
  • step 103 the data of the relational database is imported into the non-relational database according to the mapping relationship recorded in the mapping relationship table, and specifically includes:
  • the method may further include: optimizing the mapping relationship in the record in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode.
  • the embodiment of the invention provides a method for data migration between a relational database and a non-relational database, which can be used to migrate data of a traditional relational database to a non-relational database (such as an emerging Bigtable data model), thereby realizing data services. Smooth migration.
  • the data migration in the embodiment of the present invention is automatic, not only ensures the reliability of migration, but also improves the efficiency of data migration, thereby realizing smooth switching of services.
  • FIG. 2 a flowchart of a data migration method according to Embodiment 2 of the present invention is provided.
  • the method includes:
  • Step 201 Add a SCHEMA definition to the non-relational database
  • the non-relational database takes the class Bigtable data as an example, but is not limited thereto. That is to say, the SCHEMA mapping engine first adds the SCHEMA definition to the non-relational database of the Bigtable data model, and the specific process is:
  • Step 201 Establish a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database, and record the mapping relationship defined by the SCHEMA in the mapping relationship table;
  • mapping relationship between the relational table and the non-relational table established by the SCHEMA mapping engine is as shown in Table 1 to Table 3:
  • Step 203 Obtain SCHEMA information from a relational database, and map the SCHEMA information into an XML model.
  • the SCHEMA mapping engine first requests the SCHEMA information from the relational database and maps it to the XML model.
  • mapping relational database tables to standard XML models there are more than 4 methods for mapping relational database tables to standard XML models.
  • .net, Delphi, etc. all provide automatic conversion methods, basically one-to-one mapping.
  • the method provided by the embodiment of the present invention is not limited.
  • the mapping conversion rule is:
  • Step 204 Mapping the XML model into a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table;
  • This embodiment provides a configuration interface, which can configure the default mapping mode of the SCHEMA mapping engine to be a normalized processing mode or a non-normalized processing mode; and can also implement a customizable mapping process and align the mapping results.
  • each table in the relational database is mapped to a column family of non-relational databases.
  • the SCHEMA mapping engine sequentially scans the XML files generated by direct mapping, and maps each database db node scanned to a non-relational database Keyspace node with default attribute definitions, and these attributes contain at least the number of copies. , copy distribution strategy; map each table node scanned in a db into a column family node, the column family column type should be determined according to the column SCHEMA definition in the table, if the column definition contains the union field (join primary key) ), the column type is "super", otherwise it is "standard”.
  • the necessary mode attributes must be added.
  • the above process can be implemented by the following procedures, but is not limited thereto.
  • Strategy_class org.apache.cassandra.locator.SimpleStrategy
  • ⁇ columnfamily name "ispace_msg_recvState”
  • the first segment xml program is a relation table xml file directly mapped into a relational database table
  • the second segment is a non-relational table xml file to which a default attribute value is mapped; mapping into a non-relational table xml file Then you can directly map to non-relational Keyspace and columnfamily, and create a non-relational table accordingly.
  • mapping relationship table is created before starting the mapping process for each database, and the mapping relationship between the relational table and the non-relational table in each db is recorded.
  • mapping relationship is recorded in the mapping table in the data migration device. As shown in Table 5, Table 5
  • the relational data model design should follow the principle of minimizing data redundancy, that is, normalization.
  • the public data is all extracted and stored in a separate table, and other tables are associated with it.
  • Non-relational databases use distributed servers to form distributed clusters, have flexible scalability, allow data redundancy, and in order to improve search efficiency, data that can be stored in a table is generally stored in a table, so the relationship is In the process of mapping database tables to non-relational database tables, - -
  • mapping relationship table is created before starting the mapping process for each database, and the mapping relationship between the relational table and the non-relational table in each db is recorded. Each time the SCHEMA mapping engine completes a table mapping, the mapping relationship is recorded in the established mapping table.
  • the SCHEMA mapping engine sequentially scans the XML files generated by direct mapping, and maps each database db node scanned to a non-relational database Keyspace node with default attribute definitions, and these attributes contain at least the number of copies.
  • the column type of the column family needs to be determined according to the column SCHEMA definition in the table. If the column definition includes a union field (join primary key), the column type is "super", otherwise it is "standard”.
  • the necessary mode attributes which include at least the column sort type and the cache configuration; - -
  • Strategy_class org.apache.cassandra.locator.SimpleStrategy
  • ⁇ columnfamily name "ispace_msg_recvState”
  • Step 205 Generate a data definition command according to the non-relational database XML model.
  • Step 206 Send the data definition command to a non-relational database, and create a non-relational database. - - SCHEMA;
  • Step 207 Obtain a data set from the relational database.
  • Step 208 Import the data set into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table.
  • mapping relationship in the record in the mapping relationship table is optimized:
  • mapping relationship table can also be modified through the configuration interface, so that the specified part is denormalized/normalized under the condition that most of the execution of the normalized/non-normalized mapping is guaranteed.
  • the default mode of the configuration data migration device is SCHEMA mapping mode, the SCHEMA mapping engine completes the automatic SCHEMA mapping, generates the non-relational database XML file, and fills in the mapping relationship table;
  • mapping relationship table specify the partial table to perform the denormalization (normalized processing mode) / normalization (in the non-normalized processing mode) processing mode, and then configure the data migration device to map and migrate the mode, the SCHEMA mapping engine starts the automatic mapping, Generating a non-relational database XML file according to the already filled mapping table;
  • the trigger executor performs data migration according to the mapping relationship.
  • the configuration interface provided by the data migration device can also modify the default attribute definitions of Keyspace and column family to be tuned according to the needs of the service.
  • the specific execution process is as follows:
  • the configuration data migration device is in the SCHEMA mapping mode, the SCHEMA mapping engine automatically completes the data model mapping, generates the non-relational database XML file, and fills in the mapping relationship table;
  • the trigger executor migrates data according to the mapping relationship.
  • SCHEMA is mapped to various modes.
  • - The process of shooting is described in detail, as shown in the figure, including:
  • Step 301 Determine whether it is a normalization mode; if yes, go to step 302; otherwise, go to step 303;
  • Step 302 Set the SCHEMA mapping engine to the normalization mode
  • Step 303 Set the SCHEMA mapping engine to a denormalized mode
  • Step 304 The SCHEMA mapping engine determines the mapping mode. If it is the SCHEMA mapping mode, step 305 is performed: if it is the mapping and data migration mode, step 310 is performed;
  • Step 305 Obtain SCHEMA information from a relational database, and directly map the SCHEMA information into a relational data XML model;
  • Step 306 Map the relational data XML model to a non-relational data model XML according to a specification mode and a mapping relationship table configuration;
  • Step 307 Determine whether there is a corresponding item in the mapping relationship table, and if yes, go to step 308; otherwise, go to step 309;
  • Step 308 Perform mapping according to the configuration in the correspondence table, and end;
  • Step 309 Perform mapping according to the configuration in the specification mode, and fill in the mapping relationship correspondence table, and end;
  • Step 310 Obtain SCHEMA information from the relational database, and directly map the SCHEMA information into a relational data XML model;
  • Step 311 Mapping the relational data XML model into a non-relational data model XML according to a specification mode and a mapping relationship table configuration;
  • Step 312 Determine whether there is a corresponding item in the mapping relationship table, and if yes, go to step 313; otherwise, go to step 314;
  • Step 313 Perform mapping according to the configuration in the correspondence table, and then perform step 315;
  • Step 314 Perform mapping according to the configuration in the specification mode, and fill in the mapping relationship correspondence table, and then perform step 315;
  • Step 315 Trigger the executor to perform the data migration process.
  • Figure 3 depicts the SCHEMA mapping process from a relational database to a non-relational database.
  • the data import process is performed by an executor in the data migration device, including:
  • the executor issues a data definition command to the non-relational database, and creates a SCHEMA information in the non-relational database according to the non-relational database XML model generated by the SCHEMA mapping process described above;
  • the actuator sequential scan directly maps each table of the XML file, and looks at the mapping relationship table to determine whether the table does not need to be mapped. If not, ignore the table and continue scanning the next table; if this table is the last table , then end; if mapping is required, perform step 3);
  • FIG. 4 is a flowchart of data import according to an embodiment of the present invention, which specifically includes:
  • Step 401 Trigger an executor to perform data migration
  • Step 402 Create a non-relational data table by calling a non-relational database interface according to the non-relational data model XML.
  • Step 403 sequentially scan a table table directly mapping XML, and view the mapping relationship table, determine whether the table Table does not need to be mapped; if yes, execute step 410; otherwise, perform step 404; Step 404: determine whether the table Table is associated Table, if yes, go to step 405; otherwise, go to step 406;
  • Step 405 Generate SQL that extracts data from the source table and its associated table, and extracts the data set from the relational database;
  • Step 406 Generate a source table, extract data SQL, and extract a data set from the relational database.
  • Step 407 Generate a data import function to the non-relational database according to the corresponding non-relational data model XML;
  • Step 408 Loop out the data strip from the data set, and use the import function to import the data strip;
  • Step 409 Determine whether there is still a table needs to be scanned, and if so, return to step 403; No, go to 'J, go to step 411;
  • Step 410 Determine whether there is still a table to scan, and if yes, return to step 403; Step 411;
  • a data migration device is also provided in the embodiment of the present invention.
  • the structure of the data migration device is as shown in FIG. 5.
  • the device includes: a first acquiring unit 51, a mapping unit 52, and a data migration unit 53,
  • the first obtaining unit 51 is configured to obtain the relational database table SCHEMA information from the relational database.
  • the mapping unit 52 is configured to map the SCHEMA information into a non-relational database XML model, and in the mapping relationship table. Recording the corresponding mapping relationship;
  • the data migration unit 53 is configured to import the data of the relational database into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
  • the unit of the above device may be implemented by a processor, a memory or a special purpose circuit or the like.
  • the device may further include: a defining unit, connected to the first obtaining unit, configured to add a definition of the non-relational data object table SCHEMA in the non-relational database, specifically: adding a primary key to the column family SCHEMA constraint definition; adds SCHEMA constraint definitions for specific columns of the column family; maps one or more union primary key's relational database tables to super column families in non-relational databases.
  • a defining unit connected to the first obtaining unit, configured to add a definition of the non-relational data object table SCHEMA in the non-relational database, specifically: adding a primary key to the column family SCHEMA constraint definition; adds SCHEMA constraint definitions for specific columns of the column family; maps one or more union primary key's relational database tables to super column families in non-relational databases.
  • the device may further include: an establishing unit, connected to the mapping unit, configured to establish a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database.
  • an establishing unit connected to the mapping unit, configured to establish a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database.
  • the first obtaining unit includes: a first sending unit and a first receiving unit, where the first sending unit is configured to send a request for acquiring SCHEMA information to the relational database; the first receiving unit And the SCHEMA information for receiving the feedback of the relational database.
  • the mapping unit includes: a first mapping unit and a second mapping unit, where the first mapping unit is configured to map the SCHEMA information into a relational database XML model; - a second mapping unit, configured to map the relational database XML model to a non-relational database XML model according to the definition of SCHEMA, and record the corresponding mapping relationship in the mapping relationship table.
  • the second mapping unit further includes: a normalization processing mode mapping unit and/or a non-normalization processing mode mapping unit, where the normalization processing mode mapping unit is configured to configure the relational database XML model into a normalized processing mode, and Mapping each table in the relational database to a column family in the non-relational database, and recording a corresponding mapping relationship in the mapping relationship table; the denormalized processing mode mapping unit is configured to configure the relational database XML model For the non-normalized processing mode, the tables in multiple relational databases are mapped to a column family in the non-relational database, and the corresponding mapping relationship is recorded in the mapping relation table.
  • the device may further include: a configuration optimization unit, configured to be connected to the second mapping unit, configured to be in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode The mapping relationship in the record is optimized.
  • a configuration optimization unit configured to be connected to the second mapping unit, configured to be in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode The mapping relationship in the record is optimized.
  • the first acquiring unit includes: a scanning unit, a generating unit, and a data acquiring unit, wherein the scanning unit is configured to scan a non-relational database XML model and a mapping relationship table to obtain a scan result; a generating unit, configured to generate an SQL query statement according to the scan result, where the data acquiring unit is configured to obtain a data set from the relational database by using the SQL query statement.
  • the data migration unit includes: a generating unit, a creating unit, a second obtaining unit, and a data importing unit, wherein the generating unit is configured to generate a data definition command according to the non-relational database XML model;
  • the creating unit is configured to send the data definition command to a non-relational database to create a SCHEMA in a non-relational database;
  • the second obtaining unit is configured to obtain a data set from the relational database;
  • the data And an importing unit configured to import the data set into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table.
  • an embodiment of the present invention further provides a data migration system, and a schematic structural diagram thereof is shown in FIG. 6 .
  • the system comprises: at least one relational database (in the figure, the relational databases 61 and 62 are exemplified, but not limited thereto), and at least one non-relational database (in the figure, the non-relational databases 631 and 632 are taken as an example, but It is not limited to this and the data migration device 63.
  • the data migration device 63 is configured to obtain the relational database table SCHEMA information (such as the relational database 61) from the relational database; respectively map the SCHEMA information into a non-relational database XML model, and record correspondingly in the mapping relationship table.
  • SCHEMA information such as the relational database 61
  • mapping relationship data of a relational database (such as relational database 61) is imported into a non-relational database (such as non-relational database 631).
  • a relational database such as relational database 61
  • a non-relational database such as non-relational database 631.
  • the data of the non-relational database may be migrated to a plurality of non-relational databases, or the data in the plurality of relational databases may be migrated to a non-relational database, and the implementation process is similar. limit.
  • the data migration device in the system is the same as the data migration device in the foregoing embodiment, and is not described here.
  • the data migration apparatus in the embodiment of the present invention can implement the data migration requirement from the relational database to the non-relational database according to the modeling difference between the relational database and the non-relational database, and implements the multi-table from the relational database to the non-relational database.
  • Table mapping mechanism The traditional relational data model is designed to minimize data redundancy, that is, the principle of normalization. Public data is extracted and stored in a single table, and other tables are associated with it.
  • Non-relational databases use inexpensive servers to form distributed clusters, allowing data redundancy, and in order to improve search efficiency, data that can be integrated into a table is generally not stored in a table, so the mapping process from relational database tables to non-relational database tables In order to improve the operational efficiency of the data after migration, it is necessary to map multiple relational database tables into a non-relational database column family, that is, the principle of denormalization.
  • the apparatus of the embodiment of the present invention can automatically store the common table to the table where the foreign key is located. The operational efficiency of the data after migration and the convenient access mode are fully guaranteed.
  • FIG. 7 is a schematic structural diagram of a data migration system according to an embodiment of the present invention.
  • the system includes: at least one data relation library (in this embodiment, a data relation library is taken as an example) 71.
  • At least one non-data The relational library (this embodiment takes a non-data relational library as an example) 72, and the data migration means 73 respectively connected to the data relational library and the non-data relational library, but is not limited thereto.
  • the above means may be implemented by a processor, a memory or a special purpose circuit or the like.
  • the relational database 71 may be MySql, DB2, Oracle, etc., using a two-dimensional table to represent entities and their associations: using a table to represent a set of entities, a column to represent attributes, a table structure to represent a solid type ; Use specific redundancy information between tables to represent the connections between entities (primary keys, foreign keys).
  • the advantages are: integrity is easy to express; single, the concept of the table is intuitive, single, user-friendly; solid theoretical basis (relational algebra); non-procedural data request, request data can not specify the path; high data independence , users only need to ask "what to do", no need to explain "how to do”; support collection operations.
  • the non-relational database 72 may be a non-relational database, a cloud database, or a no sql database whose data model is a class Bigtable.
  • the non-relational database of the Bigtable data model is a cluster composed of inexpensive servers, and the cluster can self-organize and self-manage, and provide services as a whole.
  • Such databases are characterized by low cost, flexible scalability, mass storage, high concurrency, autonomous feature customization, and weak affinity.
  • the data migration device 73 may be a hardware device or a software device, and is used to implement a data mapping and migration process between the relational database and the non-relational database of the Bigtable data model. The specific process is to obtain the SCHEMA information from the relational database, map it to the non-relational database SCHEMA, and extract the data from the relational database according to the mapping relationship to import into the non-relational database.
  • the extracting the data from the relational database according to the mapping relationship into the non-relational database includes: generating a data definition command according to the non-relational database XML model; sending the data definition command to the non-relational database, creating SCHEMA in a non-relational database; obtaining a data set from the relational database; importing the data set into the SCHEMA of the non-relational database according to a corresponding mapping relationship recorded in the mapping relationship table.
  • the data migration device 73 includes: a first obtaining unit 731, configured to obtain a relational database table SCHEMA information from a relational database; the specific acquisition process is as described above, and details are not described herein; the SCHEMA mapping engine (ie, mapping) a unit 732, configured to map the SCHEMA information into a non-relational database XML model; an executor (ie, a data migration unit) 733, configured to import the data of the relational database into the non-relational database XML model according to the mapping relationship table in.
  • a first obtaining unit 731 configured to obtain a relational database table SCHEMA information from a relational database
  • the specific acquisition process is as described above, and details are not described herein
  • the SCHEMA mapping engine ie, mapping
  • a unit 732 configured to map the SCHEMA information into a non-relational database XML model
  • an executor ie, a data migration unit
  • the data migration device 73 may further include a mapping relationship table 730, which is established by the establishing unit; the mapping relationship table records mapping the SCHEMA information into a non-relational database XML - - The mapping relationship of the model.
  • the data migration device 73 may further include a definition unit for adding a non-relational data object table, a definition of SCHEMA, and the like in the non-relational database.
  • the device may further include: a configuration optimization unit, configured to optimize the mapping relationship in the record in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode, where the configuration may be specifically configured Interface 734.
  • a configuration optimization unit configured to optimize the mapping relationship in the record in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode, where the configuration may be specifically configured Interface 734.
  • the embodiment of the invention provides a method, a device and a system for data migration between a relational database and a non-relational database, which can be used for data migration between a traditional relational database and a non-relational database of a Bigtable data model.
  • the service can perform data migration in a reliable, fast, and convenient manner, smoothly transition to a non-relational database, and utilize a non-relational database for low cost, flexible scalability, and high High efficiency and other advantages enhance the competitiveness of the business.
  • the business data in the database can be switched to the non-relational database of the Bigtable data model at any time, and the entire data migration process is automatic, which also saves cost and reduces error rate, and realizes Smooth migration of business data.
  • the data migration device further provides a configuration interface, which can customize the data migration mode, and optimize the data table according to the service requirement, and also modify the mapping relationship table through the configuration interface, thereby adding more Attributes that implement more custom mappings.
  • This configurable data migration process enables the business to migrate data from a relational database to a non-relational database, and then migrate data according to the modeling characteristics of the non-relational database, giving full play to the advantages of the non-relational database and improving the migrated data. Access efficiency.
  • the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform.
  • the technical solution of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (for example, may be a read only memory (ROM), a USB flash drive, a mobile hard disk, a random access memory (RAM), a disk or an optical disk, etc., which can store program code, etc., including a plurality of instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the present
  • ROM read only memory
  • USB flash drive a mobile hard disk
  • RAM random access memory
  • disk or an optical disk etc.
  • the disclosed systems, devices, and methods may be implemented in other ways without departing from the spirit and scope of the application.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed in the present invention are a data migration method, a data migration device and a data migration system. The method comprises: obtaining relational database table SCHEMA information from a relational database (101); mapping the SCHEMA information to a non-relational database XML model, and recording the corresponding mapping relation in a mapping relation table (102); loading the data in the relational database into the non-relational database XML model according to the mapping relation table. The technical problem of smoothly migrating the data in the relational database into the non-relational database is resolved, and the smooth conversion of service data is realized.

Description

一 一 一种数据迁移方法、 数据迁移装置及数据迁移系统 技术领域  Data migration method, data migration device and data migration system
本发明涉及数据处理技术领域,特别涉及一种数据迁移方法、数据迁移装 置及数据迁移系统。  The present invention relates to the field of data processing technologies, and in particular, to a data migration method, a data migration device, and a data migration system.
背景技术 Background technique
随着数据库应用范围的扩大, 关系数据库的功能得到扩展,但是复杂度和 使用成本也随之大幅提高。很多应用并不需要关系数据库的复杂功能, 同时受 关系数据库的数据模型限制而无法针对性地优化。 特别是随着 web2.0业务的 发展和网络内容的暴增,对数据库系统产生了新的需求, 这些需求要求数据库 具有海量存储与并发、 弹性扩展、 高可靠、 高可用、 低成本、 弹性表结构等特 征, 但是, 传统的关系数据库无法实现这些特征。 基于此, 业界提出了各种 no sql 非关系数据库,这类数据库具有自组织、 自管理、低成本、弹性可扩展、 海量存储、 高并发访问、 查询关系筒单等特性。 出于成本、 可扩展性、 效率、 自主功能定制等方面的考虑,当前很多业务都希望尽可能将关系数据库中的数 据切换到非关系数据库。 但是, 由于数据模型的差异, 关系数据库中的数据无 法直接迁移到非关系数据库。  As the scope of database applications expands, the functionality of relational databases is expanded, but the complexity and cost of use are also greatly increased. Many applications do not require the complex functions of a relational database, and are not limited by the data model of the relational database. Especially with the development of web2.0 services and the proliferation of network content, new demands have arisen on database systems, which require massive storage and concurrency, flexible expansion, high reliability, high availability, low cost, and flexible tables. Features such as structure, however, traditional relational databases cannot implement these features. Based on this, the industry has proposed various no sql non-relational databases, such as self-organizing, self-management, low cost, flexible scalability, mass storage, high concurrent access, and query relationship. Due to cost, scalability, efficiency, and customization of autonomous functions, many businesses currently want to switch data in a relational database to a non-relational database as much as possible. However, due to differences in data models, data in relational databases cannot be migrated directly to non-relational databases.
在对现有技术的研究和实践过程中, 本发明的发明人发现, 目前业界需要 一种实现关系数据库与非关系数据库之间的数据模型的映射。  In the course of research and practice of the prior art, the inventors of the present invention have found that there is a need in the industry for a mapping of a data model between a relational database and a non-relational database.
发明内容 Summary of the invention
有鉴于此, 本发明实施例提供一种数据迁移方法、 装置及数据迁移系统, 可以把关系数据库中的数据平滑迁移到非关系数据库中。  In view of this, the embodiment of the present invention provides a data migration method, device, and data migration system, which can smoothly migrate data in a relational database to a non-relational database.
本发明实施例提供一种数据迁移的方法, 所述方法包括:  An embodiment of the present invention provides a data migration method, where the method includes:
从关系数据库中获取关系数据库表 SCHEMA信息;  Obtain the relational database table SCHEMA information from the relational database;
将所述 SCHEMA信息映射成非关系数据库 XML模型, 并在映射关系表 中记录对应的映射关系;  Mapping the SCHEMA information into a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table;
按照所述映射关系表中记录的映射关系,将关系数据库的数据导入非关系 数据库中。  The data of the relational database is imported into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
本发明实施例还提供一种数据迁移装置, 所述装置包括:  The embodiment of the invention further provides a data migration device, the device comprising:
第一获取单元,用于从关系数据库中获取关系数据库库表 SCHEMA信息; - - 映射单元, 用于将所述 SCHEMA信息映射成非关系数据库 XML模型, 并在映射关系表中记录对应的映射关系; a first obtaining unit, configured to obtain a relational database library table SCHEMA information from a relational database; a mapping unit, configured to map the SCHEMA information into a non-relational database XML model, and record a corresponding mapping relationship in the mapping relationship table;
数据迁移单元, 用于按照所述映射关系表中记录的映射关系, 将关系数据 库的数据导入带非关系数据库中。  The data migration unit is configured to import the data of the relational database into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
本发明实施例再提供一种数据迁移系统,至少包括一个关系数据库和一个 非关系数据库, 还包括: 数据迁移装置, 用于从关系数据库中获取关系数据库 库表 SCHEMA信息; 将所述 SCHEMA信息映射成非关系数据库 XML模型, 并在映射关系表中记录对应的映射关系;按照所述映射关系表中记录的映射关 系, 将关系数据库的数据导入带非关系数据库中。  The embodiment of the present invention further provides a data migration system, including at least one relational database and one non-relational database, and further comprising: a data migration device, configured to obtain a relational database library table SCHEMA information from a relational database; and map the SCHEMA information The non-relational database XML model is formed, and the corresponding mapping relationship is recorded in the mapping relationship table; according to the mapping relationship recorded in the mapping relationship table, the data of the relational database is imported into the non-relational database.
由上述可知,本发明实施例提出了一种关系数据库与非关系数据库间数据 迁移的方法、数据迁移装置及数据迁移系统, 可以用于把传统关系数据库的数 据迁移到非关系数据库等中, 实现了数据业务的平滑迁移。本发明实施例中的 数据迁移是自动的、 不但保证了迁移的可靠性, 还提高了数据迁移的效率, 从 而实现了业务的平滑切换。  It can be seen from the above that the embodiment of the present invention provides a method for data migration between a relational database and a non-relational database, a data migration device, and a data migration system, which can be used to migrate data of a traditional relational database to a non-relational database. Smooth migration of data services. The data migration in the embodiment of the present invention is automatic, not only ensures the reliability of migration, but also improves the efficiency of data migration, thereby achieving smooth switching of services.
附图说明 DRAWINGS
图 1为本发明实施例 1提供的一种数据迁移的方法的流程图;  1 is a flowchart of a data migration method according to Embodiment 1 of the present invention;
图 2为本发明实施例 2提供的一种数据迁移的方法的流程图;  2 is a flowchart of a method for data migration according to Embodiment 2 of the present invention;
图 3为本发明实施例提供的一种各种模式下 SCHEMA映射的流程图; 图 4为本发明实施例提供的一种数据导入流程的流程图;  FIG. 3 is a flowchart of a SCHEMA mapping in various modes according to an embodiment of the present invention; FIG. 4 is a flowchart of a data importing process according to an embodiment of the present invention;
图 5为本发明实施例提供的一种数据迁移装置的结构示意图;  FIG. 5 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present disclosure;
图 6为本发明实施例提供饿一种数据迁移系统的结构示意图;  FIG. 6 is a schematic structural diagram of a data migration system according to an embodiment of the present invention; FIG.
图 7为本发明实施例提供饿一种数据迁移系统的应用实例结构图。  FIG. 7 is a structural diagram of an application example of providing a data migration system according to an embodiment of the present invention.
具体实施方式 detailed description
为了使本技术领域的人员更好地理解本发明实施例的方案,下面结合附图 和实施方式对本发明实施例作进一步的详细说明。  The embodiments of the present invention are further described in detail below with reference to the accompanying drawings and embodiments.
请参阅图 1 , 为本发明实施例 1提供一种数据迁移方法的流程图, 所述方法 包括:  Referring to FIG. 1 , a flowchart of a data migration method according to Embodiment 1 of the present invention is provided. The method includes:
步骤 101: 从关系数据库中获取关系数据库表 SCHEMA信息; - - 一种获取的过程是, SCHEMA映射引擎先向所述关系数据库中发送获取 SCHEMA信息的请求; 接收所述关系数据库反馈的所述 SCHEMA信息。 Step 101: Obtain a relational database table SCHEMA information from a relational database; - an acquisition process in which the SCHEMA mapping engine first sends a request for obtaining SCHEMA information to the relational database; receiving the SCHEMA information fed back by the relational database.
步骤 102: 将所述 SCHEMA信息映射成非关系数据库 XML模型, 并在 映射关系表中记录对应的映射关系;  Step 102: Mapping the SCHEMA information into a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table;
也就是说, SCHEMA映射引擎将所述 SCHEMA信息映射成关系数据库 That is, the SCHEMA mapping engine maps the SCHEMA information to a relational database
XML模型; 按照 SCHEMA的定义, 将所述关系数据库 XML模型映射为非关 系数据库 XML模型, 并在映射关系表中记录对应的映射关系。 The XML model; according to the definition of SCHEMA, the relational database XML model is mapped to the non-relational database XML model, and the corresponding mapping relationship is recorded in the mapping relationship table.
其中,将所述关系数据库 XML模型映射为非关系数据库 XML模型包括: 将所述关系数据库 XML模型配置为规范化处理模式或者非规范化处理模式, 其中,  The mapping the relational database XML model to the non-relational database XML model includes: configuring the relational database XML model to be a normalized processing mode or a non-normalized processing mode, where
当配置为规范化处理模式时,将关系数据库中的每个表都映射为非关系数 据库中一个 column family , 并在映射关系表中记录对应的映射关系;  When configured as a normalization processing mode, each table in the relational database is mapped to a column family in the non-relational database, and the corresponding mapping relationship is recorded in the mapping relationship table;
当配置为非规范化处理模式时,将多个关系数据库中的表映射为非关系数 据库中一个 column family。  When configured as a denormalized processing mode, maps tables in multiple relational databases to a column family in a non-relational database.
步骤 103: 按照所述映射关系表, 将关系数据库的数据导入带非关系数据 库 XML模型中。  Step 103: Import the data of the relational database into the non-relational database XML model according to the mapping relationship table.
优选的, 在上述实施例的步骤 101之前, 所述方法还可以包括: 在所述非 关系数据库中增加非关系数据对象表 SCHEMA 的定义; 具体包括: 增加对 column family的主键的 SCHEMA约束定义; 增加对 column family的具体列 的 SCHEMA约束定义; 将一个或多个联合主键的关系数据库表中映射为非关 系数据库中的 super column family。  Preferably, before the step 101 of the foregoing embodiment, the method may further include: adding a definition of the non-relational data object table SCHEMA in the non-relational database; specifically: adding a SCHEMA constraint definition of a primary key of the column family; Add a SCHEMA constraint definition for a specific column of the column family; map the relational database table of one or more union primary keys to a super column family in a non-relational database.
优选的, 在上述实施例的步骤 101之前, 所述方法还可以包括: 建立关系 数据库中的关系表与非关系数据库的非关系表的映射关系表,并在映射关系表 中记录上述 SCHEMA定义的映射关系。  Preferably, before the step 101 of the foregoing embodiment, the method may further include: establishing a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database, and recording the foregoing SCHEMA definition in the mapping relationship table. Mapping relations.
其中, 步骤 103中, 按照所述映射关系表中记录的映射关系, 将关系数据 库的数据导入带非关系数据库中具体包括:  In step 103, the data of the relational database is imported into the non-relational database according to the mapping relationship recorded in the mapping relationship table, and specifically includes:
根据所述非关系数据库 XML模型生成数据定义命令; 向非关系数据库发 - - 送所述数据定义命令, 创建非关系数据库中的 SCHEMA; 从所述关系数据库 中获取数据集: 具体包括: 扫描非关系数据库 XML模型和映射关系表, 生成 SQL查询语句, 利用所述 SQL查询语句从所述关系数据库中获取数据集; 根 据所述映射关系表中记录的对应映射关系将所述数据集导入所述非关系数据 库的 SCHEMA中。 优选的,在步骤 103之后,所述方法还可以包括:在所述关系数据库 XML 模型配置为规范化处理模式或者非规范化处理模式时,对映射关系表中记录中 的映射关系进行优化配置。 Generating a data definition command according to the non-relational database XML model; sending to a non-relational database - - sending the data definition command to create SCHEMA in a non-relational database; obtaining a data set from the relational database: specifically: scanning a non-relational database XML model and a mapping relation table, generating a SQL query statement, using the SQL The query statement obtains the data set from the relational database; and imports the data set into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table. Preferably, after the step 103, the method may further include: optimizing the mapping relationship in the record in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode.
本发明实施例提出了一种关系数据库与非关系数据库间数据迁移的方法, 可以用于把传统关系数据库的数据迁移到非关系数据库 (比如新兴的类 Bigtable数据模型)等中, 实现了数据业务的平滑迁移。 本发明实施例中的数 据迁移是自动的、 不但保证了迁移的可靠性, 还提高了数据迁移的效率, 从而 实现了业务的平滑切换。  The embodiment of the invention provides a method for data migration between a relational database and a non-relational database, which can be used to migrate data of a traditional relational database to a non-relational database (such as an emerging Bigtable data model), thereby realizing data services. Smooth migration. The data migration in the embodiment of the present invention is automatic, not only ensures the reliability of migration, but also improves the efficiency of data migration, thereby realizing smooth switching of services.
还请参阅图 2, 为本发明实施例 2提供一种数据迁移方法的流程图, 所述 方法包括:  Referring to FIG. 2, a flowchart of a data migration method according to Embodiment 2 of the present invention is provided. The method includes:
步骤 201: 在非关系数据库中增加 SCHEMA定义;  Step 201: Add a SCHEMA definition to the non-relational database;
在该实施例中, 非关系数据库以类 Bigtable数据为例, 但并不限于此, 也 就是说, SCHEMA映射引擎先在类 Bigtable数据模型的非关系数据库中增加 SCHEMA定义, 其具体的过程为:  In this embodiment, the non-relational database takes the class Bigtable data as an example, but is not limited thereto. That is to say, the SCHEMA mapping engine first adds the SCHEMA definition to the non-relational database of the Bigtable data model, and the specific process is:
由于目前的类 Bigtable数据模型的非关系数据库只能定义 Keyspace(键值 空间)和 column family (歹 ll族), 从概念上这两个定义可以对应关系数据库中 的 db (数据库)和表 Table。 为了实现数据库中的关系表到非关系数据库中的 非关系表的映射, 需要在非关系数据库中增加非关系数据库表的 SCHEMA约 束定义, 具体的定义过程为:  Since the current non-relational database of the Bigtable data model can only define Keyspace (key-value space) and column family (歹 ll family), these two definitions can conceptually correspond to db (database) and table Table in relational database. In order to realize the mapping of relational tables in the database to non-relational tables in non-relational databases, it is necessary to add the SCHEMA constraint definition of non-relational database tables in non-relational databases. The specific definition process is:
首先, 增加对 column family的主键( row key ) 的 SCHEMA约束定义, 对应关系数据库的主键定义;  First, increase the SCHEMA constraint definition for the column family's primary key (row key), corresponding to the primary key definition of the relational database;
然后, 增加 column family下具体列的 SHCEMA约束定义, 即定义一个 - - column family下具体有哪些列及其列名、 类型、 长度、 是否可以为空、 默认值 等, 对应关系数据库的列 SCHEMA定义; Then, increase the SHCEMA constraint definition for the specific column under the column family, that is, define a - - column column specific column and its column name, type, length, whether it can be empty, default value, etc., corresponding to the relational database column SCHEMA definition;
最后,为了将一个或多个联合主键的关系数据库表中映射为非关系数据库 中的一个超级列族( super column family ),需要增加关系数据库表转换为 super column family的约束定义, 需要定义 super column的约束。在关系数据库表的 SCHMEMA 定义中, 当只有一个联合主键时, 联合主键的值映射为 super column 的名; 当有两个以上联合主键定义时, 把联合主键的值进行级联拼接 后映射为 super column的名, 级联的顺序可以指定, 级联字段越靠前, 查询时 对其搜索的速度越快。  Finally, in order to map a relational database table of one or more federated primary keys to a super column family in a non-relational database, it is necessary to increase the constraint definition of the relational database table to be converted into a super column family. Constraint. In the SCHMEMA definition of a relational database table, when there is only one union primary key, the value of the union primary key is mapped to the name of the super column; when there are more than two union primary key definitions, the value of the union primary key is cascaded and mapped to super The name of the column, the order of the cascading can be specified, the higher the cascading field, the faster the query will search for it.
步骤 201: 建立关系数据库中的关系表与非关系数据库的非关系表的映射 关系表, 并在映射关系表中记录上述 SCHEMA定义的映射关系;  Step 201: Establish a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database, and record the mapping relationship defined by the SCHEMA in the mapping relationship table;
其中, SCHEMA 映射引擎建立的所述关系表与非关系表的映射关系如表 1至表 3所示:  The mapping relationship between the relational table and the non-relational table established by the SCHEMA mapping engine is as shown in Table 1 to Table 3:
表 1 :  Table 1 :
用户基本信息表 i space— user— info  User basic information table i space— user— info
Figure imgf000007_0002
Figure imgf000007_0001
Figure imgf000007_0002
Figure imgf000007_0001
ispace_user_info  Ispace_user_info
Figure imgf000007_0003
Figure imgf000007_0003
表 2:  Table 2:
统一消息表 ispace message info  Unified message table ispace message info
字段 类型 长度 描述信息  Field Type Length Description Information
# userid Varchar2 20  # userid Varchar2 20
# m sg id Varchar2 40 - - # m sg id Varchar2 40 - -
Figure imgf000008_0002
Figure imgf000008_0001
Figure imgf000008_0002
Figure imgf000008_0001
Ispace_message_info  Ispace_message_info
userid Userid
Figure imgf000008_0003
Figure imgf000008_0003
表 3:  table 3:
统一消息状态报告表 i space— message— recv n o o 〇  Unified Messaging Status Report Table i space— message— recv n o o 〇
Figure imgf000008_0004
Figure imgf000008_0004
Ispace晷_message_recv Ispace晷_message_recv
userid Userid
userid recvl/001 recv2/001 recvl/002 rec 001 (superCol) (superCol) (superCol) (su  Userid recvl/001 recv2/001 recvl/002 rec 001 (superCol) (superCol) (superCol) (su
state state state state val val val val userid  State state state state val val val val userid
002 步骤 203: 向关系数据库获取 SCHEMA信息,并把所述 SCHEMA信息映 射成 XML模型; 002 Step 203: Obtain SCHEMA information from a relational database, and map the SCHEMA information into an XML model.
也就是说,在启动 SCHEMA映射时, SCHEMA映射引擎首先会从关系数 据库中请求获取 SCHEMA信息, 并把它映射为 XML模型。  That is, when starting the SCHEMA mapping, the SCHEMA mapping engine first requests the SCHEMA information from the relational database and maps it to the XML model.
其中,把关系数据库表映射到标准的 XML模型有 4艮多方法,如. net、 Delphi 等都提供了自动转换的方式, 基本上是一一映射, 当然, 也可以参考其实现或 直接调用所提供的方法, 本发明实施例不作限制, 在该实施例中, 映射的转换 规则为: 数据库对应 XML的 db节点, 节点内包含此数据库内所有 Table的描 述信息; 每一个关系表对应 XML的一个 table节点, 节点内包含此表中每个 行的 SCHEMA信息; 表内的每一行对应 XML的一个 column节点, 节点内一 一映射的描述了相应关系表中每一行的 SCHEMA, 其中此 column为主键, 则 增力口 isRowKey = true, :¾口果 J¾I column为联合主键,贝1 J增力口 isUnionKey = tme。 Among them, there are more than 4 methods for mapping relational database tables to standard XML models. For example, .net, Delphi, etc. all provide automatic conversion methods, basically one-to-one mapping. Of course, you can also refer to their implementation or direct call. The method provided by the embodiment of the present invention is not limited. In this embodiment, the mapping conversion rule is: The database corresponds to the XML db node, and the node contains description information of all Tables in the database; each relationship table corresponds to one of the XML A table node, the node contains the SCHEMA information of each row in the table; each row in the table corresponds to a column node of the XML, and the one-to-one mapping in the node describes the SCHEMA of each row in the corresponding relation table, wherein the column is the primary key , then the booster port isRowKey = true, :3⁄4 mouth J3⁄4I column is the joint primary key, and the shell 1 J booster port isUnionKey = tme.
比如, 统一消息状态报告表如表 4所示,  For example, the Unified Messaging Status Report Table is shown in Table 4.
表 4  Table 4
消息状态报告表 i space— message— recv  Message status report table i space— message— recv
Figure imgf000009_0001
上述表 4可以通过下述程序来实现:
Figure imgf000009_0001
Table 4 above can be implemented by the following procedure:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<db name = "messagedb">  <db name = "messagedb">
<table name = "ispace_message_recvState">  <table name = "ispace_message_recvState">
<column name = "userid" type = "varchar2" length = 20 nullable = false isRowKey = true /> - - <column name = "userid" type = "varchar2" length = 20 nullable = false isRowKey = true /> - -
<column name = "msgid" type = "varchar2" length = 40 nullable = false isUnionKey = true /> <column name = "msgid" type = "varchar2" length = 40 nullable = false isUnionKey = true />
<column name = "recv" type = "varchar2" length = 40 nullable = false isUnionKey = true />  <column name = "recv" type = "varchar2" length = 40 nullable = false isUnionKey = true />
<column name = "state" type = "number" length = 1 nullable = true defaultValue = 0 />  <column name = "state" type = "number" length = 1 nullable = true defaultValue = 0 />
</table>  </table>
</db>  </db>
步骤 204: 将 XML模型映射成非关系数据库 XML模型, 并在映射关系 表中记录对应的映射关系;  Step 204: Mapping the XML model into a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table;
本实施例提供一个配置接口, 可配置 SCHEMA映射引擎的默认映射模式 为规范化处理模式或非规范化处理模式;还可以实现可定制的映射过程和对映 射结果进行调优。  This embodiment provides a configuration interface, which can configure the default mapping mode of the SCHEMA mapping engine to be a normalized processing mode or a non-normalized processing mode; and can also implement a customizable mapping process and align the mapping results.
1 ) 配置 SCHEMA映射引擎的默认映射模式为规范化处理模式  1) Configure the default mapping mode of the SCHEMA mapping engine to be normalized processing mode
首先, 当 SCHEMA映射引擎配置为规范化处理模式时, 关系数据库中的 每个表都映射为非关系数据库的一个 column family„  First, when the SCHEMA mapping engine is configured to normalize processing mode, each table in the relational database is mapped to a column family of non-relational databases.
根据非关系数据库的 SCHEMA定义, SCHEMA映射引擎顺序扫描直接映 射生成的 XML文件, 对扫描到的每个数据库 db节点映射成非关系数据库的 Keyspace 节点并加上默认属性定义, 这些属性至少包含副本数、 副本分布策 略; 对在一个 db内扫描到的每一个 table节点映射成一个 column family节点, column family的列类型需根据表内的列 SCHEMA定义来决定, 如果列定义中 包含联合字段(联合主键),则列类型为 "super" ,否则为 "standard" ,—个 table 节点映射成一个 column family节点时, 还需加上必要的模式属性, 这些属性 至少包含列排序类型、緩存配置等;对一个 table节点内扫描到的每一个 column 节点直接映射成 column节点,如果某 column节点为联合主键, 则在非关系数 据库 XML描述为 isKey = true, 并把第一个扫描到的联合主键加上 isPrefix = true , 其它联合主键 isPrefix = false。 - - 上述过程可以下述程序来实现, 但并不限于此。 According to the SCHEMA definition of the non-relational database, the SCHEMA mapping engine sequentially scans the XML files generated by direct mapping, and maps each database db node scanned to a non-relational database Keyspace node with default attribute definitions, and these attributes contain at least the number of copies. , copy distribution strategy; map each table node scanned in a db into a column family node, the column family column type should be determined according to the column SCHEMA definition in the table, if the column definition contains the union field (join primary key) ), the column type is "super", otherwise it is "standard". When a table node is mapped into a column family node, the necessary mode attributes must be added. These attributes include at least the column sort type, cache configuration, etc. Each column node scanned in a table node is directly mapped into a column node. If a column node is a union primary key, the non-relational database XML is described as isKey = true, and the first scanned joint primary key is added to the isPrefix. = true , other union primary keys isPrefix = false. - - The above process can be implemented by the following procedures, but is not limited thereto.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<db name = "messagedb">  <db name = "messagedb">
<table name = "ispace_message_recvState">  <table name = "ispace_message_recvState">
<column name = "userid" type = "varchar2" length = 20 nullable = false isRowKey = true />  <column name = "userid" type = "varchar2" length = 20 nullable = false isRowKey = true />
<column name = "msgid" type = "varchar2" length = 40 nullable = false isUnionKey = true />  <column name = "msgid" type = "varchar2" length = 40 nullable = false isUnionKey = true />
<column name = "recv" type = "varchar2" length = 40 nullable = false isUnionKey = true />  <column name = "recv" type = "varchar2" length = 40 nullable = false isUnionKey = true />
<column name = "state" type = "number" length = 1 nullable = true defaultValue = 0 />  <column name = "state" type = "number" length = 1 nullable = true defaultValue = 0 />
</table>  </table>
</db>  </db>
由上述程序可以得到下述程序:  The following procedure can be obtained by the above procedure:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
< keyspace name = "messagedb"  < keyspace name = "messagedb"
replication—factor = 3  Replication—factor = 3
strategy_class="org.apache.cassandra.locator.SimpleStrategy"> <columnfamily name = "ispace_msg_recvState"  Strategy_class="org.apache.cassandra.locator.SimpleStrategy"> <columnfamily name = "ispace_msg_recvState"
ColumnType = "Super"  ColumnType = "Super"
Compare With = "BytesType"  Compare With = "BytesType"
CompareSubcolumnsWith = "BytesType"  CompareSubcolumnsWith = "BytesType"
KeysCached="50%"  KeysCached="50%"
RowsCached=" 10000" >  RowsCached=" 10000" >
<column name ="userid" isRowKey = "true" type = "string" length = 20 nullable=" false" /> - - <column name ="userid" isRowKey = "true" type = "string" length = 20 nullable="false"/> - -
<column name ="msgid" isKey = "true" isPrefix = "true" type = "string" length = 40 nullable=" false" /> <column name ="msgid" isKey = "true" isPrefix = "true" type = "string" length = 40 nullable=" false" />
<column name ="recv" isKey = "true" isPrefix = "false" type = "string" length = 40 nullable=" false" />  <column name ="recv" isKey = "true" isPrefix = "false" type = "string" length = 40 nullable=" false" />
<column name =,,state,, type= "number" length = 1 nullable= true default=0 />  <column name =,,state,, type= "number" length = 1 nullable= true default=0 />
< /columnfamily>  < /columnfamily>
< /keyspaco < /keyspaco
上述程序段中,第一段 xml程序为关系数据库表直接映射成的关系表 xml 文件, 第二段为加上了默认属性值映射成的的非关系表 xml文件; 映射成非关 系表 xml文件后就可以直接映射成非关系 Keyspace和 columfamily, 并据此创 建非关系表。  In the above program segment, the first segment xml program is a relation table xml file directly mapped into a relational database table, and the second segment is a non-relational table xml file to which a default attribute value is mapped; mapping into a non-relational table xml file Then you can directly map to non-relational Keyspace and columnfamily, and create a non-relational table accordingly.
其次, 启动对每个数据库的映射过程前新建一张映射关系表, 记录每个 db中关系表与非关系表之间的映射关系。 SCHEMA映射引擎每完成一个 table 的映射, 则在数据迁移装置中的映射关系表中记录映射关系。 如表 5所示, 表 5  Secondly, a new mapping relationship table is created before starting the mapping process for each database, and the mapping relationship between the relational table and the non-relational table in each db is recorded. Each time the SCHEMA mapping engine completes a table mapping, the mapping relationship is recorded in the mapping table in the data migration device. As shown in Table 5, Table 5
Figure imgf000012_0001
Figure imgf000012_0001
2 ) 配置 SCHEMA映射引擎的默认映射模式为非规范化处理模式  2) Configure the default mapping mode of the SCHEMA mapping engine to be denormalized processing mode
本实施例中, 关系数据模型设计时应遵循尽量减少数据冗余, 即规范化的 原则。公用数据全部提取出来单独存放在一个表中,其他表和它建立外键关联。 而非关系数据库由于使用廉价服务器构成分布式集群, 具有很好的弹性扩展 性, 允许数据冗余, 而且为了提高查找效率, 能整合在一个表中存放的数据一 般不分表存放, 所以从关系数据库表到非关系数据库表的映射过程中, 为了提 - - 高迁移后数据的操作效率, 满足非关系数据库建模的原则, 需要把多个关系数 据库表映射成一个非关系数据库 column family,即进行非规范化处理或冗余化 处理。 In this embodiment, the relational data model design should follow the principle of minimizing data redundancy, that is, normalization. The public data is all extracted and stored in a separate table, and other tables are associated with it. Non-relational databases use distributed servers to form distributed clusters, have flexible scalability, allow data redundancy, and in order to improve search efficiency, data that can be stored in a table is generally stored in a table, so the relationship is In the process of mapping database tables to non-relational database tables, - - The operational efficiency of data after high migration, to meet the principle of non-relational database modeling, it is necessary to map multiple relational database tables into a non-relational database column family, that is, denormalized or redundant processing.
也就是说, 当配置映射默认模式为非规范化模式时, SCHEMA映射引擎 执行时,应去掉关系表中的所有外键,把公用表中的数据分散存放到外键所在 的表中。  That is to say, when the configuration mapping default mode is denormalized mode, when the SCHEMA mapping engine is executed, all foreign keys in the relational table should be removed, and the data in the common table should be distributed to the table where the foreign key is located.
同样, 启动对每个数据库的映射过程前新建一张映射关系表, 记录每个 db中关系表与非关系表之间的映射关系。 SCHEMA映射引擎每完成一个 table 的映射, 则在建立的映射关系表中记录映射关系。  Similarly, a mapping relationship table is created before starting the mapping process for each database, and the mapping relationship between the relational table and the non-relational table in each db is recorded. Each time the SCHEMA mapping engine completes a table mapping, the mapping relationship is recorded in the established mapping table.
根据非关系数据库的 SCHEMA定义, SCHEMA映射引擎顺序扫描直接映 射生成的 XML文件, 对扫描到的每个数据库 db节点映射成非关系数据库的 Keyspace 节点并加上默认属性定义, 这些属性至少包含副本数、 副本分布策 略; 对在一个 db内扫描到的每一个 table节点检查是否有 isForeignKey = true 的列, 如果有, 则首先在映射关系表中对应的行的 "关联表" 这一列填上外键 引用的表, 并在外键引用表所在行的 "无需映射" 这一列赋为 true, 具体表 6 所示; 如果没有, 则参照规范化处理方式执行一对一映射。  According to the SCHEMA definition of the non-relational database, the SCHEMA mapping engine sequentially scans the XML files generated by direct mapping, and maps each database db node scanned to a non-relational database Keyspace node with default attribute definitions, and these attributes contain at least the number of copies. , copy distribution strategy; check whether there is a isForeignKey = true column in each table node scanned in a db, if there is, first fill in the foreign key in the "association table" column of the corresponding row in the mapping relationship table The referenced table, and the "no mapping" column in the row of the foreign key reference table is assigned to true, as shown in Table 6; if not, the one-to-one mapping is performed with reference to the normalization processing.
表 6  Table 6
Figure imgf000013_0001
Figure imgf000013_0001
其中, 在该实施例中, column family的列类型需根据表内的列 SCHEMA 定义来决定, 如果列定义中包含联合字段(联合主键), 则列类型为 "super" , 否则为 "standard" , —个 table节点映射成一个 column family节点时还需加上 必要的模式属性, 这些属性至少包含列排序类型、 緩存配置; 对一个 table节 - - 点内扫描到的每一个 column节点直接映射成 column节点, 如果某 column节 点为联合主键, 则在非关系数据库 XML描述为 isKey = tme, 并把第一个扫描 到的联合主键加上 isPrefix = true, 其它联合主键 isPrefix = false。 如果检查到 在映射关系表中,正在执行映射的这个表有关联表, 则把关联表中的所有列作 为普通的列映射到非关系数据库 XML文件中, 并取消原来的外键定义。 该过 程可以对程序 1和程序 2进行改进, 得到程序 3 , 具体如下所示: In this embodiment, the column type of the column family needs to be determined according to the column SCHEMA definition in the table. If the column definition includes a union field (join primary key), the column type is "super", otherwise it is "standard". When a table node is mapped into a column family node, it is necessary to add the necessary mode attributes, which include at least the column sort type and the cache configuration; - - Each column scanned in the point maps directly to the column node. If a column node is a union primary key, the non-relational database XML is described as isKey = tme, and the first scanned joint primary key is added to the isPrefix. = true, other union primary keys isPrefix = false. If it is checked in the mapping relation table that the table being executed has an associated table, all the columns in the associated table are mapped as ordinary columns to the non-relational database XML file, and the original foreign key definition is canceled. This process can be improved on Program 1 and Program 2 to get Program 3, as follows:
程序 1  Procedure 1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<db name = "messagedb">  <db name = "messagedb">
<table name = "ispace_msg_attach">  <table name = "ispace_msg_attach">
<column name = "userid" type = "varchar2" length = 20 nullable = false isRowKey = true />  <column name = "userid" type = "varchar2" length = 20 nullable = false isRowKey = true />
<column name = "msgid" type = "varchar2" length = 40 nullable = false isUnionKey = true />  <column name = "msgid" type = "varchar2" length = 40 nullable = false isUnionKey = true />
<column name = "contentid" type = "varchar2" length = 40 isForgeignKye = true nullable = false />  <column name = "contentid" type = "varchar2" length = 40 isForgeignKye = true nullable = false />
</table>  </table>
</db>  </db>
程序 2  Procedure 2
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<db name = "messagedb">  <db name = "messagedb">
<table name = "ispace_attach_info">  <table name = "ispace_attach_info">
<column name = "contentid" type = "varchar2" length = 40 nullable = false isRowKey = true />  <column name = "contentid" type = "varchar2" length = 40 nullable = false isRowKey = true />
<column name = "url" type = "varchar2" length = 40 nullable = false /> <column name = "url" type = "varchar2" length = 40 nullable = false />
<column name = "size" type = "number" length = 4 nullable = false /> <column name = "desc" type = "varchar2" length = 40 nullable = false - - <column name = "size" type = "number" length = 4 nullable = false /><column name = "desc" type = "varchar2" length = 40 nullable = false - -
/> />
</table>  </table>
</db>  </db>
程序 3  Procedure 3
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>  <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<keyspace name = "messagedb"  <keyspace name = "messagedb"
replication—factor = 3  Replication—factor = 3
strategy_class="org.apache.cassandra.locator.SimpleStrategy"> <columnfamily name = "ispace_msg_recvState"  Strategy_class="org.apache.cassandra.locator.SimpleStrategy"> <columnfamily name = "ispace_msg_recvState"
ColumnType = "Super"  ColumnType = "Super"
Compare With = "BytesType"  Compare With = "BytesType"
CompareSubcolumnsWith = "BytesType"  CompareSubcolumnsWith = "BytesType"
KeysCached="50%"  KeysCached="50%"
RowsCached=" 10000" >  RowsCached=" 10000" >
<column name ="userid" isRowKey = "true" type = "string" length = <column name ="userid" isRowKey = "true" type = "string" length =
20 nullable=" false" /> 20 nullable=" false" />
<column name ="msgid" isKey = "true" isPrefix = "true" type = "string" length = 40 nullable=" false" />  <column name ="msgid" isKey = "true" isPrefix = "true" type = "string" length = 40 nullable=" false" />
<column name =,, contentid" isKey = "true" isPrefix = "false" type = "string" length = 40 nullable=" false" />  <column name =,, contentid" isKey = "true" isPrefix = "false" type = "string" length = 40 nullable=" false" />
<column name = "url" type = "string" length = 40 nullable = false /> <column name = "size" type = "number" length = 4 nullable = false /> <column name = "desc" type = "string" length = 40 nullable = false /> < /columnfamily>  <column name = "url" type = "string" length = 40 nullable = false /> <column name = "size" type = "number" length = 4 nullable = false /> <column name = "desc" type = " String" length = 40 nullable = false /> < /columnfamily>
< /keyspaco < /keyspaco
步骤 205: 根据所述非关系数据库 XML模型生成数据定义命令; 步骤 206: 向非关系数据库发送所述数据定义命令, 创建非关系数据库中 - - 的 SCHEMA; Step 205: Generate a data definition command according to the non-relational database XML model. Step 206: Send the data definition command to a non-relational database, and create a non-relational database. - - SCHEMA;
步骤 207: 从所述关系数据库中获取数据集;  Step 207: Obtain a data set from the relational database.
步骤 208: 根据所述映射关系表中记录的对应映射关系将所述数据集导入 所述非关系数据库的 SCHEMA中。  Step 208: Import the data set into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table.
优选的, 在步骤 204后, 在所述关系数据库 XML模型配置为规范化处理 模式或者非规范化处理模式时,对映射关系表中记录中的映射关系进行优化配 置:  Preferably, after the step 204, when the relational database XML model is configured as a normalized processing mode or a non-normalized processing mode, the mapping relationship in the record in the mapping relationship table is optimized:
也就是说, SCHEMA映射引擎执行规范化处理模式 /非规范化的前提下, 还可以通过配置接口修改映射关系表, 使得在保证大部分执行规范化 /非规范 化映射的条件下, 指定部分进行非规范化 /规范化映射, 具体执行过程为: That is to say, under the premise that the SCHEMA mapping engine performs the normalization processing mode/denormalization, the mapping relationship table can also be modified through the configuration interface, so that the specified part is denormalized/normalized under the condition that most of the execution of the normalized/non-normalized mapping is guaranteed. Mapping, the specific implementation process is:
1 ) 配置数据迁移装置的默认模式为 SCHEMA映射模式, SCHEMA映射 引擎完成自动 SCHEMA映射, 生成非关系数据库 XML文件, 填写好映射关 系表; 1) The default mode of the configuration data migration device is SCHEMA mapping mode, the SCHEMA mapping engine completes the automatic SCHEMA mapping, generates the non-relational database XML file, and fills in the mapping relationship table;
2 )修改映射关系表, 指定部分表执行非规范化 (规范化处理模式下 )/规范 化(非规范化处理模式下 )处理方式, 接着配置数据迁移装置为映射与迁移模 式, SCHEMA映射引擎启动自动映射, 重新根据已经填好的映射关系表生成 非关系数据库 XML文件;  2) Modify the mapping relationship table, specify the partial table to perform the denormalization (normalized processing mode) / normalization (in the non-normalized processing mode) processing mode, and then configure the data migration device to map and migrate the mode, the SCHEMA mapping engine starts the automatic mapping, Generating a non-relational database XML file according to the already filled mapping table;
3 )触发执行器根据映射关系进行数据迁移。  3) The trigger executor performs data migration according to the mapping relationship.
通过数据迁移装置提供的配置接口还可修改 Keyspace和 column family的 默认属性定义, 根据业务的需求进行调优, 具体的执行过程为:  The configuration interface provided by the data migration device can also modify the default attribute definitions of Keyspace and column family to be tuned according to the needs of the service. The specific execution process is as follows:
配置数据迁移装置为 SCHEMA映射模式, SCHEMA映射引擎自动完成数 据模型映射, 生成非关系数据库 XML文件, 填写好映射关系表;  The configuration data migration device is in the SCHEMA mapping mode, the SCHEMA mapping engine automatically completes the data model mapping, generates the non-relational database XML file, and fills in the mapping relationship table;
根据业务需求修改属性, 再配置为数据迁移模式;  Modify the attributes according to the business requirements, and then configure the data migration mode.
触发执行器根据映射关系迁移数据。  The trigger executor migrates data according to the mapping relationship.
为了便于本领域技术人员的理解, 下面以具体的实例来说明。  In order to facilitate the understanding of those skilled in the art, the following specific examples are given.
还请参阅图 3, 为本发明实施例提供一种各种模式下 SCHEMA信息映射 成非关系数据库 XML的流程图, 在该实施例中, 对各种模式下 SCHEMA映 - - 射的过程进行详细的描述, 如图所示, 包括: Referring to FIG. 3, a flow chart of SCHEMA information mapping into a non-relational database XML in various modes is provided according to an embodiment of the present invention. In this embodiment, SCHEMA is mapped to various modes. - - The process of shooting is described in detail, as shown in the figure, including:
步骤 301: 判断是否为规范化模式; 如果是, 执行步骤 302; 否则执行步 骤 303;  Step 301: Determine whether it is a normalization mode; if yes, go to step 302; otherwise, go to step 303;
步骤 302: 设置 SCHEMA映射引擎为规范化模式;  Step 302: Set the SCHEMA mapping engine to the normalization mode;
步骤 303: 设置 SCHEMA映射引擎为非规范化模式;  Step 303: Set the SCHEMA mapping engine to a denormalized mode;
步骤 304: SCHEMA映射引擎判断映射模式,如果为 SCHEMA映射模式, 则执行步骤 305: 如果为映射与数据迁移模式, 则执行步骤 310;  Step 304: The SCHEMA mapping engine determines the mapping mode. If it is the SCHEMA mapping mode, step 305 is performed: if it is the mapping and data migration mode, step 310 is performed;
步骤 305:从关系数据库中获取 SCHEMA信息,并将所述 SCHEMA信息 直接映射成关系数据 XML模型;  Step 305: Obtain SCHEMA information from a relational database, and directly map the SCHEMA information into a relational data XML model;
步骤 306: 根据规范模式和映射关系表的配置把所述关系数据 XML模型 映射成非关系数据模型 XML;  Step 306: Map the relational data XML model to a non-relational data model XML according to a specification mode and a mapping relationship table configuration;
步骤 307: 判断映射关系表中是否存在对应的项, 如果是, 执行步骤 308; 否则, 执行步骤 309;  Step 307: Determine whether there is a corresponding item in the mapping relationship table, and if yes, go to step 308; otherwise, go to step 309;
步骤 308: 按照对应关系表中的配置进行映射, 结束;  Step 308: Perform mapping according to the configuration in the correspondence table, and end;
步骤 309: 按照规范模式中配置进行映射, 并填写映射关系对应表, 结束; 步骤 310:从关系数据库中获取 SCHEMA信息,并将所述 SCHEMA信息 直接映射成关系数据 XML模型;  Step 309: Perform mapping according to the configuration in the specification mode, and fill in the mapping relationship correspondence table, and end; Step 310: Obtain SCHEMA information from the relational database, and directly map the SCHEMA information into a relational data XML model;
步骤 311: 根据规范模式和映射关系表的配置把所述关系数据 XML模型 映射成非关系数据模型 XML;  Step 311: Mapping the relational data XML model into a non-relational data model XML according to a specification mode and a mapping relationship table configuration;
步骤 312: 判断映射关系表中是否存在对应的项, 如果是, 执行步骤 313; 否则, 执行步骤 314;  Step 312: Determine whether there is a corresponding item in the mapping relationship table, and if yes, go to step 313; otherwise, go to step 314;
步骤 313: 按照对应关系表中的配置进行映射, 之后, 执行步骤 315; 步骤 314: 按照规范模式中配置进行映射, 并填写映射关系对应表,之后, 执行步骤 315;  Step 313: Perform mapping according to the configuration in the correspondence table, and then perform step 315; Step 314: Perform mapping according to the configuration in the specification mode, and fill in the mapping relationship correspondence table, and then perform step 315;
步骤 315: 触发执行器执行数据迁移过程。  Step 315: Trigger the executor to perform the data migration process.
也就是说, 图 3描述了从关系数据库到非关系数据库的 SCHEMA映射过 程。 从关系数据库到类 Bigtable数据模型的非关系数据库的数据导入流程, 其 - - 中, 数据导入流程由数据迁移装置中的执行器来执行, 包括: That is, Figure 3 depicts the SCHEMA mapping process from a relational database to a non-relational database. a data import process from a relational database to a non-relational database of the Bigtable data model, - - In, the data import process is performed by an executor in the data migration device, including:
1 )执行器向非关系数据库发出数据定义命令, 根据上述 SCHEMA 映射 过程生成的非关系数据库 XML模型,创建非关系数据库中的 SCHEMA信息; 1) The executor issues a data definition command to the non-relational database, and creates a SCHEMA information in the non-relational database according to the non-relational database XML model generated by the SCHEMA mapping process described above;
2 )执行器顺序扫描直接映射 XML文件的每一个 table, 并查看映射关系 表, 判断此表是否不需要映射, 如果不需要, 则忽略此表继续扫描下一个表; 如果此表为最后一个表, 则结束; 如果需要映射, 执行步骤 3 ); 2) The actuator sequential scan directly maps each table of the XML file, and looks at the mapping relationship table to determine whether the table does not need to be mapped. If not, ignore the table and continue scanning the next table; if this table is the last table , then end; if mapping is required, perform step 3);
3 )判断此表是否有关联表, 如果有, 则根据直接映射的 XML文件生成 SQL 查询, 从关系数据库中提取源表及其关联表的数据集; 如果没有, 则根 据直接映射的 XML文件生成 SQL查询, 从关系数据库中提取源表的数据集; 4 )根据对应的非关系数据模型 XML生成对非关系数据库的数据导入方 式根据 SCHEMA映射关系主动调用非关系数据库的数据导入接口, 把数据集 导入非关系数据库;  3) judging whether the table has an associated table, if yes, generating an SQL query according to the directly mapped XML file, extracting the data set of the source table and its associated table from the relational database; if not, generating according to the directly mapped XML file SQL query, extracting the data set of the source table from the relational database; 4) generating the data import mode of the non-relational database according to the corresponding non-relational data model XML, actively calling the data import interface of the non-relational database according to the SCHEMA mapping relationship, and putting the data set Import a non-relational database;
5 )判断是否还有需要映射的 table, 如果有, 则回到第 1步, 否则结束。 其具体数据导入过程如图 4所示,图 4为本发明实施例提供的一种数据导 入的流程图, 具体包括:  5) Determine if there is any table that needs to be mapped. If there is, return to step 1, otherwise end. The specific data importing process is shown in FIG. 4. FIG. 4 is a flowchart of data import according to an embodiment of the present invention, which specifically includes:
步骤 401: 触发执行器执行数据迁移;  Step 401: Trigger an executor to perform data migration;
步骤 402: 根据非关系数据模型 XML, 调用非关系数据库接口创建非关 系数据表;  Step 402: Create a non-relational data table by calling a non-relational database interface according to the non-relational data model XML.
步骤 403: 顺序扫描直接映射 XML的一个表 Table, 并查看映射关系表, 判断此表 Table是否不需要映射;如果是,执行步骤 410;否则,执行步骤 404; 步骤 404: 判断表 Table是否有关联表, 如果有, 执行步骤 405; 否则, 执行步骤 406;  Step 403: sequentially scan a table table directly mapping XML, and view the mapping relationship table, determine whether the table Table does not need to be mapped; if yes, execute step 410; otherwise, perform step 404; Step 404: determine whether the table Table is associated Table, if yes, go to step 405; otherwise, go to step 406;
步骤 405: 生成从源表及其关联表, 提取数据的 SQL, 从关系数据库中提 取出数据集;  Step 405: Generate SQL that extracts data from the source table and its associated table, and extracts the data set from the relational database;
步骤 406: 生成源表, 提取数据的 SQL, 从关系数据库中提取出数据集; 步骤 407:根据对应的非关系数据模型 XML生成对非关系数据库的数据导 入函数; - - 步骤 408: 从数据集中循环取出数据条, 并用导入函数进行导入数据条; 步骤 409: 判断是否还有表 Table需要扫描,如果是,返回步骤 403; 否贝' J , 执行步骤 411; Step 406: Generate a source table, extract data SQL, and extract a data set from the relational database. Step 407: Generate a data import function to the non-relational database according to the corresponding non-relational data model XML; - Step 408: Loop out the data strip from the data set, and use the import function to import the data strip; Step 409: Determine whether there is still a table needs to be scanned, and if so, return to step 403; No, go to 'J, go to step 411;
步骤 410: 判断是否还有表 Table需要扫描,如果是,返回步骤 403; 否贝 'J。 执行步骤 411;  Step 410: Determine whether there is still a table to scan, and if yes, return to step 403; Step 411;
步骤 411: 结束。  Step 411: End.
基于上述实施例的实现过程, 本发明实施例还提供的一种数据迁移装置, 其结构示意图如图 5所示, 所述装置包括: 第一获取单元 51 , 映射单元 52, 数据迁移单元 53, 其中, 所述第一获取单元 51 , 用于从关系数据库中获取关 系数据库表 SCHEMA信息; 所述映射单元 52, 用于将所述 SCHEMA信息映 射成非关系数据库 XML模型, 并在映射关系表中记录对应的映射关系; 所述 数据迁移单元 53, 用于按照所述映射关系表中记录的映射关系, 将关系数据 库的数据导入带非关系数据库中。  Based on the implementation process of the foregoing embodiment, a data migration device is also provided in the embodiment of the present invention. The structure of the data migration device is as shown in FIG. 5. The device includes: a first acquiring unit 51, a mapping unit 52, and a data migration unit 53, The first obtaining unit 51 is configured to obtain the relational database table SCHEMA information from the relational database. The mapping unit 52 is configured to map the SCHEMA information into a non-relational database XML model, and in the mapping relationship table. Recording the corresponding mapping relationship; the data migration unit 53 is configured to import the data of the relational database into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
上述装置的单元可以是由处理器、 存储器或特种用途电路等实现。  The unit of the above device may be implemented by a processor, a memory or a special purpose circuit or the like.
优选的, 所述装置还可以进一步包括: 定义单元, 与第一获取单元连接, 用于在所述非关系数据库中增加非关系数据对象表 SCHEMA的定义, 具体包 括:增加对 column family的主键的 SCHEMA约束定义;增加对 column family 的具体列的 SCHEMA约束定义; 将一个或多个联合主键的关系数据库表中映 射为非关系数据库中的 super column family。 其具体的定义过程上述, 在此不 再赘述。  Preferably, the device may further include: a defining unit, connected to the first obtaining unit, configured to add a definition of the non-relational data object table SCHEMA in the non-relational database, specifically: adding a primary key to the column family SCHEMA constraint definition; adds SCHEMA constraint definitions for specific columns of the column family; maps one or more union primary key's relational database tables to super column families in non-relational databases. The specific definition process is as described above and will not be described here.
优选的, 所述装置还可以进一步包括: 建立单元, 与所述映射单元连接, 用于建立关系数据库中的关系表与非关系数据库的非关系表的映射关系表。  Preferably, the device may further include: an establishing unit, connected to the mapping unit, configured to establish a mapping relationship table between the relational table in the relational database and the non-relational relational database in the non-relational database.
其中, 所述第一获取单元包括: 第一发送单元和第一接收单元, 其中, 所 述第一发送单元, 用于向所述关系数据库中发送获取 SCHEMA信息的请求; 所述第一接收单元, 用于接收所述关系数据库反馈的所述 SCHEMA信息。  The first obtaining unit includes: a first sending unit and a first receiving unit, where the first sending unit is configured to send a request for acquiring SCHEMA information to the relational database; the first receiving unit And the SCHEMA information for receiving the feedback of the relational database.
其中, 所述映射单元包括: 第一映射单元和第二映射单元, 其中, 所述第 一映射单元, 用于将所述 SCHEMA信息映射成关系数据库 XML模型; 所述 - - 第二映射单元, 用于按照 SCHEMA的定义, 将所述关系数据库 XML模型映 射为非关系数据库 XML模型, 并在映射关系表中记录对应的映射关系。 The mapping unit includes: a first mapping unit and a second mapping unit, where the first mapping unit is configured to map the SCHEMA information into a relational database XML model; - a second mapping unit, configured to map the relational database XML model to a non-relational database XML model according to the definition of SCHEMA, and record the corresponding mapping relationship in the mapping relationship table.
所述第二映射单元又包括: 规范化处理模式映射单元和 /或非规范化处理 模式映射单元, 其中, 所述规范化处理模式映射单元, 用于将所述关系数据库 XML模型配置为规范化处理模式, 并将关系数据库中的每个表都映射为非关 系数据库中一个 column family,并在映射关系表中记录对应的映射关系;所述 非规范化处理模式映射单元, 用于将所述关系数据库 XML模型配置为非规范 化处理模式, 并将多个关系数据库中的表映射为非关系数据库中一个 column family , 并在映射关系表中记录对应的映射关系。  The second mapping unit further includes: a normalization processing mode mapping unit and/or a non-normalization processing mode mapping unit, where the normalization processing mode mapping unit is configured to configure the relational database XML model into a normalized processing mode, and Mapping each table in the relational database to a column family in the non-relational database, and recording a corresponding mapping relationship in the mapping relationship table; the denormalized processing mode mapping unit is configured to configure the relational database XML model For the non-normalized processing mode, the tables in multiple relational databases are mapped to a column family in the non-relational database, and the corresponding mapping relationship is recorded in the mapping relation table.
优选的, 所述装置还可以进一步包括: 配置优化单元, 与所述第二映射单 元连接, 用于在所述关系数据库 XML模型配置为规范化处理模式或者非规范 化处理模式时, 对映射关系表中记录中的映射关系进行优化配置。  Preferably, the device may further include: a configuration optimization unit, configured to be connected to the second mapping unit, configured to be in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode The mapping relationship in the record is optimized.
在上述实施例中, 所述第一获取单元包括: 扫描单元, 生成单元和数据获 取单元, 其中, 所述扫描单元, 用于扫描非关系数据库 XML模型和映射关系 表, 得到扫描结果; 所述生成单元, 用于根据所述扫描结果生成 SQL查询语 句; 所述数据获取单元, 用于利用所述 SQL查询语句从所述关系数据库中获 取数据集。  In the above embodiment, the first acquiring unit includes: a scanning unit, a generating unit, and a data acquiring unit, wherein the scanning unit is configured to scan a non-relational database XML model and a mapping relationship table to obtain a scan result; a generating unit, configured to generate an SQL query statement according to the scan result, where the data acquiring unit is configured to obtain a data set from the relational database by using the SQL query statement.
在上述实施例中, 所述数据迁移单元包括: 生成单元, 创建单元, 第二获 取单元和数据导入单元, 其中, 所述生成单元, 用于根据所述非关系数据库 XML模型生成数据定义命令; 所述创建单元, 用于向非关系数据库发送所述 数据定义命令, 创建非关系数据库中的 SCHEMA; 所述第二获取单元, 用于 第二从所述关系数据库中获取数据集; 所述数据导入单元, 用于根据所述映射 关系表中记录的对应映射关系将所述数据集导入所述非关系数据库的 SCHEMA中。  In the above embodiment, the data migration unit includes: a generating unit, a creating unit, a second obtaining unit, and a data importing unit, wherein the generating unit is configured to generate a data definition command according to the non-relational database XML model; The creating unit is configured to send the data definition command to a non-relational database to create a SCHEMA in a non-relational database; the second obtaining unit is configured to obtain a data set from the relational database; the data And an importing unit, configured to import the data set into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table.
所述装置中各个单元的功能和作用的实现过程,详见上述方法中对应步骤 的实现过程, 在此不再赘述。  For the implementation process of the functions and functions of the various units in the device, refer to the implementation process of the corresponding steps in the foregoing method, and details are not described herein again.
相应, 本发明实施例还提供一种数据迁移系统, 其结构示意图详见图 6, - - 所述系统包括: 至少包括一个关系数据库(图中以关系数据库 61和 62为例, 但并不限于此)、 至少一个非关系数据库(图中以非关系数据库 631和 632为 例, 但并不限于此)和数据迁移装置 63。 其中, 所述数据迁移装置 63用于从 关系数据库中获取关系数据库表 SCHEMA信息 (比如关系数据库 61 ); 将所 述 SCHEMA信息分别映射成非关系数据库 XML模型, 并在映射关系表中分 别记录对应的映射关系; 按照所述映射关系表, 将关系数据库(比如关系数据 库 61 )的数据导入非关系数据库中(比如非关系数据库 631 )。 当并不限于此, 也可以将非关系数据库的数据迁移到多个非关系数据库中,或者把多个关系数 据库中的数据迁移到一个非关系数据库中, 其实现过程类似, 本发明实施例不 作限制。 Correspondingly, an embodiment of the present invention further provides a data migration system, and a schematic structural diagram thereof is shown in FIG. 6 . - The system comprises: at least one relational database (in the figure, the relational databases 61 and 62 are exemplified, but not limited thereto), and at least one non-relational database (in the figure, the non-relational databases 631 and 632 are taken as an example, but It is not limited to this and the data migration device 63. The data migration device 63 is configured to obtain the relational database table SCHEMA information (such as the relational database 61) from the relational database; respectively map the SCHEMA information into a non-relational database XML model, and record correspondingly in the mapping relationship table. Mapping relationship; according to the mapping relationship table, data of a relational database (such as relational database 61) is imported into a non-relational database (such as non-relational database 631). When the data is not limited to this, the data of the non-relational database may be migrated to a plurality of non-relational databases, or the data in the plurality of relational databases may be migrated to a non-relational database, and the implementation process is similar. limit.
其中, 所述系统的中的数据迁移装置如上述实施例中的数据迁移装置, 具 体如上所述, 在此不再赘述。  The data migration device in the system is the same as the data migration device in the foregoing embodiment, and is not described here.
本发明实施例中的数据迁移装置,可以根据关系数据库和非关系数据库的 建模差异,针对现有从关系数据库到非关系数据库的数据迁移需求, 实现了从 关系数据库多表到非关系数据库单表映射机制。传统关系数据模型设计时遵循 尽量减少数据冗余, 即规范化的原则,公用数据全部提取出来单独存放在一个 表中,其他表和它建立关联。而非关系数据库使用廉价服务器构成分布式集群, 允许数据冗余,且为了提高查找效率, 能整合在一个表中的数据一般不分表存 放, 所以从关系数据库表到非关系数据库表的映射过程中, 为了提高迁移后数 据的操作效率, 需要把多个关系数据库表映射成一个非关系数据库 column family, 即非规范化的原则。 本发明实施例的装置能自动公用表分散存储到外 键所在的表。 充分保证了迁移后数据的操作效率和方便的访问模式。  The data migration apparatus in the embodiment of the present invention can implement the data migration requirement from the relational database to the non-relational database according to the modeling difference between the relational database and the non-relational database, and implements the multi-table from the relational database to the non-relational database. Table mapping mechanism. The traditional relational data model is designed to minimize data redundancy, that is, the principle of normalization. Public data is extracted and stored in a single table, and other tables are associated with it. Non-relational databases use inexpensive servers to form distributed clusters, allowing data redundancy, and in order to improve search efficiency, data that can be integrated into a table is generally not stored in a table, so the mapping process from relational database tables to non-relational database tables In order to improve the operational efficiency of the data after migration, it is necessary to map multiple relational database tables into a non-relational database column family, that is, the principle of denormalization. The apparatus of the embodiment of the present invention can automatically store the common table to the table where the foreign key is located. The operational efficiency of the data after migration and the convenient access mode are fully guaranteed.
还请参阅图 7, 为本发明实施例提供的一种数据迁移系统的结构示意图, 所述系统包括: 至少一个数据关系库(本实施例以一个数据关系库为例) 71、 至少一个非数据关系库(本实施例以一个非数据关系库为例) 72, 以及分别与 数据关系库与非数据关系库连接的数据迁移装置 73, 但并不限于此。 上述装 置可以是由处理器、 存储器或特种用途电路等实现。 - - 在该实施例中, 所述关系数据库 71 : 可以是 MySql, DB2, Oracle等, 用 二维表来表示实体及其联系: 用表格表示实体集, 用列表示属性, 表结构表示 实体型; 用表间的特定冗余信息表示实体间的联系 (主键、 外键)。 其优点是: 完整性容易表述; 筒单, 表的概念直观、 单一, 用户易于理解; 坚实的理论基 础 (关系代数); 非过程化的数据请求, 请求数据可以不指明路径; 数据独立 性高, 用户只需提出 "做什么", 无须说明 "怎么做"; 支持集合操作。 FIG. 7 is a schematic structural diagram of a data migration system according to an embodiment of the present invention. The system includes: at least one data relation library (in this embodiment, a data relation library is taken as an example) 71. At least one non-data The relational library (this embodiment takes a non-data relational library as an example) 72, and the data migration means 73 respectively connected to the data relational library and the non-data relational library, but is not limited thereto. The above means may be implemented by a processor, a memory or a special purpose circuit or the like. - In this embodiment, the relational database 71: may be MySql, DB2, Oracle, etc., using a two-dimensional table to represent entities and their associations: using a table to represent a set of entities, a column to represent attributes, a table structure to represent a solid type ; Use specific redundancy information between tables to represent the connections between entities (primary keys, foreign keys). The advantages are: integrity is easy to express; single, the concept of the table is intuitive, single, user-friendly; solid theoretical basis (relational algebra); non-procedural data request, request data can not specify the path; high data independence , users only need to ask "what to do", no need to explain "how to do"; support collection operations.
所述非关系数据库 72: 可以是数据模型为类 Bigtable的非关系数据库、 云数据库或 no sql数据库等。 而所述类 Bigtable数据模型的非关系数据库是 有廉价的服务器构成的集群, 集群能自组织、 自管理, 作为一个整体对外提供 服务。 这类数据库都具有低成本、 弹性可扩展、 海量存储、 高并发、 自主功能 定制、 弱关系性等特征。  The non-relational database 72: may be a non-relational database, a cloud database, or a no sql database whose data model is a class Bigtable. The non-relational database of the Bigtable data model is a cluster composed of inexpensive servers, and the cluster can self-organize and self-manage, and provide services as a whole. Such databases are characterized by low cost, flexible scalability, mass storage, high concurrency, autonomous feature customization, and weak affinity.
所述数据迁移装置 73: 可以是硬件装置或软件装置, 用于实现关系数据 库与类 Bigtable数据模型的非关系数据库之间的数据映射与迁移过程。其具体 过程为从关系数据库中获取 SCHEMA 信息, 把它映射成非关系数据库 SCHEMA , 并根据这种映射关系把数据从关系数据库中取出来导入到非关系 数据库中。其中, 所述根据这种映射关系把数据从关系数据库中取出来导入到 非关系数据库中包括: 根据所述非关系数据库 XML模型生成数据定义命令; 向非关系数据库发送所述数据定义命令, 创建非关系数据库中的 SCHEMA; 从所述关系数据库中获取数据集;根据所述映射关系表中记录的对应映射关系 将所述数据集导入所述非关系数据库的 SCHEMA中。  The data migration device 73: may be a hardware device or a software device, and is used to implement a data mapping and migration process between the relational database and the non-relational database of the Bigtable data model. The specific process is to obtain the SCHEMA information from the relational database, map it to the non-relational database SCHEMA, and extract the data from the relational database according to the mapping relationship to import into the non-relational database. The extracting the data from the relational database according to the mapping relationship into the non-relational database includes: generating a data definition command according to the non-relational database XML model; sending the data definition command to the non-relational database, creating SCHEMA in a non-relational database; obtaining a data set from the relational database; importing the data set into the SCHEMA of the non-relational database according to a corresponding mapping relationship recorded in the mapping relationship table.
其中, 所述数据迁移装置 73 包括: 第一获取单元 731 , 用于从关系数据 库中获取关系数据库表 SCHEMA信息; 其具体的获取过程详见上述, 在此不 再赘述; SCHEMA映射引擎(即映射单元) 732, 用于将所述 SCHEMA信息 映射成非关系数据库 XML模型; 执行器(即数据迁移单元) 733 , 用于按照 所述映射关系表, 将关系数据库的数据导入带非关系数据库 XML模型中。  The data migration device 73 includes: a first obtaining unit 731, configured to obtain a relational database table SCHEMA information from a relational database; the specific acquisition process is as described above, and details are not described herein; the SCHEMA mapping engine (ie, mapping) a unit 732, configured to map the SCHEMA information into a non-relational database XML model; an executor (ie, a data migration unit) 733, configured to import the data of the relational database into the non-relational database XML model according to the mapping relationship table in.
所述数据迁移装置 73还可以包括映射关系表 730, 该表是由建立单元建 立的;该映射关系表中记录了将所述 SCHEMA信息映射成非关系数据库 XML - - 模型的映射关系。 The data migration device 73 may further include a mapping relationship table 730, which is established by the establishing unit; the mapping relationship table records mapping the SCHEMA information into a non-relational database XML - - The mapping relationship of the model.
所述数据迁移装置 73还可以包括定义单元, 用于在所述非关系数据库中 增加非关系数据对象表 SCHEMA的定义等  The data migration device 73 may further include a definition unit for adding a non-relational data object table, a definition of SCHEMA, and the like in the non-relational database.
所述装置还可以包括: 配置优化单元, 用于在所述关系数据库 XML模型 配置为规范化处理模式或者非规范化处理模式时,对映射关系表中记录中的映 射关系进行优化配置, 具体可以通过配置接口 734。  The device may further include: a configuration optimization unit, configured to optimize the mapping relationship in the record in the mapping relationship table when the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode, where the configuration may be specifically configured Interface 734.
本发明实施例提出了一种关系数据库与非关系数据库间数据迁移的方法、 装置及系统,可以用于传统的关系数据库与类 Bigtable数据模型的非关系数据 库之间的数据迁移。通过本发明实施例中的数据迁移装置,使得业务可以通过 一种可靠的、 快速、 便捷的方式进行数据迁移, 平滑过渡到非关系数据库, 利 用非关系数据库的低成本、弹性可扩展性、 高效率高并发等优势提升业务的竟 争力。  The embodiment of the invention provides a method, a device and a system for data migration between a relational database and a non-relational database, which can be used for data migration between a traditional relational database and a non-relational database of a Bigtable data model. Through the data migration device in the embodiment of the present invention, the service can perform data migration in a reliable, fast, and convenient manner, smoothly transition to a non-relational database, and utilize a non-relational database for low cost, flexible scalability, and high High efficiency and other advantages enhance the competitiveness of the business.
本发明实施例中, 可以在任何时候把数据库中的业务数据切换到类 Bigtable数据模型的非关系数据库中, 且整个数据迁移过程都是自动的, 还节 约了成本和减少了出错率, 实现了业务数据的平滑迁移。  In the embodiment of the present invention, the business data in the database can be switched to the non-relational database of the Bigtable data model at any time, and the entire data migration process is automatic, which also saves cost and reduces error rate, and realizes Smooth migration of business data.
进一步, 本发明实施例中, 数据迁移装置还提供了配置接口, 可以定制数 据的迁移方式, 以及根据业务需求对数据表进行调优,还可以通过该配置接口 修改映射关系表, 从而添加更多的属性, 实现更多定制的映射关系。 这种可配 置的数据迁移过程, 使得业务在把数据从关系数据库迁移到非关系数据库之 后, 能根据非关系数据库的建模特征进行数据迁移, 充分发挥非关系数据库的 优势, 提高迁移后的数据的访问效率。  Further, in the embodiment of the present invention, the data migration device further provides a configuration interface, which can customize the data migration mode, and optimize the data table according to the service requirement, and also modify the mapping relationship table through the configuration interface, thereby adding more Attributes that implement more custom mappings. This configurable data migration process enables the business to migrate data from a relational database to a non-relational database, and then migrate data according to the modeling characteristics of the non-relational database, giving full play to the advantages of the non-relational database and improving the migrated data. Access efficiency.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明 可以通过硬件实现, 也可以可借助软件加必要的通用硬件平台的方式来实现。 基于这样的理解, 本发明的技术方案可以以软件产品的形式体现出来, 该软件 产品可以保存在一个非易失性保存介质 (例如, 可以是只读存储器(ROM ), U盘, 移动硬盘, 随机存取存储器( RAM )、 磁碟或者光盘等各种可以存储程 序代码的介质等)中, 包括若干指令用以使得一台计算机设备(可以是个人计 算机, 服务器, 或者网络设备等)执行本发明各个实施例所述的方法。 - - 在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统, 装置和方 法, 在没有超过本申请的精神和范围内, 可以通过其他的方式实现。 例如, 以 上所描述的装置实施例仅仅是示意性的, 例如, 所述模块的划分, 仅仅为一种 逻辑功能划分, 实际实现时可以有另外的划分方式, 例如多个模块或组件可以 结合或者可以集成到另一个系统, 或一些特征可以忽略, 或不执行。 其中所述 作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示 的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分 布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实 现本实施例方案的目的。 Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (for example, may be a read only memory (ROM), a USB flash drive, a mobile hard disk, a random access memory (RAM), a disk or an optical disk, etc., which can store program code, etc., including a plurality of instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the present The methods described in the various embodiments are invented. In the several embodiments provided herein, it is to be understood that the disclosed systems, devices, and methods may be implemented in other ways without departing from the spirit and scope of the application. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be another division manner, for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed. The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外, 所描述系统, 装置和方法以及不同实施例的示意图, 在不超出本申 请的范围内, 可以与其它系统, 模块, 技术或方法结合或集成。 另一点, 所显 示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置 或模块的间接耦合或通信连接, 可以是电性, 机械或其它的形式。  In addition, the described systems, apparatus, and methods, and the schematic diagrams of various embodiments, may be combined or integrated with other systems, modules, techniques or methods without departing from the scope of the present application. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
显然, 本领域的技术人员应该明白, 上述的本发明的各单元或各步骤可 以用通用的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在 多个计算装置所组成的网络上, 可选地, 它们可以用计算装置可执行的程序代 码来实现, 从而, 可以将它们存储在存储装置中由计算装置来执行, 或者将它 们分别制作成各个集成电路模块,或者将它们中的多个单元或步骤制作成单个 集成电路模块来实现。 这样, 本发明不限制于任何特定的硬件和软件结合。 以上所述仅为本发明的较佳实施例而已, 并非用于限定本发明的保护范围。 凡 在本发明的精神和原则之内所作的任何修改、 等同替换、 改进等, 均包含在本 发明的保护范围内。  It will be apparent to those skilled in the art that the various units or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or they may be Multiple units or steps are made in a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种数据迁移的方法, 其特征在于, 包括: A method for data migration, comprising:
从关系数据库中获取关系数据库表 SCHEMA信息;  Obtain the relational database table SCHEMA information from the relational database;
将所述 SCHEMA信息映射成非关系数据库 XML模型, 并在映射关系表 中记录对应的映射关系;  Mapping the SCHEMA information into a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table;
按照所述映射关系表中记录的映射关系,将关系数据库的数据导入非关系 数据库中。  The data of the relational database is imported into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
2、 根据权利要求 1所述的方法, 其特征在于, 还包括: 在所述非关系数 据库中增加非关系数据库表 SCHEMA的定义。  2. The method of claim 1, further comprising: adding a definition of the non-relational database table SCHEMA to the non-relational database.
3、 根据权利要求 2所述的方法, 其特征在于, 所述在所述非关系数据库 中增加非关系数据库表 SCHEMA的定义包括:  3. The method according to claim 2, wherein the adding the non-relational database table SCHEMA in the non-relational database includes:
增加对列族 column family的主键的 SCHEMA约束定义;  Add a SCHEMA constraint definition for the primary key of the column family column family;
增加对所述 column family的具体列字段的 SCHEMA约束定义; 将带一个或多个联合主键的关系数据库表中映射为非关系数据库中的超 级歹 'J族 super column family。  Add a SCHEMA constraint definition for the specific column field of the column family; map the relational database table with one or more union primary keys to the super 歹 'J family super column family in the non-relational database.
4、 根据权利要求 3所述的方法, 其特征在于, 还包括:  4. The method according to claim 3, further comprising:
建立关系数据库中的关系表与非关系数据库的非关系表的映射关系表,并 在映射关系表中记录所述 SCHEMA定义的映射关系。  Establish a mapping relationship table between the relational table in the relational database and the non-relational relational database of the non-relational database, and record the mapping relationship defined by the SCHEMA in the mapping relational table.
5、 根据权利要求 1所述的方法, 其特征在于, 所述从关系数据库中获取 关系数据库表 SCHEMA信息包括:  5. The method according to claim 1, wherein the obtaining the relational database table SCHEMA information from the relational database comprises:
向所述关系数据库中发送获取 SCHEMA信息的请求;  Sending a request for obtaining SCHEMA information to the relational database;
接收所述关系数据库反馈的所述 SCHEMA信息。  Receiving the SCHEMA information fed back by the relational database.
6、 根据权利要求 2至 5任一项所述的方法, 其特征在于, 所述将所述关 系数据库表 SCHEMA信息映射成非关系数据库 XML模型包括:  The method according to any one of claims 2 to 5, wherein the mapping the relational database table SCHEMA information to a non-relational database XML model comprises:
将所述 SCHEMA信息映射成关系数据库 XML模型;  Mapping the SCHEMA information into a relational database XML model;
按照所述 SCHEMA的定义, 将所述关系数据库 XML模型映射为非关系 数据库 XML模型, 并在映射关系表中记录对应的映射关系。 Mapping the relational database XML model to a non-relational relationship according to the definition of SCHEMA The database XML model, and record the corresponding mapping relationship in the mapping relationship table.
7、根据权利要求 6所述的方法,其特征在于,所述将所述关系数据库 XML 模型映射为非关系数据库 XML模型包括: 将所述关系数据库 XML模型配置 为规范化处理模式或者非规范化处理模式, 其中,  The method according to claim 6, wherein the mapping the relational database XML model to a non-relational database XML model comprises: configuring the relational database XML model to a normalized processing mode or a non-normalized processing mode , among them,
当配置为规范化处理模式时,将关系数据库中的每个表都映射为非关系数 据库中一个 column family , 并在映射关系表中记录对应的映射关系;  When configured as a normalization processing mode, each table in the relational database is mapped to a column family in the non-relational database, and the corresponding mapping relationship is recorded in the mapping relationship table;
当配置为非规范化处理模式时,将多个关系数据库中的表映射为非关系数 据库中一个 column family。  When configured as a denormalized processing mode, maps tables in multiple relational databases to a column family in a non-relational database.
8、 根据权利要求 7所述的方法, 其特征在于, 还包括  8. The method according to claim 7, further comprising
在所述关系数据库 XML模型配置为规范化处理模式或者非规范化处理模 式时, 对映射关系表中记录中的映射关系进行优化配置。  When the relational database XML model is configured to be a normalized processing mode or a non-normalized processing mode, the mapping relationship in the records in the mapping relationship table is optimally configured.
9、 根据权利要求 2至 8任一项所述的方法, 其特征在于, 所述按照所述 映射关系表中记录的映射关系,将关系数据库的数据导入带非关系数据库中包 括:  The method according to any one of claims 2 to 8, wherein the importing the data of the relational database into the non-relational database according to the mapping relationship recorded in the mapping relationship table comprises:
根据所述非关系数据库 XML模型生成数据定义命令;  Generating a data definition command according to the non-relational database XML model;
向非关系数据库发送所述数据定义命令, 创建非关系数据库中的 SCHEMA;  Sending the data definition command to a non-relational database to create a SCHEMA in a non-relational database;
从所述关系数据库中获取数据集;  Obtaining a data set from the relational database;
根据所述映射关系表中记录的对应映射关系将所述数据集导入所述非关 系数据库的 SCHEMA中。  The data set is imported into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table.
10、 根据权利要求 1至 9任一项所述的方法, 其特征在于, 所述从所述关 系数据库中获取数据集包括:  The method according to any one of claims 1 to 9, wherein the obtaining the data set from the relationship database comprises:
扫描非关系数据库 XML模型和映射关系表,生成 SQL查询语句,利用所 述 SQL查询语句从所述关系数据库中获取数据集。  Scanning the non-relational database XML model and the mapping relation table, generating a SQL query statement, and obtaining the data set from the relational database by using the SQL query statement.
11、 一种数据迁移装置, 其特征在于, 包括:  11. A data migration device, comprising:
第一获取单元,用于从关系数据库中获取关系数据库库表 SCHEMA信息; 映射单元, 用于将所述 SCHEMA信息映射成非关系数据库 XML模型, 并在映射关系表中记录对应的映射关系; a first obtaining unit, configured to obtain a relational database library table SCHEMA information from a relational database; a mapping unit, configured to map the SCHEMA information into a non-relational database XML model, And recording the corresponding mapping relationship in the mapping relationship table;
数据迁移单元, 用于按照所述映射关系表中记录的映射关系, 将关系数据 库的数据导入带非关系数据库中。  The data migration unit is configured to import the data of the relational database into the non-relational database according to the mapping relationship recorded in the mapping relationship table.
12、 根据权利要求 11所述的装置, 其特征在于, 所述装置还包括: 定义单元, 用于在所述非关系数据库中增加非关系数据库表 SCHEMA的 定义, 具体包括: 增加对 column family的主键的 SCHEMA约束定义; 增加对 column family的具体列的 SCHEMA约束定义; 将一个或多个联合主键的关系 数据库表中映射为非关系数据库中的 super column family。  The device according to claim 11, wherein the device further comprises: a definition unit, configured to add a definition of the non-relational database table SCHEMA in the non-relational database, specifically comprising: adding a column family The SCHEMA constraint definition for the primary key; the SCHEMA constraint definition for the specific column of the column family; the relational database table for one or more union primary keys is mapped to the super column family in the non-relational database.
13、 根据权利要求 11或 12所述的装置, 其特征在于, 所述装置还包括: 建立单元, 与所述映射单元连接, 用于建立关系数据库中的关系表与非关 系数据库的非关系表的映射关系表。  The device according to claim 11 or 12, wherein the device further comprises: an establishing unit, connected to the mapping unit, configured to establish a non-relational table between the relational table and the non-relational database in the relational database Mapping table.
14、 根据权利要求 11或 12所述的装置, 其特征在于, 所述第一获取单元 包括:  The device according to claim 11 or 12, wherein the first acquiring unit comprises:
第一发送单元,用于向所述关系数据库中发送获取 SCHEMA信息的请求; 第一接收单元, 用于接收所述关系数据库反馈的所述 SCHEMA信息。 a first sending unit, configured to send a request for acquiring SCHEMA information to the relational database; and a first receiving unit, configured to receive the SCHEMA information fed back by the relational database.
15、 根据权利要求 12所述的装置, 其特征在于, 所述映射单元包括: 第一映射单元,用于将所述 SCHEMA信息映射成关系数据库 XML模型; 第二映射单元, 用于按照 SCHEMA的定义, 将所述关系数据库 XML模 型映射为非关系数据库 XML模型, 并在映射关系表中记录对应的映射关系。 The apparatus according to claim 12, wherein the mapping unit comprises: a first mapping unit, configured to map the SCHEMA information into a relational database XML model; and a second mapping unit, configured to follow SCHEMA Defining, mapping the relational database XML model to a non-relational database XML model, and recording a corresponding mapping relationship in the mapping relationship table.
16、 根据权利要求 12所述的装置, 其特征在于, 所述第二映射单元包括: 规范化处理模式映射单元, 用于将所述关系数据库 XML模型配置为规范 化处理模式, 并将关系数据库中的每个表都映射为非关系数据库中一个 column family , 并在映射关系表中记录对应的映射关系; 和 /或  The device according to claim 12, wherein the second mapping unit comprises: a normalization processing mode mapping unit, configured to configure the relational database XML model into a normalized processing mode, and Each table is mapped to a column family in a non-relational database, and the corresponding mapping relationship is recorded in the mapping relationship table; and/or
非规范化处理模式映射单元, 用于将所述关系数据库 XML模型配置为非 规范化处理模式, 并将多个关系数据库中的表映射为非关系数据库中一个 column family , 并在映射关系表中记录对应的映射关系。  a non-normalized processing mode mapping unit, configured to configure the relational database XML model to be a non-normalized processing mode, and map the tables in the multiple relational databases to a column family in the non-relational database, and record the corresponding in the mapping relationship table Mapping relationship.
17、 根据权利要求 16所述的装置, 其特征在于, 所述装置还包括: 配置优化单元, 用于在所述关系数据库 XML模型配置为规范化处理模式 或者非规范化处理模式时, 对映射关系表中记录中的映射关系进行优化配置。The device according to claim 16, wherein the device further comprises: a configuration optimization unit, configured to configure the relational database XML model as a normalized processing mode Or, in the non-normalized processing mode, optimize the mapping relationship in the records in the mapping table.
18、 根据权利要求 11至 17任一项所述的装置, 其特征在于, 所述第一获 取单元包括: The device according to any one of claims 11 to 17, wherein the first obtaining unit comprises:
扫描单元, 用于扫描非关系数据库 XML模型和映射关系表, 得到扫描结 果;  a scanning unit, configured to scan a non-relational database XML model and a mapping relationship table, to obtain a scan result;
生成单元, 用于 ^据所述扫描结果生成 SQL查询语句;  a generating unit, configured to generate a SQL query statement according to the scan result;
数据获取单元, 用于利用所述 SQL查询语句从所述关系数据库中获取数 据集。  a data obtaining unit, configured to acquire a data set from the relational database by using the SQL query statement.
19、 根据权利要求 11至 17任一项所述的装置, 其特征在于, 所述数据迁 移单元包括:  The apparatus according to any one of claims 11 to 17, wherein the data migration unit comprises:
生成单元, 用于根据所述非关系数据库 XML模型生成数据定义命令; 创建单元, 用于向非关系数据库发送所述数据定义命令,创建非关系数据 库中的 SCHEMA;  a generating unit, configured to generate a data definition command according to the non-relational database XML model; a creating unit, configured to send the data definition command to the non-relational database, and create a SCHEMA in the non-relational database;
第二获取单元, 用于第二从所述关系数据库中获取数据集;  a second obtaining unit, configured to second acquire a data set from the relational database;
数据导入单元,用于根据所述映射关系表中记录的对应映射关系将所述数 据集导入所述非关系数据库的 SCHEMA中。  And a data importing unit, configured to import the data set into the SCHEMA of the non-relational database according to the corresponding mapping relationship recorded in the mapping relationship table.
20、 一种数据迁移系统, 至少包括一个关系数据库和一个非关系数据库, 其特征在于, 还包括: 数据迁移装置, 用于从关系数据库中获取关系数据库库 表 SCHEMA信息;将所述 SCHEMA信息映射成非关系数据库 XML模型,并 在映射关系表中记录对应的映射关系; 按照所述映射关系表中记录的映射关 系, 将关系数据库的数据导入带非关系数据库中。  20. A data migration system, comprising at least one relational database and one non-relational database, further comprising: a data migration device, configured to obtain a relational database library table SCHEMA information from a relational database; and map the SCHEMA information The non-relational database XML model is formed, and the corresponding mapping relationship is recorded in the mapping relationship table; according to the mapping relationship recorded in the mapping relationship table, the data of the relational database is imported into the non-relational database.
21、 根据权利要求 20所述的系统, 其特征在于, 所述数据迁移装置如权 利要求 11至 19任一项所述的数据迁移装置。  The system according to claim 20, wherein the data migration device is the data migration device according to any one of claims 11 to 19.
PCT/CN2011/077102 2011-07-13 2011-07-13 Data migration method, data migration device and data migration system WO2012083679A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/077102 WO2012083679A1 (en) 2011-07-13 2011-07-13 Data migration method, data migration device and data migration system
CN2011800012395A CN102308297B (en) 2011-07-13 2011-07-13 Data migration method, data migration device and data migration system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/077102 WO2012083679A1 (en) 2011-07-13 2011-07-13 Data migration method, data migration device and data migration system

Publications (1)

Publication Number Publication Date
WO2012083679A1 true WO2012083679A1 (en) 2012-06-28

Family

ID=45381255

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/077102 WO2012083679A1 (en) 2011-07-13 2011-07-13 Data migration method, data migration device and data migration system

Country Status (2)

Country Link
CN (1) CN102308297B (en)
WO (1) WO2012083679A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10002142B2 (en) 2012-09-29 2018-06-19 International Business Machines Corporation Method and apparatus for generating schema of non-relational database
CN112783856A (en) * 2019-11-07 2021-05-11 北京沃东天骏信息技术有限公司 Data migration method and device
TWI740899B (en) * 2016-03-22 2021-10-01 香港商阿里巴巴集團服務有限公司 Optimization method, evaluation method, processing method and device for data migration

Families Citing this family (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514201B (en) * 2012-06-27 2017-05-03 阿里巴巴集团控股有限公司 Method and device for querying data in non-relational database
CN103455589B (en) * 2013-08-29 2016-09-21 中国农业银行股份有限公司 Product data moving method under product factory mode, Apparatus and system
CN103514274A (en) * 2013-09-17 2014-01-15 宁波东冠科技有限公司 Method for data migration of non-relational database HBase
CN104657396B (en) * 2013-11-25 2020-04-24 腾讯科技(深圳)有限公司 Data migration method and device
CN103810275B (en) * 2014-02-13 2018-02-09 清华大学 Method and apparatus for data interaction between non-relation and relevant database
CN105095237B (en) * 2014-04-30 2018-07-17 国际商业机器公司 Method and apparatus for the pattern for generating non-relational database
CN104123392A (en) * 2014-08-11 2014-10-29 吉林禹硕动漫游戏科技股份有限公司 Tool and method for transferring relational database to HBase
KR101674924B1 (en) * 2014-09-26 2016-11-22 삼성에스디에스 주식회사 Method and apparatus for database migration
CN105574042A (en) * 2014-10-17 2016-05-11 中国移动通信集团公司 Processing method and apparatus for electronic health record data
US10409835B2 (en) * 2014-11-28 2019-09-10 Microsoft Technology Licensing, Llc Efficient data manipulation support
CN104504008B (en) * 2014-12-10 2018-10-02 华南师范大学 A kind of Data Migration algorithm based on nested SQL to HBase
US20160188710A1 (en) * 2014-12-29 2016-06-30 Wipro Limited METHOD AND SYSTEM FOR MIGRATING DATA TO NOT ONLY STRUCTURED QUERY LANGUAGE (NoSOL) DATABASE
CN105808539A (en) * 2014-12-29 2016-07-27 北京航天测控技术有限公司 Data import and export method and device
CN105373599B (en) * 2015-10-28 2017-05-31 北京汇商融通信息技术有限公司 Data mover system based on various data storing platforms
CN105550263A (en) * 2015-12-05 2016-05-04 百势软件(北京)有限公司 Assignment method and device in object-relational mapping
CN106933859B (en) * 2015-12-30 2020-10-20 中国移动通信集团公司 Medical data migration method and device
CN105938479B (en) * 2016-03-31 2019-10-22 华南师范大学 A kind of structure conversion method of relation table and non-relation table
CN106503040B (en) * 2016-09-20 2019-08-02 福建天晴数码有限公司 It is applicable in the KV database and its creation method of SQL query method
TW201820175A (en) * 2016-11-22 2018-06-01 財團法人資訊工業策進會 Data base transformation server and data base transformation method thereof
CN108228645A (en) * 2016-12-21 2018-06-29 凌群电脑股份有限公司 Big data document library system
CN107689949B (en) * 2017-03-31 2020-03-17 平安科技(深圳)有限公司 Database authority management method and system
CN109660576B (en) * 2017-10-10 2021-09-07 武汉斗鱼网络科技有限公司 User data real-time migration method, storage medium, electronic device and system
CN107807977B (en) * 2017-10-26 2020-04-03 河海大学 Object attribute metadata extraction system based on configuration
CN110555012B (en) * 2018-05-14 2022-03-25 杭州海康威视数字技术股份有限公司 Data migration method and device
CN109388670A (en) * 2018-09-18 2019-02-26 重庆航天职业技术学院 A kind of conversion method of XML and relational database
CN110580246B (en) * 2019-07-30 2023-10-20 平安科技(深圳)有限公司 Method, device, computer equipment and storage medium for migrating data
CN110716913B (en) * 2019-07-31 2022-12-20 安徽四创电子股份有限公司 Mutual migration method of Kafka and Elasticissearch database data
CN110674113A (en) * 2019-09-24 2020-01-10 咪咕音乐有限公司 One-key migration method and device for data, electronic equipment and storage medium
CN113901031A (en) * 2021-10-21 2022-01-07 掌阅科技股份有限公司 Database migration method, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1687927A (en) * 2005-05-08 2005-10-26 浙江大学 Method for implementing automatic exchange of information system data
CN1815468A (en) * 2005-01-31 2006-08-09 微软公司 Integration of a non-relational query language with a relational data store
CN101697166A (en) * 2009-10-28 2010-04-21 浪潮电子信息产业股份有限公司 Method for accelerating data integration of heterogeneous platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7103611B2 (en) * 2003-05-01 2006-09-05 Oracle International Corporation Techniques for retaining hierarchical information in mapping between XML documents and relational data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1815468A (en) * 2005-01-31 2006-08-09 微软公司 Integration of a non-relational query language with a relational data store
CN1687927A (en) * 2005-05-08 2005-10-26 浙江大学 Method for implementing automatic exchange of information system data
CN101697166A (en) * 2009-10-28 2010-04-21 浪潮电子信息产业股份有限公司 Method for accelerating data integration of heterogeneous platform

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10002142B2 (en) 2012-09-29 2018-06-19 International Business Machines Corporation Method and apparatus for generating schema of non-relational database
TWI740899B (en) * 2016-03-22 2021-10-01 香港商阿里巴巴集團服務有限公司 Optimization method, evaluation method, processing method and device for data migration
CN112783856A (en) * 2019-11-07 2021-05-11 北京沃东天骏信息技术有限公司 Data migration method and device

Also Published As

Publication number Publication date
CN102308297B (en) 2013-06-05
CN102308297A (en) 2012-01-04

Similar Documents

Publication Publication Date Title
WO2012083679A1 (en) Data migration method, data migration device and data migration system
US11520780B2 (en) Distributed database systems and structures
US11281531B2 (en) Serial storage node processing of data functions
JP6602355B2 (en) Cloud-based distributed persistence and cache data model
CN110032604B (en) Data storage device, translation device and database access method
CN102663117B (en) OLAP (On Line Analytical Processing) inquiry processing method facing database and Hadoop mixing platform
Schram et al. MySQL to NoSQL: data modeling challenges in supporting scalability
CN109491989B (en) Data processing method and device, electronic equipment and storage medium
CN103312791A (en) Internet of things heterogeneous data storage method and system
CN104573068A (en) Information processing method based on megadata
US10642837B2 (en) Relocating derived cache during data rebalance to maintain application performance
CN104462185A (en) Digital library cloud storage system based on mixed structure
CN103078898B (en) File system, interface service device and data storage service supplying method
CN104050276A (en) Cache processing method and system of distributed database
US11386063B2 (en) Data edge platform for improved storage and analytics
CN105069151A (en) HBase secondary index construction apparatus and method
EP4390717A1 (en) Metadata management method, related apparatus, device, and storage medium
CN108427728A (en) Management method, equipment and the computer-readable medium of metadata
CN114328759A (en) Data construction and management method and terminal of data warehouse
US10990324B2 (en) Storage node processing of predefined data functions
CN105022779A (en) Method for realizing HDFS file access by utilizing Filesystem API
Ye Research on the key technology of big data service in university library
CN109413130A (en) A kind of cloud storage system
WO2014180395A1 (en) Mass data fusion storage method and system
US9292523B1 (en) Managing data storage

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180001239.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11852082

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

Country of ref document: EP

Kind code of ref document: A1