WO2019127282A1 - Database merging method and apparatus - Google Patents

Database merging method and apparatus Download PDF

Info

Publication number
WO2019127282A1
WO2019127282A1 PCT/CN2017/119588 CN2017119588W WO2019127282A1 WO 2019127282 A1 WO2019127282 A1 WO 2019127282A1 CN 2017119588 W CN2017119588 W CN 2017119588W WO 2019127282 A1 WO2019127282 A1 WO 2019127282A1
Authority
WO
WIPO (PCT)
Prior art keywords
data table
target data
field
record
source
Prior art date
Application number
PCT/CN2017/119588
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/CN2017/119588 priority Critical patent/WO2019127282A1/en
Priority to CN201780037501.9A priority patent/CN109690521B/en
Publication of WO2019127282A1 publication Critical patent/WO2019127282A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application provides a method and apparatus for database merging, which quickly and securely merges databases through a lightweight method.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for merging databases in the present application
  • FIG. 2 is a schematic diagram of a sub-flow of the embodiment of step S10 of FIG. 1;
  • FIG. 3 is a schematic diagram of a sub-flow of the embodiment of step S11 of FIG. 1;
  • FIG. 5 is a schematic diagram of a sub-flow of the embodiment of step S12 of FIG. 1;
  • step S12 of FIG. 1 is a schematic diagram of still another sub-flow of an embodiment of step S12 of FIG. 1;
  • Figure 8 is a schematic diagram of the same structured target data table of Figure 6 merged according to the method of Figure 7;
  • FIG. 9 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG.
  • Figure 10 is a schematic diagram of the same structured target data table of Figure 6 merged according to the method of Figure 9;
  • FIG. 11 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG. 1;
  • FIG. 12 is a schematic diagram of the same structured target data table of FIG. 6 merged according to the method of FIG. 11;
  • FIG. 13 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG.
  • FIG. 14 is a schematic structural diagram of an apparatus for merging a database according to the present application.
  • FIG. 1 is a schematic flowchart of a method for merging a database of the present application, and the specific gap detection method includes the following steps:
  • S10 Obtain a target data table and a source data table from the target database and the source database, respectively.
  • the target data table and the source data table are respectively acquired from the target database and the source database. Specifically, the table name of all the tables stored in the target database is traversed, and the table names of all the tables stored in the source database are traversed, and two tables corresponding to the table names are respectively selected from the two databases.
  • Each target data table and source data table includes multiple fields and multiple records, and includes multiple field values.
  • a field refers to a column of a table
  • a record refers to a row of a table
  • a field value refers to a field and a specific value corresponding to the record.
  • both the target data table and the source data table have a unique identification field.
  • all field values under this identity field are unique, such as number, student ID, and so on.
  • S11 Perform the same structural processing on the target data table according to the field difference between the target data table and the source data table to obtain the same structured target data table.
  • the target data table Before the merge, the same data structure needs to be performed on the target data table and the source data table, that is, the target data table has the same field as the source data table.
  • the target data table is operated, so the target database can be backed up and the source database can be read-only.
  • the temporary table adds missing fields or deletes redundant fields relative to the target data table, or adds missing fields and deletes redundant fields.
  • the same structured target data table may be filled and filled as needed, so that the same field value as the structured target data table field is retained in the record of the target data table in the same structured target data table.
  • the field value of the same field as the temporary table in the record of the target data table may be filled into the temporary table, and the field value corresponding to the field in the record of the temporary table different from the target data table shall be the corresponding field of the corresponding record in the source data table.
  • the field values are populated.
  • the temporary table is set to the same structured target data table, so that the same structured target data table after the same structured processing is obtained.
  • the obtained source data table is merged with the same structured target data table.
  • the user may need to protect part of the data, so in the actual merge process, first determine the protection data, including the protection record and the field, or choose not to protect, here is not limited, and then according to the user Choose to use a different method.
  • FIG. 2 is a schematic diagram of a sub-flow of a method for merging a database of the present application.
  • FIG. 1 is a sub-flow diagram of an embodiment of step S10 of the present application, and the embodiment is further extended based on step S10 of the first embodiment of the present application.
  • the embodiment includes the following sub-steps.
  • the table name has a corresponding relationship, and the table names may be the same or similar, so the table names of the tables stored in the target data are respectively traversed, and the source database is traversed by the same method.
  • a table corresponding to the table name and stored in the target database and the source database respectively is used as the target data table and the source data table.
  • the table in the target data if there is a table in the source data corresponding to the table name of the table, the table in the target database is used as the target data table, and the table corresponding to the table name in the source data is used.
  • the correspondence here may be the same or similar or other correspondence.
  • the temporary table Since only the fields are set for the temporary table, it is also necessary to fill the temporary table with records, including recording and filling the same fields of the temporary table and the target data table. For the same field in the temporary table as in the target database, the field values corresponding to this field in the target data table are sequentially filled into the fields corresponding to the temporary table in order. In particular, since both the target data table and the source data table have an identification field, there must be an identification field in the temporary table.
  • the current temporary table already has the same fields as the source data table, that is, it has the same structure, and also populates the temporary table with data, that is, the same structural completion, and sets the temporary table to the same structured target data table. .
  • FIG. 4 is a detailed schematic diagram of the same structure of FIG. This includes source data tables, target data tables, and temporary tables.
  • the name is used as the identification field.
  • the job number and age in the field exist in both the source data table and the target data table, so the field value is obtained from the target data table, but for the salary field, as
  • the identification field A is the target data table and the identifier field value shared by the source data table, so the salary of A can be filled by the salary of the source data table corresponding to A, but for Ding, because the identification field in the source data table is also That is, there is no such field value under the name, so it cannot be filled, it is empty.
  • FIG. 5 is a schematic diagram of a sub-flow of the embodiment of the present invention. The following substeps are included.
  • the user may need to protect certain data, so the user-protected data needs to be determined, and the data to be protected is skipped in the subsequent merge process.
  • the protected data may be a field or a record.
  • the protection data here is specifically to specify the same structured target data table.
  • S122 Perform data combining on the same structured target data table and the source data table on the basis of skipping the protected record or the protected field.
  • the data is skipped, that is, in the subsequent merge process, the records or fields do not participate in the merge, and no changes are made, and then the same
  • the structured data table and the source data table are merged.
  • FIG. 6 is a schematic diagram of two source data tables of a structured target data table that need to be merged in the method for database merge of the present application.
  • the identification fields of the same structured data table and the source data table are numbered.
  • the identification field herein is not limited, and may be a job number, a student number, a name, and the like.
  • 1, 2, 3 are the field values of the identification field of the same structured data table, the row where 1 is located is the record corresponding to it, and Zhang San is the field value of the name field in the same structured data table, that is, 1 A field value for the corresponding record.
  • FIG. 7 is a schematic diagram of another sub-flow of the embodiment of step S12 of FIG.
  • the embodiment is a further extension based on the step S12 of the first embodiment of the present application, and is also one of three combinations, and the embodiment specifically includes the following sub-steps.
  • S121a compares the value of the field corresponding to the identification field in the record of the source data table and the identifier of the source data table.
  • the comparison field is required to be compared by the identification field, that is, to compare the field values of the structured target data table and the identification field of the source data table. If the source data table and the identification field of the structured target data table are numbered, each numbered value of the structured target data table is compared with each numbered value of the source data table.
  • Add the identified missing records to the same structured target data table That is, as in the above steps, adding the records of the same structured target data table relative to the source data is the records corresponding to 4 and 5, and deleting the redundant records, that is, deleting the same structured target data table relative to the source data.
  • the missing records are the records corresponding to 1 and 2.
  • FIG. 8 is a schematic diagram of the same structured target data table merged by FIG. 6 according to the method of FIG.
  • the structured target data table is redundant with the records corresponding to 1 and 2 with respect to the source data table, but the records corresponding to 4 and 5 are missing. Therefore, in the merged data table, the records corresponding to 1 and 2 are deleted from the target data table, and the records corresponding to 4 and 5 are added, and the records corresponding to 3 are not modified, and FIG. 8 is obtained.
  • FIG. 9 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG. 1 , which is a further extension of step S12 of the first embodiment of the present application.
  • This embodiment specifically includes the following sub-steps.
  • S121b compares the field values in the records of the structured target data table with the source data table.
  • FIG. 10 is a schematic diagram of the same structured target data table merged by FIG. 6 according to the method of FIG.
  • FIG. 11 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG. 1 according to the method for database merging of the present application, and the embodiment is further extended based on step S12 of the first embodiment of the present application.
  • the embodiment specifically includes the following sub-steps.
  • the third thread is used to cyclically read the record from the same structured target data table and store it in the third buffer area.
  • the present application provides a method and apparatus for merging databases by taking two data tables from two databases by traversing, and then performing the same structure on the two data tables. After determining the protection data, the two data tables are merged in multiple ways by means of multi-threading and buffers, thereby quickly completing the merge, and in the present application, there is a perfect data protection mechanism in the merge process. There will be no loss or damage to the data.

Abstract

Disclosed in the present application are a database merging method and apparatus. The method comprises: respectively obtaining a target data table and a source data table from a target database and a source database, wherein the target data table comprises a plurality of fields and a plurality of entries, the source data table also comprises a plurality of fields and a plurality of entries, and each entry comprises field values respectively corresponding to the fields; performing same-structural processing on the target data table according to a field different between the target data table and the source data table to obtain a same-structured target data table; and performing data merging on the source data table and the same-structured target data table. According to the method above, the present application can merge databases quickly and improve the merging modes in the prior art.

Description

一种数据库合并的方法以及装置Method and device for database merging 【技术领域】[Technical Field]
本申请涉及到数据库领域,特别是涉及一种数据库合并的方法以及装置。The present application relates to the field of databases, and in particular, to a method and apparatus for database merging.
【背景技术】【Background technique】
数据库由于具有高负载、高响应、多并发、支持原子操作、支持多版本控制等优良性能,已成为数据存储的首选方式。现今许多软件和网站,上至云计算中心、下至即时聊天软件,都使用数据库来存储数据。在使用数据库的过程中,常常需要使用一个源数据库去更新一个目标数据库。而此时,便需要将数据库合并。另外,还有其他需要整合数据时,也需要将数据库合并。Databases have become the preferred method of data storage due to their high load, high response, multiple concurrency, support for atomic operations, and support for multi-version control. Many software and websites today, from cloud computing centers to instant chat software, use databases to store data. In the process of using the database, it is often necessary to use a source database to update a target database. At this point, you need to merge the databases. In addition, there are other ways to consolidate data and also need to merge the databases.
常见的合并数据库通常由数据库维护人员手动完成。维护人员分别导出要合并的两个数据库,以某种视图打开,再借助其他的比较工具来合并数据库,自动化程度比较低下。某些商业数据库可能会提供关联的合并工具,但仅仅适用于其相关的数据库产品。而且由于一些关系式数据库作为免费软件,开发者也并未提供相关工具,所以该合并工具无法应用在一些关系式数据库的场合。还有某些数据库服务厂商,通常倾向于提供整套数据库服务,索取高昂的服务费。相应地,此类产品通常也是庞大臃肿、反应迟缓、难于维护。Common merged databases are usually done manually by database maintainers. The maintenance personnel separately export the two databases to be merged, open them in a certain view, and then merge the databases with other comparison tools, and the degree of automation is relatively low. Some commercial databases may provide associated merge tools, but only for their associated database products. And because some relational databases are free software and developers don't provide tools, the merge tool can't be used in some relational databases. There are also some database service vendors that tend to offer a full suite of database services for high service fees. Accordingly, such products are often bulky, sloppy, and difficult to maintain.
【发明内容】[Summary of the Invention]
本申请提供一种数据库合并的方法以及装置,通过轻量化的方法对数据库进行快速且安全的合并。The present application provides a method and apparatus for database merging, which quickly and securely merges databases through a lightweight method.
本申请采用的一个技术方案是:提供一种数据库合并的方法,包括步骤:分别从目标数据库和源数据库获取目标数据表和源数据表,其中所述目标数据表包括多个字段以及多条记录,所述源数据表也包括多个字段以 及多条记录,每条记录包括分别与所述字段对应的字段值;根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理,以获取同结构化目标数据表;在所述源数据表和所述同结构化目标数据表的基础上进行数据合并。A technical solution adopted by the present application is to provide a method for database merging, comprising the steps of: obtaining a target data table and a source data table respectively from a target database and a source database, wherein the target data table includes multiple fields and multiple records. The source data table also includes a plurality of fields and a plurality of records, each of the records including a field value respectively corresponding to the field; and the target data according to a field difference between the target data table and the source data table The table performs the same structured processing to obtain the same structured target data table; and the data is merged on the basis of the source data table and the same structured target data table.
为解决上述技术问题,本申请采用的另一个技术方案是:一种数据库合并的装置,包括:处理器、存储器,所述处理器连接所述存储器,所述处理器通过运行所述存储器内存储的程序执行以下步骤:分别从目标数据库和源数据库获取目标数据表和源数据表,其中所述目标数据表包括多个字段以及多条记录,所述源数据表也包括多个字段以及多条记录,每条记录包括分别与所述字段对应的字段值;根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理,以获取同结构化目标数据表;在所述源数据表和所述同结构化目标数据表的基础上进行数据合并。In order to solve the above technical problem, another technical solution adopted by the present application is: a device for database consolidation, comprising: a processor, a memory, the processor is connected to the memory, and the processor is configured to run the in-memory storage The program performs the following steps: obtaining a target data table and a source data table from the target database and the source database, wherein the target data table includes a plurality of fields and a plurality of records, the source data table also includes a plurality of fields and a plurality of Recording, each record includes a field value corresponding to the field respectively; performing the same structural processing on the target data table according to the difference between the target data table and the source data table to obtain the same structured target data a table; data merging is performed on the basis of the source data table and the same structured target data table.
本申请的有益效果是:提供了一种数据库合并的方式以及装置,通过将分别从源数据库以及目标数据库中获取的源数据表以及目标数据表进行同结构化在进行合并,从而实现了通过轻量化的方法对数据库进行快速且安全的合并。The beneficial effects of the present application are as follows: a method and a device for merging a database are provided, which are realized by merging the source data table and the target data table respectively obtained from the source database and the target database. A quantitative approach to the rapid and secure consolidation of databases.
【附图说明】[Description of the Drawings]
图1是本申请数据库合并的方法一实施方式的流程示意图1 is a schematic flow chart of an embodiment of a method for merging databases in the present application
图2是本申请数据库合并的方法图1步骤S10一实施方式的子流程示意图;2 is a schematic diagram of a sub-flow of the embodiment of step S10 of FIG. 1;
图3是本申请数据库合并的方法图1步骤S11一实施方式的子流程示意图;3 is a schematic diagram of a sub-flow of the embodiment of step S11 of FIG. 1;
图4是图3同结构化的具体示意图;Figure 4 is a detailed schematic view of the same structure of Figure 3;
图5是本申请数据库合并的方法图1步骤S12一实施方式的子流程示意图;5 is a schematic diagram of a sub-flow of the embodiment of step S12 of FIG. 1;
图6是本申请数据库合并的方法的两个需要合并的结构化目标数据表以源数据表的示意图;6 is a schematic diagram of two source data tables of a structured target data table that need to be merged in the method for database merge of the present application;
图7是图1步骤S12一实施方式的又一子流程示意图;7 is a schematic diagram of still another sub-flow of an embodiment of step S12 of FIG. 1;
图8是图6依照图7的方法合并后的同结构化目标数据表的示意图;Figure 8 is a schematic diagram of the same structured target data table of Figure 6 merged according to the method of Figure 7;
图9是本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图;FIG. 9 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG.
图10是图6依照图9的方法合并后的同结构化目标数据表的示意图;Figure 10 is a schematic diagram of the same structured target data table of Figure 6 merged according to the method of Figure 9;
图11是本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图;11 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG. 1;
图12是图6依照图11的方法合并后的同结构化目标数据表的示意图;12 is a schematic diagram of the same structured target data table of FIG. 6 merged according to the method of FIG. 11;
图13是本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图;FIG. 13 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG.
图14是本申请一种数据库合并的装置一实施方式的结构示意图。FIG. 14 is a schematic structural diagram of an apparatus for merging a database according to the present application.
【具体实施方式】【Detailed ways】
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
请参阅图1,图1本申请数据库合并的方法一实施方式的流程示意图,且具体的缝隙检测方法包括以下步骤:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a method for merging a database of the present application, and the specific gap detection method includes the following steps:
S10,分别从目标数据库和源数据库获取目标数据表和源数据表。S10: Obtain a target data table and a source data table from the target database and the source database, respectively.
在本实施例中,由于具体的操作对象是数据库中的各个数据表,所以先从目标数据库中以及源数据库中分别获取目标数据表以及源数据表。具体是通过对存储在目标数据库中的所有表的表名进行遍历,同时对存储在源数据库中的所有表的表名进行遍历,分别从两个数据库中选出表名对应的两个表,作为目标数据表以及源数据表。每个目标数据表和源数据表都包括多个字段以及多条记录,并包括了多个字段值。优选的,一个字段是指一个表的一个列,一条记录是指一个表的一行,字段值是指字段以及记录所对应的具体一个值。In this embodiment, since the specific operation object is each data table in the database, the target data table and the source data table are respectively acquired from the target database and the source database. Specifically, the table name of all the tables stored in the target database is traversed, and the table names of all the tables stored in the source database are traversed, and two tables corresponding to the table names are respectively selected from the two databases. As the target data table and the source data table. Each target data table and source data table includes multiple fields and multiple records, and includes multiple field values. Preferably, a field refers to a column of a table, a record refers to a row of a table, and a field value refers to a field and a specific value corresponding to the record.
特别的,在本实施例中,目标数据表以及源数据表都有一个唯一标识字段。对于一个表中,这个标识字段下的所有字段值都是唯一的,比如编号、学籍号等。In particular, in this embodiment, both the target data table and the source data table have a unique identification field. For a table, all field values under this identity field are unique, such as number, student ID, and so on.
S11,根据目标数据表和源数据表的字段差异对目标数据表进行同结构化处理,以获取同结构化目标数据表。S11: Perform the same structural processing on the target data table according to the field difference between the target data table and the source data table to obtain the same structured target data table.
在合并前,需要对目标数据表以及源数据表进行同结构操作,也就是使得目标数据表与源数据表具有相同的字段。在本实施例中,是对目标数据表进行操作,所以可以对目标数据库进行备份以及对源数据库进行只读声明。为使得目标数据表与源数据表有着相同的字段,需要在对目标数据表以及源数据表进行遍历,得到目标数据表相对源数据表多余或缺少的字段,然后创建一个临时表。其中临时表相对目标数据表增加了缺少的字段或者删除了多余的字段,或者即增加了缺少的字段又删除了多余的字段。另外,还可根据需要对同结构化目标数据表进行记录填充,以使得在同结构化目标数据表中保留目标数据表的记录中与同结构化目标数据表字段相同的字段值。可以将目标数据表的记录中与临时表相同字段的字段值填充到临时表中,并将临时表的记录中与目标数据表不同的字段所对应字段值由源数据表中对应记录的对应字段的字段值进行填充。最后,将临时表设置为同结构化目标数据表,这样就得到了同结构化处理后的同结构化目标数据表。Before the merge, the same data structure needs to be performed on the target data table and the source data table, that is, the target data table has the same field as the source data table. In this embodiment, the target data table is operated, so the target database can be backed up and the source database can be read-only. In order to make the target data table and the source data table have the same field, it is necessary to traverse the target data table and the source data table to obtain a field that the target data table is redundant or missing from the source data table, and then create a temporary table. The temporary table adds missing fields or deletes redundant fields relative to the target data table, or adds missing fields and deletes redundant fields. In addition, the same structured target data table may be filled and filled as needed, so that the same field value as the structured target data table field is retained in the record of the target data table in the same structured target data table. The field value of the same field as the temporary table in the record of the target data table may be filled into the temporary table, and the field value corresponding to the field in the record of the temporary table different from the target data table shall be the corresponding field of the corresponding record in the source data table. The field values are populated. Finally, the temporary table is set to the same structured target data table, so that the same structured target data table after the same structured processing is obtained.
S12,在源数据表和同结构化目标数据表的基础上进行数据合并。S12: Perform data combining on the basis of the source data table and the same structured target data table.
在得到同结构化目标数据表以及源数据表后,则对得到的源数据表与同结构化目标数据表进行合并。但是在实际操作中,用户可能需要对部分数据进行保护,所以在实际的合并过程中,先确定保护数据,包括保护记录以及字段,也可以选择不保护,这里不做限定,然后根据用户的不同选择使用不同的方法。After obtaining the same structured target data table and the source data table, the obtained source data table is merged with the same structured target data table. However, in actual operation, the user may need to protect part of the data, so in the actual merge process, first determine the protection data, including the protection record and the field, or choose not to protect, here is not limited, and then according to the user Choose to use a different method.
参见图2,图2为本申请数据库合并的方法图1步骤S10一实施方式的子流程示意图,且该实施例是在本申请第一实施例步骤S10的基础上的进一步扩展,该步骤在本实施方式中具体包括如下子步骤。Referring to FIG. 2, FIG. 2 is a schematic diagram of a sub-flow of a method for merging a database of the present application. FIG. 1 is a sub-flow diagram of an embodiment of step S10 of the present application, and the embodiment is further extended based on step S10 of the first embodiment of the present application. The embodiment includes the following sub-steps.
S101,分别对目标数据和原数据中所存储的表格的表名进行遍历。S101, traversing the table name of the table stored in the target data and the original data, respectively.
在对数据库的实际操作中,其实就是对数据库存储的表进行操作,所以需要将所需要合并的源数据表以及目标数据表找出来。在具体的操作过程中,对于需要合并的数据库中的一个表,在源数据中也有这么一个对应的表存在。具体是表名存在对应关系,可以是表名相同或者相似,所以分别对每个存储在目标数据中的表的表名进行遍历,同时用相同的方法遍历源数据库。In the actual operation of the database, it is actually the operation of the table stored in the database, so you need to find the source data table and the target data table that need to be merged. In the specific operation process, for a table in the database to be merged, there is such a corresponding table in the source data. Specifically, the table name has a corresponding relationship, and the table names may be the same or similar, so the table names of the tables stored in the target data are respectively traversed, and the source database is traversed by the same method.
S102,将表名对应且分别存储于目标数据库和源数据库中的表格作为目标数据表和源数据表。S102, a table corresponding to the table name and stored in the target database and the source database respectively is used as the target data table and the source data table.
对于目标数据中的一个表,如果源数据中存在一个表名与该表的表名相对应的一个表,则将目标数据库中的这个表作为目标数据表,将源数据中表名所对应的表作为源数据表。这里的对应可以是相同或者相似或者其他的对应关系。For a table in the target data, if there is a table in the source data corresponding to the table name of the table, the table in the target database is used as the target data table, and the table corresponding to the table name in the source data is used. As a source data table. The correspondence here may be the same or similar or other correspondence.
参见图3,图3为本申请数据库合并的方法图1步骤S11一实施方式的子流程示意图,且该实施例是在本申请第一实施例步骤S11的基础上的进一步扩展,该实施方式具体包括如下子步骤。Referring to FIG. 3, FIG. 3 is a schematic diagram of a sub-flow of the method for merging the database of the present application. FIG. 1 is a schematic diagram of a sub-flow of the step S11 of the first embodiment of the present application, and the embodiment is further extended based on the step S11 of the first embodiment of the present application. The following substeps are included.
S111,分别对目标数据表和源数据表中的字段进行遍历,以确定目标数据表相对于源数据表缺少的字段和多余的字段。S111, traversing the fields in the target data table and the source data table respectively to determine a field and an extra field that are missing from the target data table relative to the source data table.
由于源数据表以及目标数据表中可能字段不同,这样就会导致合并时候出现数据错误。所以,首先要对目标数据表进行与源数据表的同样结构化,也就是使得目标数据表与源数据表有着相同的字段。因此,要对目标数据表以及源数据表中的字段进行遍历,得到目标数据表中相对于源数据表中缺少的一些字段以及多余的一些字段,并记录下来。Because the source data table and the possible fields in the target data table are different, this will result in data errors during the merge. Therefore, the target data table must first be structured the same as the source data table, that is, the target data table has the same fields as the source data table. Therefore, the target data table and the fields in the source data table are traversed, and some fields and some redundant fields in the target data table that are missing from the source data table are obtained and recorded.
S112,建立一临时表并进行字段设置,以使得临时表相对于目标数据表增加了缺少的字段并删除多余的字段。S112. Create a temporary table and set the field so that the temporary table adds missing fields and deletes redundant fields with respect to the target data table.
在具体的数据库操作中,为了保护数据以及操作过程中防止数据的误删,丢失等等,一般都采用备份以及建立临时表的方法。所以首先建立一个临时表,再给这个临时表设置字段,使得临时表相对目标数据表而言,增加了前一步骤记录的缺少的字段,删除了前一步骤所记录的所多余的字段。也就是说,这个临时表与源数据表有着相同的字段。In the specific database operation, in order to protect the data and prevent the accidental deletion, loss, etc. of the data during the operation, the backup and the method of establishing the temporary table are generally adopted. So first create a temporary table, and then set the field to the temporary table, so that the temporary table relative to the target data table, the missing field in the previous step is added, and the redundant fields recorded in the previous step are deleted. That is, this temporary table has the same fields as the source data table.
S113,将目标数据表的记录中与临时表相同字段的字段值填充到临时表中。S113. Fill in the field value of the same field as the temporary table in the record of the target data table into the temporary table.
由于只对临时表设置了字段,所以还需要对临时表填充记录,其中包括对临时表与目标数据表相同的字段进行记录填充。对于临时表中与目标数据库中相同的字段,就将目标数据表中这个字段所对应的字段值依次按照顺序填充到临时表对应的字段中。其中,特别的,由于目标数据表与源数据表都有一个标识字段,所以临时表中也必有标识字段。Since only the fields are set for the temporary table, it is also necessary to fill the temporary table with records, including recording and filling the same fields of the temporary table and the target data table. For the same field in the temporary table as in the target database, the field values corresponding to this field in the target data table are sequentially filled into the fields corresponding to the temporary table in order. In particular, since both the target data table and the source data table have an identification field, there must be an identification field in the temporary table.
S114,将临时表的记录中与目标数据表不同的字段所对应字段值由源数据表中对应记录的对应字段的字段值进行填充。S114. Fill the field value corresponding to the field different from the target data table in the record of the temporary table by the field value of the corresponding field of the corresponding record in the source data table.
由于临时表相对目标数据表会多余一定字段,而这些字段由于来自源数据表,所以在目标数据表中不存在这些字段所对应的字段值,所以这些字段的字段值需要从源数据库中获取。在实际操作中,比如一个字段指的是年龄,而一个记录指的是甲的信息,这甲的年龄的这个字段值是由字段以及记录一起决定的。从而可以得知,对于不存在的字段,如在目标数据表中没有甲的工资,但是临时表却多了一个工资字段,则甲的工资如果需要填充的话,需要从源数据库中得到。这里就需要一个唯一标识字段的字段值来确定,假设在表中的唯一标识字段就是姓名,对于甲的工资,如果在源数据表中的唯一标识字段的字段值也有甲,则将源数据表甲所对应的工资填入到临时表甲所对应的工资,如果在源数据表中的唯一标识字段的字段值不存在甲,则不进行填充。Since the temporary table has a certain number of fields relative to the target data table, and these fields are from the source data table, the field values corresponding to these fields do not exist in the target data table, so the field values of these fields need to be obtained from the source database. In practice, for example, a field refers to age, and a record refers to information of A. The value of this field of age is determined by the field and the record. Therefore, it can be known that for a field that does not exist, such as no salary in the target data table, but the temporary table has a salary field, if the salary of A needs to be filled, it needs to be obtained from the source database. Here we need a field value that uniquely identifies the field to determine, assuming that the unique identifier field in the table is the name, for the salary of A, if the field value of the unique identifier field in the source data table also has A, then the source data table The salary corresponding to A is filled in to the salary corresponding to the temporary table A. If the field value of the unique identification field in the source data table does not exist, then no padding is performed.
S115,将临时表设置为同结构化目标数据表。S115, setting the temporary table to the same structured target data table.
现在的临时表已经有了和源数据表相同的字段,也就是有着一样的结构了,同时也对临时表填充了数据,也就是同结构化完成,将临时表设置为同结构化目标数据表。The current temporary table already has the same fields as the source data table, that is, it has the same structure, and also populates the temporary table with data, that is, the same structural completion, and sets the temporary table to the same structured target data table. .
请在具体参阅图4,图4是图3同结构化的具体示意图。其中包括源数据表、目标数据表以及临时表。其中,在本实施例中,姓名作为标识字段。Please refer to FIG. 4 for details. FIG. 4 is a detailed schematic diagram of the same structure of FIG. This includes source data tables, target data tables, and temporary tables. In this embodiment, the name is used as the identification field.
可以看出,在临时表中,对于甲而言,字段中工号以及年龄同时存在与源数据表以及目标数据表中,所以从目标数据表中获取字段值,但对于 工资字段而言,作为标识字段,甲是目标数据表以及源数据表共有的标识字段值,所以甲的工资可以由源数据表对应甲的工资进行填充,但是对于丁而言,由于在源数据表中的标识字段也就是姓名下面没有这个字段值,所以无法进行填充,则为空。It can be seen that in the temporary table, for A, the job number and age in the field exist in both the source data table and the target data table, so the field value is obtained from the target data table, but for the salary field, as The identification field, A is the target data table and the identifier field value shared by the source data table, so the salary of A can be filled by the salary of the source data table corresponding to A, but for Ding, because the identification field in the source data table is also That is, there is no such field value under the name, so it cannot be filled, it is empty.
参见图5,图5为本申请数据库合并的方法图1步骤S12一实施方式的子流程示意图,且该实施例是在本申请第一实施例步骤S12的基础上的进一步扩展,该实施方式具体包括如下子步骤。FIG. 5 is a schematic diagram of a sub-flow of the embodiment of the present invention. The following substeps are included.
S121,在同结构化目标数据表中指定受保护记录或受保护字段。S121, specifying a protected record or a protected field in the same structured target data table.
在实际操作中,用户可能需要对某些数据进行保护,所以需要确定用户保护的数据,在后续的合并过程中对需要保护的数据进行跳过,这些保护的数据可以是字段,也可以是记录,确定需要保护的数据,这里的保护数据具体是对同结构化的目标数据表进行指定。In actual operation, the user may need to protect certain data, so the user-protected data needs to be determined, and the data to be protected is skipped in the subsequent merge process. The protected data may be a field or a record. To determine the data to be protected, the protection data here is specifically to specify the same structured target data table.
S122,在跳过受保护记录或受保护字段的基础上对同结构化目标数据表和源数据表进行数据合并。S122: Perform data combining on the same structured target data table and the source data table on the basis of skipping the protected record or the protected field.
在确定了受保护字段或手保护记录后,在后续的合并过程中,跳过这些数据,也就是在后续的合并过程中,这些记录或者字段不参与合并,也不进行任何改动,然后对同结构化数据表以及源数据表进行合并。After the protected field or hand protection record is determined, in the subsequent merge process, the data is skipped, that is, in the subsequent merge process, the records or fields do not participate in the merge, and no changes are made, and then the same The structured data table and the source data table are merged.
参见图6,图6为本申请数据库合并的方法的两个需要合并的结构化目标数据表以源数据表的示意图。Referring to FIG. 6, FIG. 6 is a schematic diagram of two source data tables of a structured target data table that need to be merged in the method for database merge of the present application.
其中,同结构化数据表以及源数据表的标识字段为编号。在其他实施例中,这里的标识字段不作限制,可以是工号、学号、姓名等。其中,1、2、3为同结构化数据表的标识字段的字段值,1所在的一行就是其所对应的记录,张三是同结构化数据表中姓名字段的字段值,也就1所对应的记录的一个字段值。The identification fields of the same structured data table and the source data table are numbered. In other embodiments, the identification field herein is not limited, and may be a job number, a student number, a name, and the like. Among them, 1, 2, 3 are the field values of the identification field of the same structured data table, the row where 1 is located is the record corresponding to it, and Zhang San is the field value of the name field in the same structured data table, that is, 1 A field value for the corresponding record.
参见图7,图7为本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图。且该实施例是在本申请第一实施例步骤S12的基础上的进一步扩展,也是三种合并方式的其中一种,该实施方式具体包括如下子步骤。Referring to FIG. 7, FIG. 7 is a schematic diagram of another sub-flow of the embodiment of step S12 of FIG. The embodiment is a further extension based on the step S12 of the first embodiment of the present application, and is also one of three combinations, and the embodiment specifically includes the following sub-steps.
S121a,将同结构化目标数据表与源数据表的记录中起到标识作用的标 识字段所对应的字段值进行对比。S121a compares the value of the field corresponding to the identification field in the record of the source data table and the identifier of the source data table.
在本实施例中,需要通过标识字段来进行对比合并,也就是来对比结构化目标数据表以及源数据表的标识字段的字段值。如源数据表以及结构化目标数据表的标识字段为编号,则将结构化目标数据表的每个编号值与源数据表的每个编号值进行比对。In this embodiment, the comparison field is required to be compared by the identification field, that is, to compare the field values of the structured target data table and the identification field of the source data table. If the source data table and the identification field of the structured target data table are numbered, each numbered value of the structured target data table is compared with each numbered value of the source data table.
S122a,确定同结构化目标数据表相对于源数据表缺少的记录和/或多余的记录。S122a, determining records and/or redundant records that are missing from the source data table with the structured target data table.
在进行比对后,确定同结构化数据表相对于源数据表不同的标识字段的字段值所对应的记录。也就是说,如同结构化数据表以及源数据表的标识字段为编号,在同结构化数据表假设编号的编号值有1、2、3,而源数据表中的编号的编号值有3、4、5,则同结构化数据表相对于源数据表而言,缺少了4、5,也就是缺少了4、5所对应的记录,多余了1、2,也就是多余了1、2所对应的记录,对其进行确定与记录。After the comparison, the records corresponding to the field values of the identification fields different from the source data table are determined. That is to say, as the identification fields of the structured data table and the source data table are numbered, the numbered value of the number in the same structured data table is 1, 2, 3, and the number of the number in the source data table has 3, 4, 5, the same structured data table relative to the source data table, the lack of 4, 5, that is, the record corresponding to 4, 5, the excess of 1, 2, that is, the excess of 1, 2 Corresponding records are determined and recorded.
S123a,在同结构化目标数据表中添加缺少的记录/或删除所述多余的记录。S123a, adding missing records in the same structured target data table/or deleting the redundant records.
在同结构化目标数据表添加所确定的缺少的记录。也就是如上述步骤而言,添加同结构化目标数据表相对于源数据所缺少的记录也就是4以及5对应的记录,删除多余的记录,也就是删除同结构化目标数据表相对于源数据所缺少的记录也就是1以及2对应的记录。Add the identified missing records to the same structured target data table. That is, as in the above steps, adding the records of the same structured target data table relative to the source data is the records corresponding to 4 and 5, and deleting the redundant records, that is, deleting the same structured target data table relative to the source data. The missing records are the records corresponding to 1 and 2.
请进一步参阅图8,图8是图6依照图7的方法合并后的同结构化目标数据表的示意图。Please refer to FIG. 8. FIG. 8 is a schematic diagram of the same structured target data table merged by FIG. 6 according to the method of FIG.
结构化目标数据表相对于源数据表而言,多余了1以及2所对应的记录,但是缺少了4以及5所对应的记录。所以在合并数据表中,相对于目标数据表而言,删除了1以及2所对应的记录,添加了4以及5所对应的记录,不对3所对应的记录进行修改,得到图8。The structured target data table is redundant with the records corresponding to 1 and 2 with respect to the source data table, but the records corresponding to 4 and 5 are missing. Therefore, in the merged data table, the records corresponding to 1 and 2 are deleted from the target data table, and the records corresponding to 4 and 5 are added, and the records corresponding to 3 are not modified, and FIG. 8 is obtained.
参见图9,图9为本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图,且该实施例是在本申请第一实施例步骤S12的基础上的进一步扩展,也是三种合并方式的其中一种。该实施方式具体包括如下子步骤。Referring to FIG. 9 , FIG. 9 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG. 1 , which is a further extension of step S12 of the first embodiment of the present application. One of the ways of combining. This embodiment specifically includes the following sub-steps.
S121b,将同结构化目标数据表与源数据表的记录中的字段值进行对比。S121b compares the field values in the records of the structured target data table with the source data table.
在本实施例中,需要通过标识字段来进行对比合并,也就是来对比结构化目标数据表以及源数据表的标识字段的字段值。如源数据表以及结构化目标数据表的标识字段为编号,则将结构化目标数据表的每个编号值与源数据表的每个编号值进行比对。In this embodiment, the comparison field is required to be compared by the identification field, that is, to compare the field values of the structured target data table and the identification field of the source data table. If the source data table and the identification field of the structured target data table are numbered, each numbered value of the structured target data table is compared with each numbered value of the source data table.
S122b,确定起到标识作用的标识字段所对应的字段值相同但其余字段所对应的字段值至少部分不同的记录。S122b: Determine, that the identifier field corresponding to the identifier field has the same field value but the field values corresponding to the remaining fields are at least partially different.
也就是说,如同结构化数据表以及源数据表的标识字段为编号,在同结构化数据表假设编号的编号值有1、2、3,而源数据表中的编号的编号值有3、4、5,则有一个共同的字段值3。在确定3在结构化目标数据表中所对应的记录,以及3在源数据表中所对应的记录,确定这两个记录所不同的字段值。That is to say, as the identification fields of the structured data table and the source data table are numbered, the numbered value of the number in the same structured data table is 1, 2, 3, and the number of the number in the source data table has 3, 4, 5, there is a common field value of 3. In determining the record corresponding to 3 in the structured target data table, and 3 the record corresponding to the source data table, the field values different for the two records are determined.
S123b,利用源数据表中确定的记录更新同结构化目标数据表中的对应记录。S123b, updating the corresponding record in the same structured target data table by using the record determined in the source data table.
也就是说,源数据表对于3所对应的记录中的某个字段值不同于同结构化目标数据表3所对应的记录中的某个字段值,则将同结构化目标数据表中的这个字段值替换成源数据表的这个字段值,其他保持不变。That is to say, if the source data table is different from a certain field value in the record corresponding to the same structured target data table 3 for a field value corresponding to the 3 corresponding records, the same data in the same structured target data table will be used. The field value is replaced with this field value of the source data table, and the others remain unchanged.
请进一步参阅图10,图10是图6依照图9的方法合并后的同结构化目标数据表的示意图。Please refer to FIG. 10 further. FIG. 10 is a schematic diagram of the same structured target data table merged by FIG. 6 according to the method of FIG.
结构化目标数据表相对于源数据表而言,结构化目标数据表的标识字段有1、2、3,源数据表的标识字段有3、4、5,则两个数据表的标识字段共有一个相同的3。在结构化数据表中,3所对应的记录为:3、谢里、3K。而在源数据表中,3所对应的记录为:3、王二、6K。则显然,在结构化数据表中3所对应的记录的字段值与源数据表中3所对应的记录的字段值不同,则将结构化数据表中3所对应的记录替换成源数据表中3所对应的记录,得到图10。Structured target data table Relative to the source data table, the identification field of the structured target data table has 1, 2, 3, and the identification field of the source data table has 3, 4, and 5, and the identification fields of the two data tables are common. One of the same 3. In the structured data table, the corresponding records for 3 are: 3, Sheri, 3K. In the source data table, the corresponding records of 3 are: 3, Wang 2, 6K. Obviously, in the structured data table, the field value of the record corresponding to 3 is different from the field value of the record corresponding to 3 in the source data table, and the record corresponding to 3 in the structured data table is replaced with the source data table. 3 corresponding records, get Figure 10.
参见图11,图11为本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图,且该实施例是在本申请第一实施例步骤S12的基础 上的进一步扩展,也是三种合并方式的其中一种,该实施方式具体包括如下子步骤。Referring to FIG. 11 , FIG. 11 is a schematic diagram of still another sub-flow of the embodiment of step S12 of FIG. 1 according to the method for database merging of the present application, and the embodiment is further extended based on step S12 of the first embodiment of the present application. One of the combinations, the embodiment specifically includes the following sub-steps.
S121c,将同结构化目标数据表中的记录全部替换成源数据表中的记录。S121c, replace all the records in the same structured target data table with the records in the source data table.
也就是说,将结构化目标数据表清空,并将所有的源数据表的记录进行填充,使得源数据表的记录覆盖结构化目标数据表。That is, the structured target data table is emptied and all records of the source data table are populated such that the records of the source data table overwrite the structured target data table.
请进一步参阅图12,图12是图6依照图11的方法合并后的同结构化目标数据表的示意图。Please refer to FIG. 12 further. FIG. 12 is a schematic diagram of the same structured target data table merged by FIG. 6 according to the method of FIG.
将源数据表完全覆盖了结构化数据表,也就是将同结构化目标数据表中的记录全部替换成源数据表中的记录,得到图12。The source data table completely covers the structured data table, that is, the records in the same structured target data table are all replaced with the records in the source data table, and FIG. 12 is obtained.
参见图13,图13为本申请数据库合并的方法图1步骤S12一实施方式的又一子流程示意图,且该实施例是在本申请第一实施例步骤S12的基础上的进一步扩展。且需要注意的,本实施例是对图7、图9以及图11实施例的具体实现方法的实施方式的示意图,且具体有如下的步骤:Referring to FIG. 13 , FIG. 13 is a schematic diagram of still another sub-flow of the embodiment of the step S12 of FIG. 1 according to the method for database merging of the present application, and the embodiment is further extended based on the step S12 of the first embodiment of the present application. It should be noted that the present embodiment is a schematic diagram of an implementation manner of the specific implementation method of the embodiment of FIG. 7, FIG. 9, and FIG. 11, and specifically has the following steps:
S121d,利用第一线程循环地从源数据表中读取记录,并存储到第一缓存区。S121d: The record is read from the source data table cyclically by the first thread and stored in the first buffer area.
在本实施中,主要通过具体的实现方法来说明合并的实现。这里是通过采用引用多个线程来实现,首先采用第一线程循环的从源数据表中读取一行记录,并存储为一个字符串列表,并将这个字符串列表存储在第一缓存区中,一直循环上述操作,一直到第一缓存区被写满。In this implementation, the implementation of the merge is mainly explained by a specific implementation method. Here is achieved by using multiple threads. First, the first thread is used to read a row of records from the source data table, and stored as a list of strings, and the list of strings is stored in the first buffer area. The above operation is repeated until the first buffer area is filled.
S122d,利用第二线程循环地从第一缓存区中读取记录,并存储到第二缓存区。S122d: The second thread is used to cyclically read the record from the first buffer area and store it in the second buffer area.
采用第二线程循环的从第一缓存区取出一个记录,并放在第二缓存区中。需要注意的是,第二缓存区比第一缓存区要小。如果第一缓冲区是空的或者第二缓存区是满的,则第二线程进入睡眠状态,也就是不工作。当写入成功后,由于第一缓存区又空了一个位置,则使用第一线程对第一缓存区进行写入。A record is taken from the first buffer area by the second thread loop and placed in the second buffer area. It should be noted that the second buffer area is smaller than the first buffer area. If the first buffer is empty or the second buffer is full, the second thread goes to sleep, ie it does not work. After the write is successful, since the first buffer area is empty again, the first cache is used to write to the first buffer area.
S123d,利用第三线程循环地从同结构化目标数据表中读取记录,并存储到第三缓存区。S123d, the third thread is used to cyclically read the record from the same structured target data table and store it in the third buffer area.
在对源数据表进行操作后,这里需要在对同结构化目标数据表进行操作。首先采用第三线程循环的从同结构化目标数据表中读取一行记录,并存储为一个字符串列表,并将这个字符串列表存储在第三缓存区中。一直循环上述操作,一直到第一缓存区被写满。After the operation of the source data table, it is necessary to operate on the same structured target data table. First, a row of records is read from the same structured target data table by using a third thread loop, and stored as a string list, and the string list is stored in the third buffer area. The above operation is repeated until the first buffer area is filled.
S124d,利用第四线程循环地从第三缓存区中读取记录,并存储到第四缓存区。S124d: The fourth thread is used to cyclically read the record from the third buffer area and store it in the fourth buffer area.
采用第四线程循环的从第三缓存区取出一个记录,并放在第四缓存区中。需要注意的是,第四缓存区比第三缓存区要小,如果第三缓冲区是空的或者第四缓存区是满的,则第四线程进入睡眠状态,也就是不工作。当写入成功后,由于第三缓存区又空了一个位置,则使用第三线程对第三缓存区进行写入。A record is taken from the third buffer area by the fourth thread loop and placed in the fourth buffer area. It should be noted that the fourth buffer area is smaller than the third buffer area. If the third buffer is empty or the fourth buffer area is full, the fourth thread enters a sleep state, that is, does not work. When the write is successful, since the third buffer area is empty again, the third cache is used to write to the third buffer area.
S125d,利用第五线程对第二缓存区所存储的记录以及所述第四缓存区所存储的记录进行比较,并根据比较结果执行相应的数据合并操作。S125d: The fifth thread is used to compare the record stored in the second buffer area and the record stored in the fourth buffer area, and perform a corresponding data merge operation according to the comparison result.
也就是说,当第二缓存区以及第四缓存区不是空的时候,则采用第五线程对第二缓存区所存储的记录与第四缓存区所存储的记录进行对比,并通过对比的结果以及选择的合并方式来进行增加、删除、替换等等操作。在比较以及操作完成后,清除第二缓存区以及第四缓存区,并唤醒第二线程以及第四线程进行工作。That is to say, when the second buffer area and the fourth buffer area are not empty, the record stored in the second buffer area by the fifth thread is compared with the record stored in the fourth buffer area, and the result of the comparison is obtained. And the selected merge mode to add, delete, replace, and so on. After the comparison and the operation are completed, the second buffer area and the fourth buffer area are cleared, and the second thread and the fourth thread are awake to work.
参阅图14,图14为本申请一种数据库合并的装置一实施方式的结构示意图。Referring to FIG. 14, FIG. 14 is a schematic structural diagram of an apparatus for merging a database according to the present application.
本实施例中,该装置包括处理器10以及存储器11,处理器10连接存储器11。In this embodiment, the apparatus includes a processor 10 and a memory 11, and the processor 10 is connected to the memory 11.
其中,处理器10用于确定保护数据,设置临时表以及对临时表进行填充,对数据库以及数据表进行遍历,通过使用多线程以及多缓存区的方式对数据表进行比较以及合并。The processor 10 is configured to determine protection data, set a temporary table, and fill the temporary table, traverse the database and the data table, and compare and merge the data tables by using multiple threads and multiple buffers.
其中,处理器10还可以称为CPU(Central Processing Unit,中央处理单元)。处理器10可能是一种集成电路芯片,具有信号的处理能力。处理器10还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管 逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 10 may also be referred to as a CPU (Central Processing Unit). Processor 10 may be an integrated circuit chip with signal processing capabilities. The processor 10 can also be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. . The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
上述设备的各个模块终端可分别执行上述方法实施例中对应的步骤,故在此不对各模块进行赘述,详细请参阅以上对应步骤的说明。The module terminals of the above-mentioned devices can respectively perform the corresponding steps in the foregoing method embodiments, and therefore, the modules are not described herein. For details, refer to the description of the corresponding steps.
本申请的存储装置存储20有能够实现上述所有方法的指令文件,该程序文件可以以软件产品的形式存储在上述存储装置中,同时还是记录各种计算的数据,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式方法的全部或部分步骤。而前述的存储装置包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,或者是计算机、服务器、手机、平板等终端设备。The storage device storage 20 of the present application has an instruction file capable of implementing all of the above methods, and the program file may be stored in the storage device in the form of a software product, and also records various calculated data, including a plurality of instructions for causing one A computer device (which may be a personal computer, server, or network device, etc.) or a processor performs all or part of the steps of the various embodiments of the present application. The foregoing storage device includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. Or a terminal device such as a computer, a server, a mobile phone, or a tablet.
综上所述,本领域技术人员容易理解,本申请提供一种合并数据库的方法及装置,通过遍历的方式分别从两个数据库中取出两个数据表,然后在对两个数据表进行同结构化,在确定保护数据后,通过多线程以及缓冲区的方式对两个数据表进行多种方式的合并,从而快速的完成合并,并且在本申请中,有着完善的数据保护机制,在合并过程中不会造成数据的丢失或损坏。In summary, those skilled in the art will readily understand that the present application provides a method and apparatus for merging databases by taking two data tables from two databases by traversing, and then performing the same structure on the two data tables. After determining the protection data, the two data tables are merged in multiple ways by means of multi-threading and buffers, thereby quickly completing the merge, and in the present application, there is a perfect data protection mechanism in the merge process. There will be no loss or damage to the data.
以上仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only the embodiment of the present application, and thus does not limit the scope of patents of the present application, and the equivalent structure or equivalent process transformation made by using the specification and the contents of the drawings, or directly or indirectly applied to other related technical fields, The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种合并数据库的方法,其特征在于,包括如下步骤:A method for merging a database, comprising the steps of:
    分别从目标数据库和源数据库获取目标数据表和源数据表,其中所述目标数据表包括多个字段以及多条记录,所述源数据表也包括多个字段以及多条记录,每条记录包括分别与所述字段对应的字段值;Obtaining a target data table and a source data table respectively from the target database and the source database, wherein the target data table includes a plurality of fields and a plurality of records, the source data table also includes a plurality of fields and a plurality of records, each of the records includes Field values corresponding to the fields respectively;
    根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理,以获取同结构化目标数据表;Performing the same structural processing on the target data table according to the difference between the target data table and the source data table to obtain the same structured target data table;
    在所述源数据表和所述同结构化目标数据表的基础上进行数据合并。Data merging is performed on the basis of the source data table and the same structured target data table.
  2. 根据权利要求1所述的方法,其特征在于,所述分别从目标数据库和源数据库获取目标数据表和源数据表的步骤包括:The method according to claim 1, wherein the step of obtaining the target data table and the source data table from the target database and the source database respectively comprises:
    分别对所述目标数据库和所述源数据库所存储的表格的表名进行遍历,并将所述表名对应且分别存储于所述目标数据库和所述源数据库中的表格作为所述目标数据表和所述源数据表。And respectively traversing the table name of the table stored in the target database and the source database, and storing the table name in a table corresponding to the target database and the source database as the target data table And the source data table.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理的步骤包括:The method according to claim 1, wherein the step of performing the same structured processing on the target data table according to the field difference between the target data table and the source data table comprises:
    根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行字段添加和/或字段删除,以获得所述同结构化目标数据表,其中所述同结构化目标数据表中的字段与所述源数据表中的字段相同。Performing field addition and/or field deletion on the target data table according to a field difference between the target data table and the source data table to obtain the same structured target data table, wherein the same structured target data table The fields in are the same as the fields in the source data table.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理的步骤还包括:The method according to claim 3, wherein the step of performing the same structured processing on the target data table according to the field difference between the target data table and the source data table further comprises:
    对所述同结构化目标数据表进行记录填充,以使得在所述同结构化目标数据表中保留所述目标数据表的记录中与所述同结构化目标数据表字段相同的字段值,且所述同结构化目标数据表的记录中的其余字段所对应的字段值由所述源数据表中的对应记录的对应字段的字段值填充。Recording and filling the same structured target data table, so that the same field value of the same structured target data table field in the record of the target data table is retained in the same structured target data table, and The field value corresponding to the remaining fields in the record of the same structured target data table is filled by the field value of the corresponding field of the corresponding record in the source data table.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行字段添加和/或字段 删除的步骤包括:The method according to claim 4, wherein the step of performing field addition and/or field deletion on the target data table according to a field difference between the target data table and the source data table comprises:
    分别对所述目标数据表和所述源数据表中的字段进行遍历,以确定所述目标数据表相对于所述源数据表缺少的字段和多余的字段;Traversing the fields in the target data table and the source data table respectively to determine fields and redundant fields that are missing from the target data table relative to the source data table;
    建立一临时表并进行字段设置,以使得所述临时表相对于所述目标数据表增加了所述缺少的字段并删除所述多余的字段;Establishing a temporary table and performing field setting such that the temporary table adds the missing field with respect to the target data table and deletes the redundant field;
    所述对同结构化目标数据表进行记录填充的步骤包括:The step of performing record filling on the same structured target data table includes:
    将所述目标数据表的记录中与所述临时表相同字段的字段值填充到所述临时表中,并将所述临时表的记录中与所述目标数据表不同的字段所对应字段值由所述源数据表中对应记录的对应字段的字段值进行填充;Filling a field value of the same field as the temporary table in the record of the target data table into the temporary table, and setting a field value corresponding to a field different from the target data table in the record of the temporary table by Filling in the field value of the corresponding field of the corresponding record in the source data table;
    将所述临时表设置为所述同结构化目标数据表。The temporary table is set to the same structured target data table.
  6. 根据权利要求1所述的方法,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The method according to claim 1, wherein the step of data merging on the basis of the same structured target data table and the source data table comprises:
    将所述同结构化目标数据表与所述源数据表的记录中起到标识作用的标识字段所对应的字段值进行对比,以确定所述同结构化目标数据表相对于所述源数据表缺少的记录和/或多余的记录;Comparing the same structured target data table with a field value corresponding to the identifier field in the record of the source data table for identifying, to determine the same structured target data table relative to the source data table Missing records and/or redundant records;
    在所述同结构化目标数据表中添加所述缺少的记录和和/或删除所述多余的记录。Adding the missing record and/or deleting the redundant record in the same structured target data table.
  7. 根据权利要求1所述的方法,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The method according to claim 1, wherein the step of data merging on the basis of the same structured target data table and the source data table comprises:
    将所述同结构化目标数据表与所述源数据表的记录中的字段值进行对比,以确定起到标识作用的标识字段所对应的字段值相同但其余字段所对应的字段值至少部分不同的记录;Comparing the same structured target data table with the field value in the record of the source data table to determine that the field value corresponding to the identifier field functioning as the identifier is the same but the field values corresponding to the remaining fields are at least partially different. record of;
    利用所述源数据表中确定的所述记录更新所述同结构化目标数据表中的对应记录。Updating corresponding records in the same structured target data table using the records determined in the source data table.
  8. 根据权利要求1所述的方法,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The method according to claim 1, wherein the step of data merging on the basis of the same structured target data table and the source data table comprises:
    将所述同结构化目标数据表中的记录全部替换成所述源数据表中的记录。All of the records in the same structured target data table are replaced with records in the source data table.
  9. 根据权利要求1所述的方法,其特征在于,所述在同结构化目标数 据表和所述源数据表的基础上进行数据合并的步骤包括:The method of claim 1, wherein the step of data merging on the basis of the same structured target data table and the source data table comprises:
    在所述同结构化目标数据表中指定受保护记录或受保护字段;Specifying a protected record or protected field in the same structured target data table;
    在跳过所述受保护记录或受保护字段的基础上对所述同结构化目标数据表和所述源数据表进行数据合并。Data is merged between the same structured target data table and the source data table based on skipping the protected record or protected field.
  10. 根据权利要求1所述的方法,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The method according to claim 1, wherein the step of data merging on the basis of the same structured target data table and the source data table comprises:
    利用第一线程循环地从所述源数据表中读取记录,并存储到第一缓存区;Reading the record from the source data table cyclically with the first thread and storing it in the first buffer area;
    利用第二线程循环地从所述第一缓存区中读取记录,并存储到第二缓存区,其中所述第一缓存区所存储的记录数量大于所述第二缓存区所存储的记录数量;Reading the record from the first buffer area cyclically by the second thread and storing it in the second buffer area, wherein the number of records stored in the first buffer area is greater than the number of records stored in the second buffer area ;
    利用第三线程循环地从所述同结构化目标数据表中读取记录,并存储到第三缓存区;Reading the record from the same structured target data table cyclically by the third thread and storing it in the third buffer area;
    利用第四线程循环地从第三缓存区读取记录,并写入第四缓存区,其中所述第三缓存区所存储的记录数量大于所述第四缓存区所存储的记录数量;Reading the record from the third buffer area cyclically by the fourth thread and writing to the fourth buffer area, wherein the third buffer area stores the number of records larger than the number of records stored in the fourth buffer area;
    利用第五线程对所述第二缓存区所存储的记录以及所述第四缓存区所存储的记录进行比较,并根据比较结果执行相应的数据合并操作。The fifth thread stores the records stored in the second buffer area and the records stored in the fourth buffer area, and performs a corresponding data merge operation according to the comparison result.
  11. 一种合并数据库的装置,其特征在于,所述装置包括:处理器、存储器,所述处理器连接所述存储器,所述处理器通过运行所述存储器内存储的程序执行以下步骤:An apparatus for merging a database, the apparatus comprising: a processor, a memory, the processor is coupled to the memory, and the processor performs the following steps by running a program stored in the memory:
    分别从目标数据库和源数据库获取目标数据表和源数据表,其中所述目标数据表包括多个字段以及多条记录,所述源数据表也包括多个字段以及多条记录,每条记录包括分别与所述字段对应的字段值;Obtaining a target data table and a source data table respectively from the target database and the source database, wherein the target data table includes a plurality of fields and a plurality of records, the source data table also includes a plurality of fields and a plurality of records, each of the records includes Field values corresponding to the fields respectively;
    根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理,以获取同结构化目标数据表;Performing the same structural processing on the target data table according to the difference between the target data table and the source data table to obtain the same structured target data table;
    在所述源数据表和所述同结构化目标数据表的基础上进行数据合并。Data merging is performed on the basis of the source data table and the same structured target data table.
  12. 根据权利要求11所述的装置,其特征在于,所述分别从目标数据库和源数据库获取目标数据表和源数据表的步骤包括:The apparatus according to claim 11, wherein the steps of respectively obtaining the target data table and the source data table from the target database and the source database comprise:
    分别对所述目标数据库和所述源数据库所存储的表格的表名进行遍历,并将所述表名对应且分别存储于所述目标数据库和所述源数据库中的表格作为所述目标数据表和所述源数据表。And respectively traversing the table name of the table stored in the target database and the source database, and storing the table name in a table corresponding to the target database and the source database as the target data table And the source data table.
  13. 根据权利要求11所述的装置,其特征在于,所述根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理的步骤包括:The apparatus according to claim 11, wherein the step of performing a structural structuring on the target data table according to a field difference between the target data table and the source data table comprises:
    根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行字段添加和/或字段删除,以获得所述同结构化目标数据表,其中所述同结构化目标数据表中的字段与所述源数据表中的字段相同。Performing field addition and/or field deletion on the target data table according to a field difference between the target data table and the source data table to obtain the same structured target data table, wherein the same structured target data table The fields in are the same as the fields in the source data table.
  14. 根据权利要求13所述的装置,其特征在于,所述根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行同结构化处理的步骤还包括:The device according to claim 13, wherein the step of performing the same structured processing on the target data table according to the field difference between the target data table and the source data table further comprises:
    对所述同结构化目标数据表进行记录填充,以使得在所述同结构化目标数据表中保留所述目标数据表的记录中与所述同结构化目标数据表字段相同的字段值,且所述同结构化目标数据表的记录中的其余字段所对应的字段值由所述源数据表中的对应记录的对应字段的字段值填充。Recording and filling the same structured target data table, so that the same field value of the same structured target data table field in the record of the target data table is retained in the same structured target data table, and The field value corresponding to the remaining fields in the record of the same structured target data table is filled by the field value of the corresponding field of the corresponding record in the source data table.
  15. 根据权利要求14所述的装置,其特征在于,所述根据所述目标数据表和所述源数据表的字段差异对所述目标数据表进行字段添加和/或字段删除的步骤包括:The apparatus according to claim 14, wherein the step of performing field addition and/or field deletion on the target data table according to a field difference between the target data table and the source data table comprises:
    分别对所述目标数据表和所述源数据表中的字段进行遍历,以确定所述目标数据表相对于所述源数据表缺少的字段和多余的字段;Traversing the fields in the target data table and the source data table respectively to determine fields and redundant fields that are missing from the target data table relative to the source data table;
    建立一临时表并进行字段设置,以使得所述临时表相对于所述目标数据表增加了所述缺少的字段并删除所述多余的字段;Establishing a temporary table and performing field setting such that the temporary table adds the missing field with respect to the target data table and deletes the redundant field;
    所述对同结构化目标数据表进行记录填充的步骤包括:The step of performing record filling on the same structured target data table includes:
    将所述目标数据表的记录中与所述临时表相同字段的字段值填充到所述临时表中,并将所述临时表的记录中与所述目标数据表不同的字段所对应字段值由所述源数据表中对应记录的对应字段的字段值进行填充;Filling a field value of the same field as the temporary table in the record of the target data table into the temporary table, and setting a field value corresponding to a field different from the target data table in the record of the temporary table by Filling in the field value of the corresponding field of the corresponding record in the source data table;
    将所述临时表设置为所述同结构化目标数据表。The temporary table is set to the same structured target data table.
  16. 根据权利要求11所述的装置,其特征在于,所述在同结构化目标 数据表和所述源数据表的基础上进行数据合并的步骤包括:The apparatus according to claim 11, wherein said step of combining data on the basis of the same structured target data table and said source data table comprises:
    将所述同结构化目标数据表与所述源数据表的记录中起到标识作用的标识字段所对应的字段值进行对比,以确定所述同结构化目标数据表相对于所述源数据表缺少的记录和/或多余的记录;Comparing the same structured target data table with a field value corresponding to the identifier field in the record of the source data table for identifying, to determine the same structured target data table relative to the source data table Missing records and/or redundant records;
    在所述同结构化目标数据表中添加所述缺少的记录和和/或删除所述多余的记录。Adding the missing record and/or deleting the redundant record in the same structured target data table.
  17. 根据权利要求11所述的装置,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The apparatus according to claim 11, wherein the step of performing data merging on the basis of the same structured target data table and the source data table comprises:
    将所述同结构化目标数据表与所述源数据表的记录中的字段值进行对比,以确定起到标识作用的标识字段所对应的字段值相同但其余字段所对应的字段值至少部分不同的记录;Comparing the same structured target data table with the field value in the record of the source data table to determine that the field value corresponding to the identifier field functioning as the identifier is the same but the field values corresponding to the remaining fields are at least partially different. record of;
    利用所述源数据表中确定的所述记录更新所述同结构化目标数据表中的对应记录。Updating corresponding records in the same structured target data table using the records determined in the source data table.
  18. 根据权利要求11所述的装置,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The apparatus according to claim 11, wherein the step of performing data merging on the basis of the same structured target data table and the source data table comprises:
    将所述同结构化目标数据表中的记录全部替换成所述源数据表中的记录。All of the records in the same structured target data table are replaced with records in the source data table.
  19. 根据权利要求11所述的装置,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The apparatus according to claim 11, wherein the step of performing data merging on the basis of the same structured target data table and the source data table comprises:
    在所述同结构化目标数据表中指定受保护记录或受保护字段;Specifying a protected record or protected field in the same structured target data table;
    在跳过所述受保护记录或受保护字段的基础上对所述同结构化目标数据表和所述源数据表进行数据合并。Data is merged between the same structured target data table and the source data table based on skipping the protected record or protected field.
  20. 根据权利要求11所述的装置,其特征在于,所述在同结构化目标数据表和所述源数据表的基础上进行数据合并的步骤包括:The apparatus according to claim 11, wherein the step of performing data merging on the basis of the same structured target data table and the source data table comprises:
    利用第一线程循环地从所述源数据表中读取记录,并存储到第一缓存区;Reading the record from the source data table cyclically with the first thread and storing it in the first buffer area;
    利用第二线程循环地从所述第一缓存区中读取记录,并存储到第二缓存区,其中所述第一缓存区所存储的记录数量大于所述第二缓存区所存储的记录数量;Reading the record from the first buffer area cyclically by the second thread and storing it in the second buffer area, wherein the number of records stored in the first buffer area is greater than the number of records stored in the second buffer area ;
    利用第三线程循环地从所述同结构化目标数据表中读取记录,并存储到第三缓存区;Reading the record from the same structured target data table cyclically by the third thread and storing it in the third buffer area;
    利用第四线程循环地从第三缓存区读取记录,并写入第四缓存区,其中所述第三缓存区所存储的记录数量大于所述第四缓存区所存储的记录数量;Reading the record from the third buffer area cyclically by the fourth thread and writing to the fourth buffer area, wherein the third buffer area stores the number of records larger than the number of records stored in the fourth buffer area;
    利用第五线程对所述第二缓存区所存储的记录以及所述第四缓存区所存储的记录进行比较,并根据比较结果执行相应的数据合并操作。The fifth thread stores the records stored in the second buffer area and the records stored in the fourth buffer area, and performs a corresponding data merge operation according to the comparison result.
PCT/CN2017/119588 2017-12-28 2017-12-28 Database merging method and apparatus WO2019127282A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/119588 WO2019127282A1 (en) 2017-12-28 2017-12-28 Database merging method and apparatus
CN201780037501.9A CN109690521B (en) 2017-12-28 2017-12-28 Database merging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/119588 WO2019127282A1 (en) 2017-12-28 2017-12-28 Database merging method and apparatus

Publications (1)

Publication Number Publication Date
WO2019127282A1 true WO2019127282A1 (en) 2019-07-04

Family

ID=66184335

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/119588 WO2019127282A1 (en) 2017-12-28 2017-12-28 Database merging method and apparatus

Country Status (2)

Country Link
CN (1) CN109690521B (en)
WO (1) WO2019127282A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143350A (en) * 2019-11-27 2020-05-12 深圳壹账通智能科技有限公司 Enterprise data monitoring method and device, computer equipment and storage medium
CN111723210A (en) * 2020-06-29 2020-09-29 深圳壹账通智能科技有限公司 Method and device for storing data table, computer equipment and readable storage medium
CN111858760A (en) * 2020-07-13 2020-10-30 中国工商银行股份有限公司 Data processing method and device for heterogeneous database
CN112862579A (en) * 2021-01-21 2021-05-28 金蝶软件(中国)有限公司 Material detail data adjusting method and related equipment thereof
CN112988698A (en) * 2019-12-02 2021-06-18 阿里巴巴集团控股有限公司 Data processing method and device
CN113362007A (en) * 2021-06-24 2021-09-07 北京天健源达科技股份有限公司 Method for processing zero stock record
CN113642309A (en) * 2020-04-27 2021-11-12 北京国双科技有限公司 Data comparison method and related device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490724A (en) * 2019-07-03 2019-11-22 平安证券股份有限公司 The storage method and device of account data
CN110502519B (en) * 2019-08-26 2022-04-29 北京启迪区块链科技发展有限公司 Data aggregation method, device, equipment and storage medium
CN110502563B (en) * 2019-08-26 2023-09-29 腾讯科技(深圳)有限公司 Data processing method and device of multiple data sources and storage medium
CN110765162A (en) * 2019-09-06 2020-02-07 上海陆家嘴国际金融资产交易市场股份有限公司 Data comparison method and device, computer equipment and storage medium
CN112948435A (en) * 2021-02-25 2021-06-11 苏宁金融科技(南京)有限公司 Data processing method and device and electronic equipment
CN113111101A (en) * 2021-03-18 2021-07-13 武汉中地众思科技有限公司 Database conversion method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542007A (en) * 2011-12-13 2012-07-04 中国电子科技集团公司第十五研究所 Method and system for synchronization of relational databases
CN102722540A (en) * 2012-05-23 2012-10-10 中兴通讯股份有限公司 Method and device for processing data in real-time memory database system
CN103221949A (en) * 2010-07-27 2013-07-24 甲骨文国际公司 MYSQL database heterogeneous log based replication

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778136A (en) * 2012-10-19 2014-05-07 阿里巴巴集团控股有限公司 Cross-room database synchronization method and system
US10210207B2 (en) * 2015-12-31 2019-02-19 International Business Machines Corporation Parallel execution of merge operations
CN106325933B (en) * 2016-08-24 2019-07-02 明算科技(北京)股份有限公司 Batch data synchronous method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103221949A (en) * 2010-07-27 2013-07-24 甲骨文国际公司 MYSQL database heterogeneous log based replication
CN102542007A (en) * 2011-12-13 2012-07-04 中国电子科技集团公司第十五研究所 Method and system for synchronization of relational databases
CN102722540A (en) * 2012-05-23 2012-10-10 中兴通讯股份有限公司 Method and device for processing data in real-time memory database system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143350A (en) * 2019-11-27 2020-05-12 深圳壹账通智能科技有限公司 Enterprise data monitoring method and device, computer equipment and storage medium
CN112988698A (en) * 2019-12-02 2021-06-18 阿里巴巴集团控股有限公司 Data processing method and device
CN113642309A (en) * 2020-04-27 2021-11-12 北京国双科技有限公司 Data comparison method and related device
CN111723210A (en) * 2020-06-29 2020-09-29 深圳壹账通智能科技有限公司 Method and device for storing data table, computer equipment and readable storage medium
CN111858760A (en) * 2020-07-13 2020-10-30 中国工商银行股份有限公司 Data processing method and device for heterogeneous database
CN111858760B (en) * 2020-07-13 2024-03-22 中国工商银行股份有限公司 Data processing method and device for heterogeneous database
CN112862579A (en) * 2021-01-21 2021-05-28 金蝶软件(中国)有限公司 Material detail data adjusting method and related equipment thereof
CN113362007A (en) * 2021-06-24 2021-09-07 北京天健源达科技股份有限公司 Method for processing zero stock record

Also Published As

Publication number Publication date
CN109690521A (en) 2019-04-26
CN109690521B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
WO2019127282A1 (en) Database merging method and apparatus
CN108053863B (en) Mass medical data storage system and data storage method suitable for large and small files
US8341128B1 (en) Concurrency control using an effective change stack and tenant-based isolation
CN107122360B (en) Data migration system and method
US9779127B2 (en) Integrating database management system and external cache
US9971827B2 (en) Subscription for integrating external data from external system
CN107122361B (en) Data migration system and method
US7526469B2 (en) Method and system of database management with shared area
CA2652115C (en) Apparatus and method for read consistency in a log mining system
US20190384674A1 (en) Data processing apparatus and method
US20130275369A1 (en) Data record collapse and split functionality
JP6823605B2 (en) Data retention framework
US11899668B2 (en) Database management apparatus, database control method and program
JP2005302030A (en) Multi-process access method and device to link list
US8909875B1 (en) Methods and apparatus for storing a new version of an object on a content addressable storage system
US9405788B2 (en) Mass delete restriction in a database
US11880495B2 (en) Processing log entries under group-level encryption
US20230188327A1 (en) Handling pre-existing containers under group-level encryption
CN103353891B (en) Data base management system and its data processing method
US10942912B1 (en) Chain logging using key-value data storage
US20130297653A1 (en) Metadata storage management offloading for enterprise applications
JPH033046A (en) Log record control system
US20230185675A1 (en) Backup and recovery under group-level encryption
US11899811B2 (en) Processing data pages under group-level encryption
US11907162B2 (en) Minimizing data volume growth under encryption changes

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17936115

Country of ref document: EP

Kind code of ref document: A1