CN110515923B - Data migration method and system between distributed databases - Google Patents
Data migration method and system between distributed databases Download PDFInfo
- Publication number
- CN110515923B CN110515923B CN201910755025.5A CN201910755025A CN110515923B CN 110515923 B CN110515923 B CN 110515923B CN 201910755025 A CN201910755025 A CN 201910755025A CN 110515923 B CN110515923 B CN 110515923B
- Authority
- CN
- China
- Prior art keywords
- database
- slave
- master
- databases
- engine
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/214—Database migration support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
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)
- Computing Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data migration method and a system between distributed databases, wherein the data migration method comprises the following steps: s1: receiving a request of a client mobile terminal through a request receiving part, wherein the request relates to data corresponding to information stored in a main database; s2: receiving and identifying, by the primary database engine, the received mobile client request information in S1; s3: distinguishing which slave database is located according to the mobile client request information in the S2 through a master database engine; s4: and dispersing the information in the S3 to the slave storage nodes in the slave database through the master storage nodes in the master database. The invention can more accurately identify the data and prevent the occurrence of errors by the identification and data migration method.
Description
Technical Field
The present invention relates to the field of distributed database technologies, and in particular, to a method and a system for data migration between distributed databases.
Background
A database management system, which is a computer software system designed for managing databases, generally has basic functions of storage, interception, security assurance, backup and the like, and can classify according to database models supported by the database management system, such as relational expressions and XML; or classified according to the type of computer supported, e.g., server cluster, mobile phone; or classified according to the query language used, such as SQL, XQuery; or by performance impact emphasis, such as maximum size, maximum operating speed; or other taxonomies, regardless of which taxonomy is used, some DBMSs can support multiple query languages across categories, for example.
In the prior art, data migration between distributed databases often has a fault phenomenon in the process of identifying data, so a method and a system for data migration between distributed databases are needed to solve the above problems.
Disclosure of Invention
The invention mainly aims to provide a data migration method and a data migration system between distributed databases, wherein a request receiving part receives a client mobile terminal request and relates to data corresponding to information stored in a master database, a master database engine receives and identifies the received mobile client request information, the master database engine distinguishes which slave database is located according to the mobile client request information, the master database node distributes the information to slave storage nodes in the slave databases, the slave storage nodes receive the information and start the slave database engine for identification, and the slave database engine deletes data which is not mapped with the data stored in the slave databases.
The purpose of the invention can be achieved by adopting the following technical scheme:
a method for data migration between databases in a distributed database system comprises the following steps:
s1: receiving a request of a client mobile terminal through a request receiving part, wherein the request relates to data corresponding to information stored in a main database;
s2: receiving and identifying, by the primary database engine, the received mobile client request information in S1;
s3: distinguishing which slave database is located according to the mobile client request information in the S2 through a master database engine;
s4: dispersing the information in the S3 to the slave storage nodes in the slave database through the master storage nodes in the master database;
s5: receiving information from the storage node in S4 and starting a slave database engine for identification;
s6: the slave database engine in S5 deletes data that does not map with the data stored in the slave database.
Preferably, in S3, the set of slave databases includes a slave database engine and at least one slave storage node, and the master database includes a master database engine and at least one master storage node.
Preferably, in S3, the master database includes NID identifiers in all slave databases, one SID identifier is stored in the master database, and the SID identifiers are different between different master databases.
Preferably, in S3, the slave database includes all the BID identification codes corresponding to the SID identification codes in the master database, and different slave databases in the same master database store different BID identification codes.
Preferably, in S4, the BID identification code is received from the database, and the actual location of the client mobile terminal is determined by a trigonometric formula estimation algorithm according to the SID identification code, the NID identification code and the BID identification code.
The invention also provides a distributed database system, which comprises at least one computing device and at least one master database, wherein the master database at least comprises one master storage node, the master database comprises one master database engine, the distributed database system also comprises a plurality of slave databases, the slave databases at least comprise one slave storage node, and the slave databases comprise one slave database engine;
the computing equipment receives a request of a client mobile terminal through a request receiving part, wherein the request relates to data corresponding to information stored in a main database;
the computing device receiving and identifying, by a primary database engine, the received mobile client request information;
the computing equipment distinguishes which slave database is positioned through the master database engine according to the mobile client request information;
the computing device dispersing information through master storage nodes within a master database to slave storage nodes within a slave database;
the computing device receiving information from the storage node and initiating identification from the database engine;
the computing device deletes data from the database engine that is not mapped to the data stored in the slave database.
Preferably, a set of slave databases in the computing device comprises a slave database engine and at least one slave storage node, and the master database comprises a master database engine and at least one master storage node.
Preferably, the master database in the computing device includes all NID identifiers in the slave database, one SID identifier is stored in the master database, and the SID identifiers are different from one master database to another.
Preferably, the slave database in the computing device includes all BID identification codes corresponding to the SID identification codes in the master database, and different slave databases in the same master database store different BID identification codes.
Preferably, the computing device receives the BID identification code from the database, and determines the actual location of the client mobile terminal according to the SID identification code, the NID identification code and the BID identification code by a trigonometric formula estimation algorithm.
The invention has the beneficial technical effects that:
the invention provides a method and a system for data migration between distributed databases, which receive a client mobile terminal request through a request receiving part and relate to data corresponding to information stored in a master database, receive and identify the received mobile client request information through a master database engine, distinguish which slave database is located according to the mobile client request information through the master database engine, disperse the information to slave storage nodes in the slave databases through the master storage nodes in the master database, receive the information from the slave storage nodes and start the slave database engine for identification, delete data which is not mapped with the data stored in the slave databases from the slave database engine, and can more accurately identify the data and prevent errors through the identification and data migration method.
Drawings
FIG. 1 is a flow diagram of a data migration method in accordance with a preferred embodiment of a method and system for data migration between distributed databases in accordance with the present invention;
FIG. 2 is a data migration system diagram of a preferred embodiment of a method and system for data migration between distributed databases in accordance with the present invention.
Detailed Description
In order to make the technical solutions of the present invention more clear and definite for those skilled in the art, the present invention is further described in detail below with reference to the examples and the accompanying drawings, but the embodiments of the present invention are not limited thereto.
As shown in fig. 1-2, the present embodiment provides a method for migrating data between databases in a distributed database system, including the following steps:
s1: receiving a request of a client mobile terminal through a request receiving part, wherein the request relates to data corresponding to information stored in a main database;
s2: receiving and identifying, by the primary database engine, the received mobile client request information in S1;
s3: distinguishing which slave database is located according to the mobile client request information in the S2 through a master database engine;
s4: dispersing the information in the S3 to slave storage nodes in a slave database through master storage nodes in a master database;
s5: receiving information from the storage node in S4 and starting a slave database engine for identification;
s6: the slave database engine in S5 deletes data that does not map with the data stored in the slave database.
In this embodiment, in S3, a set of slave databases includes a slave database engine and at least one slave storage node, the master database includes a master database engine and at least one master storage node, in S3, the master database includes all NID identifiers in the slave database, one SID identifier is stored in the master database, and the SID identifiers are different between different master databases, in S3, the slave database includes all BID identifiers corresponding to the SID identifiers in the master database, different slave databases in the same master database store different BID identifiers, in S4, the slave database receives the BID identifiers, and determines the actual location of the client mobile terminal through a trigonometric formula estimation algorithm according to the three data of the SID identifier, the NID identifier, and the BID identifier.
The embodiment also provides a distributed database system, which comprises at least one computing device and at least one master database, wherein the master database at least comprises one master storage node, the master database comprises one master database engine, the distributed database system also comprises a plurality of slave databases, the slave databases at least comprise one slave storage node, and the slave databases comprise one slave database engine;
the computing equipment receives the data related to the information stored in the main database through the request receiving part;
the computing device receiving and identifying the received mobile client request information through the primary database engine;
the computing equipment distinguishes which slave database is located according to the mobile client request information through a master database engine;
the computing equipment disperses information to the slave storage nodes in the slave database through the master storage nodes in the master database;
the computing device receives information from the storage node and initiates identification from the database engine;
the computing device deletes data from the database engine that is not mapped to the data stored in the slave database.
In this embodiment, a set of slave databases in the computing device includes a slave database engine and at least one slave storage node, the master database includes a master database engine and at least one master storage node, the master database includes NID identifiers in all slave databases, the master database stores a SID identifier, and SID identifiers in different master databases are different, the slave database includes all BID identifiers corresponding to the SID identifiers in the master database, different slave databases in the same master database store different BID identifiers, the computing device receives the BID identifiers from the slave databases, and determines the actual location of the client mobile terminal through a trigonometric formula estimation algorithm according to three data, i.e., the SID identifier, the NID identifier, and the BID identifier.
To sum up, in the embodiment, the request receiving unit receives the data corresponding to the information stored in the master database, the master database engine receives and identifies the received mobile client request information, the master database engine distinguishes which slave database is located according to the mobile client request information, the master storage node in the master database distributes the information to the slave storage nodes in the slave databases, the slave storage nodes receive the information and start the slave database engine to identify, and the slave database engine deletes the data which is not mapped with the data stored in the slave databases.
The above description is only for the purpose of illustrating the present invention and is not intended to limit the scope of the present invention, and any person skilled in the art can substitute or change the technical solution of the present invention and its conception within the scope of the present invention.
Claims (4)
1. A method for data migration between databases in a distributed database system is characterized by comprising the following steps:
s1: receiving a request of a client mobile terminal through a request receiving part, wherein the request relates to data corresponding to information stored in a main database;
s2: receiving and identifying, by the primary database engine, the received mobile client request information in S1;
s3: distinguishing which slave database is located according to the mobile client request information in the S2 through a master database engine;
s4: dispersing the information in the S3 to the slave storage nodes in the slave database through the master storage nodes in the master database;
s5: receiving information from the master storage node in S4 and starting the slave database engine for identification;
s6: deleting data which is not mapped with the data stored in the slave database by the slave database engine in the S5;
in the step S3, the master database includes NID identifiers in all slave databases, and the master database stores a SID identifier, and different master databases have different SID identifiers;
in the step S3, the slave database comprises all BID identification codes corresponding to the SID identification codes in the master database, and different slave databases in the same master database store different BID identification codes;
and in the S4, receiving the BID from the database, and determining the actual position of the client mobile terminal through a trigonometric formula estimation algorithm according to the three data of the SID identification code, the NID identification code and the BID.
2. The method of claim 1, wherein in S3, a set of slave databases includes a slave database engine and at least one slave storage node, and the master database includes a master database engine and at least one master storage node.
3. A distributed database system, said distributed database system comprising at least one computing device and at least one master database including at least one master storage node, said master database including a master database engine, said distributed database system further comprising a plurality of slave databases including at least one slave storage node, said slave databases including a slave database engine;
the computing equipment receives a request of a client mobile terminal through a request receiving part, wherein the request relates to data corresponding to information stored in a main database;
the computing device receiving and identifying, by a primary database engine, the received mobile client request information;
the computing equipment distinguishes which slave database is positioned through the master database engine according to the mobile client request information;
the computing device dispersing information through master storage nodes within a master database to slave storage nodes within a slave database;
the computing device receiving information from a master storage node and initiating a slave database engine for identification;
the computing device deleting data from the database engine that is not mapped to the data stored in the slave database;
the main database in the computing equipment comprises NID identification codes in all the slave databases, one SID identification code is stored in the main database, and the SID identification codes are different among different main databases;
all BID identification codes corresponding to the SID identification codes in the main database are included in the slave database of the computing equipment, and different BID identification codes are stored in different slave databases in the same main database;
and the computing equipment receives the BID from the database and determines the actual position of the client mobile terminal through a trigonometric formula estimation algorithm according to the SID identification code, the NID identification code and the BID identification code.
4. A distributed database system according to claim 3, wherein a set of slave databases in said computing device comprises a slave database engine and at least one slave storage node, and said master database comprises a master database engine and at least one master storage node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910755025.5A CN110515923B (en) | 2019-08-15 | 2019-08-15 | Data migration method and system between distributed databases |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910755025.5A CN110515923B (en) | 2019-08-15 | 2019-08-15 | Data migration method and system between distributed databases |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110515923A CN110515923A (en) | 2019-11-29 |
CN110515923B true CN110515923B (en) | 2022-12-06 |
Family
ID=68626071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910755025.5A Active CN110515923B (en) | 2019-08-15 | 2019-08-15 | Data migration method and system between distributed databases |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110515923B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103390041A (en) * | 2013-07-18 | 2013-11-13 | 杭州东信北邮信息技术有限公司 | Method and system for providing data service based on middleware |
CN108153619A (en) * | 2017-12-25 | 2018-06-12 | 杭州恩牛网络技术有限公司 | A kind of data proofreading method and device |
CN108696595A (en) * | 2018-05-28 | 2018-10-23 | 郑州云海信息技术有限公司 | Distributed type assemblies method of data synchronization, master node, slave node, system and medium |
CN108966158A (en) * | 2018-08-21 | 2018-12-07 | 平安科技(深圳)有限公司 | Note transmission method, system, computer equipment and storage medium |
CN109635017A (en) * | 2018-10-16 | 2019-04-16 | 深圳壹账通智能科技有限公司 | Service data guiding method, device, equipment and computer readable storage medium |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100406908C (en) * | 2004-12-28 | 2008-07-30 | 中兴通讯股份有限公司 | Method and system for calculating position based on triangle positioning of forwarding chain in high rank |
US9883437B2 (en) * | 2012-06-19 | 2018-01-30 | Qualcomm Incorporated | Systems and methods for enhanced network handoff to wireless local area networks |
CN104376025B (en) * | 2013-08-16 | 2017-10-10 | 华为技术有限公司 | The date storage method and device of distributed data base |
US10372685B2 (en) * | 2014-03-31 | 2019-08-06 | Amazon Technologies, Inc. | Scalable file storage service |
CN106304042A (en) * | 2015-06-17 | 2017-01-04 | 中兴通讯股份有限公司 | A kind of mobile terminal locations safeguard method and device |
CN106096038A (en) * | 2016-06-28 | 2016-11-09 | 浪潮软件股份有限公司 | A kind of distributed database architecture under cloud computing framework |
CN106708968B (en) * | 2016-12-01 | 2019-11-26 | 成都华为技术有限公司 | Data processing method in distributed data base system and distributed data base system |
CN106528793B (en) * | 2016-12-14 | 2019-12-24 | 自然资源部国土卫星遥感应用中心 | Space-time fragment storage method of distributed spatial database |
CN108156236B (en) * | 2017-12-22 | 2021-05-25 | 平安养老保险股份有限公司 | Service request processing method and device, computer equipment and storage medium |
CN108429639A (en) * | 2018-02-27 | 2018-08-21 | 深圳神州数码云科数据技术有限公司 | A kind of cluster management method and system based on snmp protocol |
CN109062736A (en) * | 2018-08-20 | 2018-12-21 | 广州视源电子科技股份有限公司 | A kind of data back up method, device, equipment and storage medium |
-
2019
- 2019-08-15 CN CN201910755025.5A patent/CN110515923B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103390041A (en) * | 2013-07-18 | 2013-11-13 | 杭州东信北邮信息技术有限公司 | Method and system for providing data service based on middleware |
CN108153619A (en) * | 2017-12-25 | 2018-06-12 | 杭州恩牛网络技术有限公司 | A kind of data proofreading method and device |
CN108696595A (en) * | 2018-05-28 | 2018-10-23 | 郑州云海信息技术有限公司 | Distributed type assemblies method of data synchronization, master node, slave node, system and medium |
CN108966158A (en) * | 2018-08-21 | 2018-12-07 | 平安科技(深圳)有限公司 | Note transmission method, system, computer equipment and storage medium |
CN109635017A (en) * | 2018-10-16 | 2019-04-16 | 深圳壹账通智能科技有限公司 | Service data guiding method, device, equipment and computer readable storage medium |
Non-Patent Citations (2)
Title |
---|
An Energy Efficient Distributed Approach-Based Agent Migration Scheme for Data Aggregation in Wireless Sensor Networks;Govind P. Gupta;《Journal of Information Processing Systems》;20150331;第11卷(第1期);148-164 * |
基于SaaS平台的在线数据迁移的研究与实现;王楠;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150415(第04期);I138-656 * |
Also Published As
Publication number | Publication date |
---|---|
CN110515923A (en) | 2019-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111506559B (en) | Data storage method, device, electronic equipment and storage medium | |
CN111459985B (en) | Identification information processing method and device | |
US8019756B2 (en) | Computer apparatus, computer program and method, for calculating importance of electronic document on computer network, based on comments on electronic document included in another electronic document associated with former electronic document | |
CN109656958B (en) | Data query method and system | |
CN101183379A (en) | Attribute level federation from multiple data sources | |
CN110543512B (en) | Information synchronization method, device and system | |
JP5146020B2 (en) | Information processing apparatus, resource identification program, and resource identification method | |
CN111597177A (en) | Data governance method for improving data quality | |
CN110609839B (en) | Method, device and equipment for processing block chain data and readable storage medium | |
CN107066522B (en) | Database access method and device | |
US9110933B1 (en) | Processing data triggers in an untrusted environment based on information stored in a trusted environment | |
US10915541B2 (en) | Generic API | |
CN110515923B (en) | Data migration method and system between distributed databases | |
CN101799822A (en) | Method for modeling layered network knowledge model and method for establishing knowledge warehouse system | |
US20130304707A1 (en) | Data Archiving Approach Leveraging Database Layer Functionality | |
CN113849520B (en) | Intelligent recognition method and device for abnormal SQL, electronic equipment and storage medium | |
CN114860806A (en) | Data query method and device of block chain, computer equipment and storage medium | |
CN111459737B (en) | Problem positioning method, device, computer equipment and storage medium | |
CN113868138A (en) | Method, system, equipment and storage medium for acquiring test data | |
CN113761102A (en) | Data processing method, device, server, system and storage medium | |
KR100283618B1 (en) | Spatial-attribute data management device and its method using spatial index in relational database | |
CN113515504B (en) | Data management method, device, electronic equipment and storage medium | |
CN109710673B (en) | Work processing method, device, equipment and medium | |
CN114064830A (en) | Navigation data automatic production method, system, electronic equipment and storage medium | |
CN117520361A (en) | Main data consistency management method, device, equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 350000 8th floor, building 2, No. 318 Fuguang Road, Gushan Town, Jin'an District, Fuzhou City, Fujian Province Applicant after: FUJIAN ZHONGXIN WANG 'AN INFORMATION TECHNOLOGY CO.,LTD. Address before: 350000 903, building 5, Taihe City Plaza, East Second Ring Road, Hengyu Road, Jin'an District, Fuzhou City, Fujian Province Applicant before: FUJIAN ZHONGXIN WANG 'AN INFORMATION TECHNOLOGY CO.,LTD. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |