CN101814090A - Batch data insertion method of relational database - Google Patents

Batch data insertion method of relational database Download PDF

Info

Publication number
CN101814090A
CN101814090A CN201010131115A CN201010131115A CN101814090A CN 101814090 A CN101814090 A CN 101814090A CN 201010131115 A CN201010131115 A CN 201010131115A CN 201010131115 A CN201010131115 A CN 201010131115A CN 101814090 A CN101814090 A CN 101814090A
Authority
CN
China
Prior art keywords
data
insert
batch
database
trigger
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
Application number
CN201010131115A
Other languages
Chinese (zh)
Inventor
程荣涛
占美飞
谭俊丽
张家武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN LOKEE TECHNOLOGY DEVELOPMENT Co Ltd
Original Assignee
SHENZHEN LOKEE TECHNOLOGY DEVELOPMENT Co Ltd
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 SHENZHEN LOKEE TECHNOLOGY DEVELOPMENT Co Ltd filed Critical SHENZHEN LOKEE TECHNOLOGY DEVELOPMENT Co Ltd
Priority to CN201010131115A priority Critical patent/CN101814090A/en
Publication of CN101814090A publication Critical patent/CN101814090A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a batch data insertion method of a relational database, which comprises the following steps: A. establishing an insertion data buffer region; B. storing data to be inserted into the data buffer storage region; and C. inserting the data into a database in a batch mode after the data is stored in the whole data buffer region. Compared with the prior art, the invention has the advantages that 1. the batch insertion can ensure the success, and the batch insertion failure can not be caused by data violation during the batch insertion; 3. the database operation times are reduced, and the performance is improved; and 4. the error treatment mechanisms are flexible during the data violation.

Description

A kind of data insertion method in enormous quantities of relational database
Technical field
The invention belongs to database data and insert the field, be specifically related to a kind of data insertion method in enormous quantities of relational database.
Background technology
In supervisory system, there are large number quipments state, alarm data.And data need in time be stored to convenient inquiry later in the database.If adopt traditional insertion method, will be directed at the frequent operation database as long as receive just to deposit after the data to database, will seriously reduce the performance of communication server communication like this., as adopt traditional batch to insert, promptly return if adopt to allow to make mistakes, if then when inserting, there are data wrong then will cause whole batch data to insert failure.Inserting in batches makes mistakes also allows to continue to insert if adopt, and can not judge that then which data inserts successfully, and which data insertion is failed.
Summary of the invention
The present invention is directed to above-mentioned problems and correct, make product not want the frequent operation database, improve communication server performance; Can adopt an effective measure when inserting database in batches to solve when data break rules and to insert success in batches; Error handling processing mechanism flexibly when data broke rules.
Concrete technical scheme is:
A kind of data insertion method in enormous quantities of relational database, it may further comprise the steps:
A. set up and insert data buffer area;
The data storage that B. will need to insert is in data buffer area;
C. after data buffer area is filled with data, insert database in batches.
Described step C may further comprise the steps:
C1. the tables of data that will insert data is set up and is inserted view;
C2. in inserting view, set up the trigger of makeing mistakes;
C3. adopting OCI batch inserted mode to carry out batch data inserts;
C4. when the data of inserting are made mistakes, insert view and trigger the trigger of makeing mistakes;
C5. the trigger of makeing mistakes is handled the data of makeing mistakes by the data error handling processing mechanism of setting.
Described data error handling processing mechanism is:
Error data existing this data key words in database is then upgraded related data; Or
Error data is saved in the misdata table; Or
Error data is not handled direct deletion.
Compared with prior art there is following advantage in the present invention:
1, insertion can guarantee success in batches, can not insert failure by the gross because of occurring causing when data break rules when inserting in batches.
2, reduce the operating database number of times, improve performance.
Handle the mechanism of makeing mistakes when 3, data break rules flexibly.
Description of drawings
Fig. 1 is the data buffer area processing flow chart of the embodiment of the invention;
Fig. 2 is the insertion view of the embodiment of the invention triggering process flow diagram of makeing mistakes;
Fig. 3 is the data error handling processing mechanism block diagram of the embodiment of the invention.
Embodiment
Describe the present invention by the following examples, should be noted that, cited embodiment should not understand the restriction to invention.
As Fig. 1, Fig. 2, shown in Figure 3: the data insertion method in enormous quantities of a kind of relational database of present embodiment, it may further comprise the steps:
A. set up and insert data buffer area; (as Fig. 1)
The data storage that B. will need to insert is in data buffer area;
C. after data buffer area is filled with data, insert database in batches.
Described step C may further comprise the steps:
C1. the tables of data that will insert data is set up and is inserted view;
C2. in inserting view, set up the trigger of makeing mistakes; (as Fig. 2)
C3. adopting OCI batch inserted mode to carry out batch data inserts;
C4. when the data of inserting are made mistakes, insert view and trigger the trigger of makeing mistakes;
C5. the trigger of makeing mistakes is handled the data of makeing mistakes by the data error handling processing mechanism of setting.
Described data error handling processing mechanism is: (as Fig. 3)
Error data existing this data key words in database is then upgraded related data; Or
Error data is saved in the misdata table; Or
Error data is not handled direct deletion.
Compared with prior art there is following advantage in the present invention:
1, insertion can guarantee success in batches, can not insert by the gross failure because occurring causing when data break rules when inserting in batches.
2, reduce the operating database number of times, improve performance.
Process the mechanism of makeing mistakes when 3, data break rules flexibly.
With data buffer storage to buffer area, if data buffer area is full in batches in the data inserting storehouse. The data that database root will be inserted into view according to error handling processing mechanism are inserted into finally to be finished batch data and inserts in the final tables of data.
Obviously, foregoing is just in order to illustrate characteristics of the present invention, and is not limitation of the present invention, and the those of ordinary skill in relevant technologies field should belong to protection category of the present invention according to the present invention in the variation that corresponding technical field is made.

Claims (3)

1. the data insertion method in enormous quantities of a relational database is characterised in that it may further comprise the steps:
A. set up and insert data buffer area;
The data storage that B. will need to insert is in data buffer area;
C. after data buffer area is filled with data, insert database in batches.
2. the data insertion method in enormous quantities of a kind of relational database according to claim 1, its feature is that also described step C may further comprise the steps:
C1. the tables of data that will insert data is set up and is inserted view;
C2. in inserting view, set up the trigger of makeing mistakes;
C3. adopting OCI batch inserted mode to carry out batch data inserts;
C4. when the data of inserting are made mistakes, insert view and trigger the trigger of makeing mistakes;
C5. the trigger of makeing mistakes is handled the data of makeing mistakes by the data error handling processing mechanism of setting.
3. the data insertion method in enormous quantities of a kind of relational database according to claim 2, its feature also is: described data error handling processing mechanism is,
Error data existing this data key words in database is then upgraded related data; Or
Error data is saved in the misdata table; Or
Error data is not handled direct deletion.
CN201010131115A 2010-03-22 2010-03-22 Batch data insertion method of relational database Pending CN101814090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010131115A CN101814090A (en) 2010-03-22 2010-03-22 Batch data insertion method of relational database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010131115A CN101814090A (en) 2010-03-22 2010-03-22 Batch data insertion method of relational database

Publications (1)

Publication Number Publication Date
CN101814090A true CN101814090A (en) 2010-08-25

Family

ID=42621344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010131115A Pending CN101814090A (en) 2010-03-22 2010-03-22 Batch data insertion method of relational database

Country Status (1)

Country Link
CN (1) CN101814090A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996244A (en) * 2010-11-09 2011-03-30 中兴通讯股份有限公司 Device, system and method for inputting batch data into database
CN102799582A (en) * 2011-05-23 2012-11-28 中兴通讯股份有限公司 Method and device for improving automatic business-discovering efficiency of webmasters
CN103760876A (en) * 2014-01-29 2014-04-30 北京七星华创电子股份有限公司 Alarm information storing method and device
CN105335482A (en) * 2015-10-14 2016-02-17 西北工业大学 Batch insert method facing mass distributed database
CN105893424A (en) * 2015-12-04 2016-08-24 乐视网信息技术(北京)股份有限公司 Data storage device and method for server
CN109271394A (en) * 2018-08-27 2019-01-25 武汉达梦数据库有限公司 A kind of batch data insertion update implementation method based on ID caching
CN110019259A (en) * 2017-09-26 2019-07-16 亿阳信通股份有限公司 Data-updating method, device and the storage medium of distributed index service-Engine
CN110569396A (en) * 2019-09-03 2019-12-13 上海赜睿信息科技有限公司 Data searching method, electronic equipment and computer readable storage medium
CN113360498A (en) * 2021-06-01 2021-09-07 中国农业银行股份有限公司 Streaming data unloading processing method and device and server

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515291A (en) * 2009-03-26 2009-08-26 北京泰合佳通信息技术有限公司 Method for leading data into database in a batch way and system thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515291A (en) * 2009-03-26 2009-08-26 北京泰合佳通信息技术有限公司 Method for leading data into database in a batch way and system thereof

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012062010A1 (en) * 2010-11-09 2012-05-18 中兴通讯股份有限公司 Device, system and method for batch data storage
CN101996244A (en) * 2010-11-09 2011-03-30 中兴通讯股份有限公司 Device, system and method for inputting batch data into database
CN102799582A (en) * 2011-05-23 2012-11-28 中兴通讯股份有限公司 Method and device for improving automatic business-discovering efficiency of webmasters
CN102799582B (en) * 2011-05-23 2015-06-03 中兴通讯股份有限公司 Method and device for improving automatic business-discovering efficiency of webmasters
CN103760876A (en) * 2014-01-29 2014-04-30 北京七星华创电子股份有限公司 Alarm information storing method and device
CN105335482B (en) * 2015-10-14 2018-07-03 西北工业大学 Towards the batch insertion method of magnanimity distributed data base
CN105335482A (en) * 2015-10-14 2016-02-17 西北工业大学 Batch insert method facing mass distributed database
CN105893424A (en) * 2015-12-04 2016-08-24 乐视网信息技术(北京)股份有限公司 Data storage device and method for server
CN110019259A (en) * 2017-09-26 2019-07-16 亿阳信通股份有限公司 Data-updating method, device and the storage medium of distributed index service-Engine
CN110019259B (en) * 2017-09-26 2023-09-22 亿阳信通股份有限公司 Data updating method, device and storage medium of distributed index service engine
CN109271394A (en) * 2018-08-27 2019-01-25 武汉达梦数据库有限公司 A kind of batch data insertion update implementation method based on ID caching
CN109271394B (en) * 2018-08-27 2021-05-07 武汉达梦数据库有限公司 Data batch insertion updating implementation method based on ID cache
CN110569396A (en) * 2019-09-03 2019-12-13 上海赜睿信息科技有限公司 Data searching method, electronic equipment and computer readable storage medium
CN110569396B (en) * 2019-09-03 2022-05-06 上海赜睿信息科技有限公司 Data searching method, electronic equipment and computer readable storage medium
CN113360498A (en) * 2021-06-01 2021-09-07 中国农业银行股份有限公司 Streaming data unloading processing method and device and server

Similar Documents

Publication Publication Date Title
CN101814090A (en) Batch data insertion method of relational database
CN102915336B (en) Incremental data capturing and extraction method based on timestamps and logs
CN103744982A (en) Method for importing Excel data into database
CN104461786B (en) The restoration methods of android system and the recovery system of android system
CN102043719B (en) Method for testing IEC61850 configuration description file
CN103747080B (en) A kind of file uploading method and system
CN103593257B (en) A kind of data back up method and device
CN105975502A (en) Method for realizing incremental data extract based on CDC (Change Data Capture) mode
EP2713555B1 (en) Data configuration method and device, and rollback method and device for data configuration
CN102830995A (en) Method for upgrading Android platform software with user data reserved
CN102118258A (en) Protective method and protective system for abnormal situation in upgrading of gigabit passive optical network terminal
CN103279427B (en) The management method based on hash of location identifier and system
CN102262636B (en) Method and device for generating database partition execution plan
CN103049550A (en) Method and system for importing common files to database
CN103593447A (en) Data processing method and device applied to database table
CN104298570B (en) Data processing method and device
CN102937923B (en) A kind of method of automatic preservation user interface state
CN104077343A (en) Method for deleting invalid elements of hash table
CN107766512B (en) Log data storage method and log data storage system
CN104700030A (en) Virus data searching method, device and server
CN102882723A (en) Method and device for processing alarm time-sequence mismatch in communication network
CN102841919A (en) Method and system for analyzing expressions in conversion text
CN107798570A (en) A kind of recovery and treatment method of blank invoice, storage medium and server
CN109739868A (en) A kind of data processing method and its relevant device
CN111190912B (en) Large-transaction-oriented sharding execution method and device based on line change

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100825