CN107038231A - A kind of database high concurrent affairs merging method - Google Patents
A kind of database high concurrent affairs merging method Download PDFInfo
- Publication number
- CN107038231A CN107038231A CN201710232312.9A CN201710232312A CN107038231A CN 107038231 A CN107038231 A CN 107038231A CN 201710232312 A CN201710232312 A CN 201710232312A CN 107038231 A CN107038231 A CN 107038231A
- Authority
- CN
- China
- Prior art keywords
- type
- merging
- affairs
- data
- delete
- 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.)
- Pending
Links
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of database high concurrent affairs merging method, including affairs to be combined are obtained from affairs pond in batches;According to the time sequencing of affairs built-in function, affairs built-in function is merged;According to affairs submission order, the operation affairs after merging built-in function is merged, and the affairs after merging are submitted into things storehouse successively.The present invention can not only improve database storage efficiency, and reduction database performance influence can simultaneously be effectively lifts data duplication delay, to ensuring that database is safely and steadily run, with important practical significance.
Description
Technical field
The present invention relates to a kind of database high concurrent affairs merging method, belong to database data reproduction technology field.
Background technology
With the deep development of information technology, the continuous upgrading of application system, the integrated insertion between system is more and more
The need for data interaction, data pick-up progressively become information system fusion key component.However, due to the one of affairs
Cause property requires that it is always key core technology that affairs, which merge submission technology, during data duplication, transaction operation of source, just
The small affairs peration data of magnanimity can be become by often extracting, and cause whole duplicating efficiency extremely low.
The content of the invention
In order to solve the above-mentioned technical problem, the invention provides a kind of database high concurrent affairs merging method.
In order to achieve the above object, the technical solution adopted in the present invention is:
A kind of database high concurrent affairs merging method, comprises the following steps,
Obtain affairs to be combined in batches from affairs pond;
According to the time sequencing of affairs built-in function, affairs built-in function is merged;
According to affairs submission order, the operation affairs after merging built-in function is merged, and by after merging
Affairs submit things storehouse successively.
Affairs built-in function merge process be,
Adjacent two operations are read, the type of operation is obtained, compares the type of two operations, carried out according to type in affairs
Portion's operation merges.
Affairs built-in function merging is carried out according to type, it is specific as follows,
It is A to define the operation of previous bar, and it after B, A and B merging is C that latter bar operation, which be,;
When A type is NULL, when B type is INSERT, C type is INSERT, C data after merging after merging
For B initial data;
When A type is NULL, when B type is DELETE, C type is DELETE, C data after merging after merging
For B initial data;
When A type is NULL, when B type is UPDATE, C type is UPDATE, C data after merging after merging
For B initial data;
When A type is INSERT, when B type is INSERT, transactional attribute is violated, merges abnormal;
When A type is INSERT, when B type is UPDATE, C type is UAPDATE, C after merging after merging
Data add B initial data for A initial data;
When A type is INSERT, when B type is DELETE, C type is DELETE, C number after merging after merging
According to the initial data for B;
When A type is DELETE, when B type is INSERT, C type is INSERT, C number after merging after merging
According to the initial data for B;
When A type is DELETE, when B type is UPDATE, transactional attribute is violated, merges abnormal;
When A type is DELETE, when B type is DELETE, C type is DELETE, C number after merging after merging
B initial data is added according to the initial data for A;
When A type is UPDATE, when B type is INSERT, transactional attribute is violated, merges abnormal;
When A type is UPDATE, when B type is UPDATE, C type is UPDATE, C number after merging after merging
B initial data is added according to the initial data for A;
When A type is UPDATE, when B type is DELETE, C type is DELETE, C number after merging after merging
According to the initial data for B.
Between affairs operation merge process be,
The operation of adjacent affairs is read, the type of operation is obtained, the type of relatively more adjacent transaction operation is carried out according to type
Operate and merge between affairs.
Carry out operating merging between affairs according to type, it is specific as follows,
The operation for defining former transaction is C1, and it after C2, C1 and C2 merging is C3 that the operations of latter affairs, which be,;
When C1 type is NULL, when C2 type is INSERT, C3 type is INSERT, C3 after merging after merging
Data are C2 initial data;
When C1 type is NULL, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data are C2 initial data;
When C1 type is NULL, when C2 type is UPDATE, C3 type is UPDATE, C3 after merging after merging
Data are C2 initial data;
When C1 type is INSERT, when C2 type is INSERT, transactional attribute is violated, merges abnormal;
When C1 type is INSERT, when C2 type is UPDATE, merge INSERT, C3 type is after merging
C3 data add C2 initial data for C1 initial data after UAPDATE, merging;
When C1 type is INSERT, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data be C2 initial data;
When C1 type is DELETE, when C2 type is INSERT, C3 type is INSERT, C3 after merging after merging
Data be C2 initial data;
When C1 type is DELETE, when C2 type is UPDATE, transactional attribute is violated, merges abnormal;
When C1 type is DELETE, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data be C2 data;
When C1 type is UPDATE, when C2 type is INSERT, transactional attribute is violated, merges abnormal;
When C1 type is UPDATE, when C2 type is UPDATE, C3 type is UPDATE, C3 after merging after merging
Data for C1 data add C2 data;
When C1 type is UPDATE, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data be C2 initial data.
When reading transaction operation, every operation is stored in table, the major keys of data as table Key, if without major key,
Then increase additional daily record as Key, type and data as table Value.
The beneficial effect that the present invention is reached:The present invention, will be from by comparison database transaction operation type context
The magnanimity affairs that database is extracted carry out merging inside affairs according to operating time, action type, after then merging again
Affairs carry out affairs between merge;Database storage efficiency can not only be improved by this method, reduction database performance influences,
Can simultaneously be effectively lifting data duplication delay, to ensuring that database is safely and steadily run, with important actual meaning
Justice.
Brief description of the drawings
Fig. 1 is flow chart of the invention;
Fig. 2 is that the database of logic-based level extracts the Organization Chart replicated.
Embodiment
The invention will be further described below in conjunction with the accompanying drawings.Following examples are only used for clearly illustrating the present invention
Technical scheme, and can not be limited the scope of the invention with this.
As shown in figure 1, a kind of database high concurrent affairs merging method, comprises the following steps:
Step 1, affairs to be combined are obtained in batches from affairs pond.
Step 2, according to the time sequencing of affairs built-in function, affairs built-in function is merged.
Detailed process is:Adjacent two operations are read, the type for obtaining operation (inserts INSERT, deletes DELETE, updates
UPDATE, without NULL), compare two operation types, according to type carry out affairs built-in function merging.
Affairs built-in function merging is carried out according to type, it is specific as follows:
It is A to define the operation of previous bar, and it after B, A and B merging is C that latter bar operation, which be,;
When A type is NULL, when B type is INSERT, C type is INSERT, C data after merging after merging
For B initial data;
When A type is NULL, when B type is DELETE, C type is DELETE, C data after merging after merging
For B initial data;
When A type is NULL, when B type is UPDATE, C type is UPDATE, C data after merging after merging
For B initial data;
When A type is INSERT, when B type is INSERT, transactional attribute is violated, merges abnormal;
When A type is INSERT, when B type is UPDATE, C type is UAPDATE, C after merging after merging
Data add B initial data for A initial data;
When A type is INSERT, when B type is DELETE, C type is DELETE, C number after merging after merging
According to the initial data for B;
When A type is DELETE, when B type is INSERT, C type is INSERT, C number after merging after merging
According to the initial data for B;
When A type is DELETE, when B type is UPDATE, transactional attribute is violated, merges abnormal;
When A type is DELETE, when B type is DELETE, C type is DELETE, C number after merging after merging
B initial data is added according to the initial data for A;
When A type is UPDATE, when B type is INSERT, transactional attribute is violated, merges abnormal;
When A type is UPDATE, when B type is UPDATE, C type is UPDATE, C number after merging after merging
B initial data is added according to the initial data for A;
When A type is UPDATE, when B type is DELETE, C type is DELETE, C number after merging after merging
According to the initial data for B.
Step 3, according to affairs submission order, the operation affairs after merging built-in function is merged, and will be closed
And after affairs submit things storehouse successively.
Detailed process is:Read the operation of adjacent affairs, the type for obtaining operation (insertion INSERT, deletes DELETE, more
New UPDATE, without NULL), the type of relatively more adjacent transaction operation according to type operate between affairs merging.
Carry out operating merging between affairs according to type, it is specific as follows:
The operation for defining former transaction is C1, and it after C2, C1 and C2 merging is C3 that the operations of latter affairs, which be,;
When C1 type is NULL, when C2 type is INSERT, C3 type is INSERT, C3 after merging after merging
Data are C2 initial data;
When C1 type is NULL, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data are C2 initial data;
When C1 type is NULL, when C2 type is UPDATE, C3 type is UPDATE, C3 after merging after merging
Data are C2 initial data;
When C1 type is INSERT, when C2 type is INSERT, transactional attribute is violated, merges abnormal;
When C1 type is INSERT, when C2 type is UPDATE, merge INSERT, C3 type is after merging
C3 data add C2 initial data for C1 initial data after UAPDATE, merging;
When C1 type is INSERT, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data be C2 initial data;
When C1 type is DELETE, when C2 type is INSERT, C3 type is INSERT, C3 after merging after merging
Data be C2 initial data;
When C1 type is DELETE, when C2 type is UPDATE, transactional attribute is violated, merges abnormal;
When C1 type is DELETE, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data be C2 data;
When C1 type is UPDATE, when C2 type is INSERT, transactional attribute is violated, merges abnormal;
When C1 type is UPDATE, when C2 type is UPDATE, C3 type is UPDATE, C3 after merging after merging
Data for C1 data add C2 data;
When C1 type is UPDATE, when C2 type is DELETE, C3 type is DELETE, C3 after merging after merging
Data be C2 initial data.
When step 2 and step 3 read transaction operation, every operation is stored in table (general using MAP tables), data
Major key as table Key, if without major key, increasing additional daily record as Key, type and data as table Value.
The principle of the present invention is as shown in Fig. 2 above method progress affairs inside merging, and will in batches by the way of thread
Affairs merge between result after merging carries out affairs again, finally submit the result after merging and are put in storage, by this method not
But database storage efficiency can be improved, reduction database performance influence can simultaneously be effectively lifts data duplication delay, right
Safely and steadily running for database is ensured, with important practical significance.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the technical principles of the invention, some improvement and deformation can also be made, these improve and deformed
Also it should be regarded as protection scope of the present invention.
Claims (6)
1. a kind of database high concurrent affairs merging method, it is characterised in that:Comprise the following steps,
Obtain affairs to be combined in batches from affairs pond;
According to the time sequencing of affairs built-in function, affairs built-in function is merged;
According to affairs submission order, the operation affairs after merging built-in function is merged, and by the affairs after merging
Things storehouse is submitted successively.
2. a kind of database high concurrent affairs merging method according to claim 1, it is characterised in that:Affairs built-in function
The process of merging is,
Adjacent two operations are read, the type of operation is obtained, compares the type of two operations, carry out grasping inside affairs according to type
Work merges.
3. a kind of database high concurrent affairs merging method according to claim 2, it is characterised in that:Carried out according to type
Affairs built-in function merges, specific as follows,
It is A to define the operation of previous bar, and it after B, A and B merging is C that latter bar operation, which be,;
When A type is NULL, when B type is INSERT, C type is INSERT after merging, and C data are B after merging
Initial data;
When A type is NULL, when B type is DELETE, C type is DELETE after merging, and C data are B after merging
Initial data;
When A type is NULL, when B type is UPDATE, C type is UPDATE after merging, and C data are B after merging
Initial data;
When A type is INSERT, when B type is INSERT, transactional attribute is violated, merges abnormal;
When A type is INSERT, when B type is UPDATE, C type is UAPDATE, C data after merging after merging
B initial data is added for A initial data;
When A type is INSERT, when B type is DELETE, C type is DELETE after merging, and C data are after merging
B initial data;
When A type is DELETE, when B type is INSERT, C type is INSERT after merging, and C data are after merging
B initial data;
When A type is DELETE, when B type is UPDATE, transactional attribute is violated, merges abnormal;
When A type is DELETE, when B type is DELETE, C type is DELETE after merging, and C data are after merging
A initial data adds B initial data;
When A type is UPDATE, when B type is INSERT, transactional attribute is violated, merges abnormal;
When A type is UPDATE, when B type is UPDATE, C type is UPDATE after merging, and C data are after merging
A initial data adds B initial data;
When A type is UPDATE, when B type is DELETE, C type is DELETE after merging, and C data are after merging
B initial data.
4. a kind of database high concurrent affairs merging method according to claim 1, it is characterised in that:Operation between affairs
The process of merging is,
The operation of adjacent affairs is read, the type of operation is obtained, the type of relatively more adjacent transaction operation carries out affairs according to type
Between operate merge.
5. a kind of database high concurrent affairs merging method according to claim 4, it is characterised in that:Carried out according to type
Operate and merge between affairs, it is specific as follows,
The operation for defining former transaction is C1, and it after C2, C1 and C2 merging is C3 that the operations of latter affairs, which be,;
When C1 type is NULL, when C2 type is INSERT, C3 type is INSERT, C3 data after merging after merging
For C2 initial data;
When C1 type is NULL, when C2 type is DELETE, C3 type is DELETE, C3 data after merging after merging
For C2 initial data;
When C1 type is NULL, when C2 type is UPDATE, C3 type is UPDATE, C3 data after merging after merging
For C2 initial data;
When C1 type is INSERT, when C2 type is INSERT, transactional attribute is violated, merges abnormal;
When C1 type is INSERT, when C2 type is UPDATE, merge INSERT, C3 type is UAPDATE after merging,
C3 data add C2 initial data for C1 initial data after merging;
When C1 type is INSERT, when C2 type is DELETE, C3 type is DELETE, C3 number after merging after merging
According to the initial data for C2;
When C1 type is DELETE, when C2 type is INSERT, C3 type is INSERT, C3 number after merging after merging
According to the initial data for C2;
When C1 type is DELETE, when C2 type is UPDATE, transactional attribute is violated, merges abnormal;
When C1 type is DELETE, when C2 type is DELETE, C3 type is DELETE, C3 number after merging after merging
According to the data for C2;
When C1 type is UPDATE, when C2 type is INSERT, transactional attribute is violated, merges abnormal;
When C1 type is UPDATE, when C2 type is UPDATE, C3 type is UPDATE, C3 number after merging after merging
C2 data are added according to the data for C1;
When C1 type is UPDATE, when C2 type is DELETE, C3 type is DELETE, C3 number after merging after merging
According to the initial data for C2.
6. a kind of database high concurrent affairs merging method according to claim 2 or 4, it is characterised in that:Read affairs
During operation, every operation is stored in table, the major keys of data as table Key, if without major key, increasing additional daily record and making
For Key, type and data as table Value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710232312.9A CN107038231A (en) | 2017-04-11 | 2017-04-11 | A kind of database high concurrent affairs merging method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710232312.9A CN107038231A (en) | 2017-04-11 | 2017-04-11 | A kind of database high concurrent affairs merging method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107038231A true CN107038231A (en) | 2017-08-11 |
Family
ID=59536133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710232312.9A Pending CN107038231A (en) | 2017-04-11 | 2017-04-11 | A kind of database high concurrent affairs merging method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107038231A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408589A (en) * | 2018-09-14 | 2019-03-01 | 新华三大数据技术有限公司 | Method of data synchronization and device |
CN111858504A (en) * | 2020-06-04 | 2020-10-30 | 武汉达梦数据库有限公司 | Operation merging execution method based on log analysis synchronization and data synchronization system |
CN112035222A (en) * | 2020-07-30 | 2020-12-04 | 武汉达梦数据库有限公司 | Transaction operation merging execution method and device based on log analysis synchronization |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184106A (en) * | 2007-11-30 | 2008-05-21 | 北京航空航天大学 | Associated transaction processing method of mobile database |
CN101625703A (en) * | 2009-08-21 | 2010-01-13 | 华中科技大学 | Method and system for merging logs of memory database |
CN102156720A (en) * | 2011-03-28 | 2011-08-17 | 中国人民解放军国防科学技术大学 | Method, device and system for restoring data |
CN102968332A (en) * | 2011-02-10 | 2013-03-13 | 德商赛克公司 | Systems and/or methods for identifying and resolving complex model merge conflicts based on atomic merge conflicts |
CN103425722A (en) * | 2012-04-30 | 2013-12-04 | Sap股份公司 | Logless atomic data movement |
CN105630838A (en) * | 2014-11-07 | 2016-06-01 | 北大方正集团有限公司 | Data replacement method and system |
-
2017
- 2017-04-11 CN CN201710232312.9A patent/CN107038231A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184106A (en) * | 2007-11-30 | 2008-05-21 | 北京航空航天大学 | Associated transaction processing method of mobile database |
CN101625703A (en) * | 2009-08-21 | 2010-01-13 | 华中科技大学 | Method and system for merging logs of memory database |
CN102968332A (en) * | 2011-02-10 | 2013-03-13 | 德商赛克公司 | Systems and/or methods for identifying and resolving complex model merge conflicts based on atomic merge conflicts |
CN102156720A (en) * | 2011-03-28 | 2011-08-17 | 中国人民解放军国防科学技术大学 | Method, device and system for restoring data |
CN103425722A (en) * | 2012-04-30 | 2013-12-04 | Sap股份公司 | Logless atomic data movement |
CN105630838A (en) * | 2014-11-07 | 2016-06-01 | 北大方正集团有限公司 | Data replacement method and system |
Non-Patent Citations (1)
Title |
---|
李作山: "基于本体的移动数据库同步数据的设计", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109408589A (en) * | 2018-09-14 | 2019-03-01 | 新华三大数据技术有限公司 | Method of data synchronization and device |
CN109408589B (en) * | 2018-09-14 | 2020-08-14 | 新华三大数据技术有限公司 | Data synchronization method and device |
CN111858504A (en) * | 2020-06-04 | 2020-10-30 | 武汉达梦数据库有限公司 | Operation merging execution method based on log analysis synchronization and data synchronization system |
CN111858504B (en) * | 2020-06-04 | 2023-12-12 | 武汉达梦数据库股份有限公司 | Operation merging execution method based on log analysis synchronization and data synchronization system |
CN112035222A (en) * | 2020-07-30 | 2020-12-04 | 武汉达梦数据库有限公司 | Transaction operation merging execution method and device based on log analysis synchronization |
CN112035222B (en) * | 2020-07-30 | 2022-04-19 | 武汉达梦数据库股份有限公司 | Transaction operation merging execution method and device based on log analysis synchronization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2024216290A1 (en) | Massive scale heterogeneous data ingestion and user resolution | |
US9348883B2 (en) | Systems and methods for replication replay in a relational database | |
CN107038231A (en) | A kind of database high concurrent affairs merging method | |
CN105468371B (en) | A kind of business process map merging method based on Subject Clustering | |
CN106126543B (en) | The model conversion and data migration method of a kind of relevant database to MongoDB | |
CN103440252B (en) | Information extracting method arranged side by side and device in a kind of Chinese sentence | |
CN104199892B (en) | A kind of index reading/writing method for merging asynchronous refresh based on compression | |
CN101650742B (en) | System and method for prompting search condition during English search | |
KR101549220B1 (en) | Method and System for Managing Database, and Tree Structure for Database | |
CN105068889B (en) | Recover the method for complete deletion file in Ext3/Ext4 | |
CN110188359B (en) | Text entity extraction method | |
CN108536745A (en) | Tables of data extracting method, terminal, equipment and storage medium based on Shell | |
CN107291858A (en) | Data indexing method based on character string suffix | |
CN103593257A (en) | Data backup method and device | |
CN112786215A (en) | Method and system for generating DIP comprehensive disease category catalog based on big data clustering | |
CN106021301A (en) | Comparing system and method for data having different file formats | |
Machanavajjhala et al. | Collective extraction from heterogeneous web lists | |
CN107273449A (en) | A kind of breakpoint processing method and system based on memory database | |
CN113961237B (en) | Bash code annotation generation method based on dual information retrieval | |
Hassanat et al. | Rule-and dictionary-based solution for variations in written Arabic names in social networks, big data, accounting systems and large databases | |
CN107609068A (en) | A kind of noninductive moving method of data | |
CN103942186A (en) | Method and system for managing documents | |
CN114490599A (en) | Method for processing and searching certificate number | |
JPS5949062A (en) | Information storing system | |
CN113010681A (en) | Unsupervised medical corpus text selection method based on sentence vectorization |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170811 |
|
RJ01 | Rejection of invention patent application after publication |