Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method and device for batch submitting data to database

A database and data technology, which is applied in the field of database storage, can solve problems such as data rollback, correct data discarding, and inability to store data, and achieve the effect of improving efficiency

Active Publication Date: 2017-04-05
JUHAOKAN TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in the existing method of submitting data to the database in batches, if there is an error in the data submitted in batches, all the data submitted in batches will be rolled back; Wrong data and correct data, so, either discard the wrong data together with the correct data to ensure that the wrong data is eliminated, which will cause part of the correct data to be discarded and cannot be stored in the database; or submit the rolled back data one by one Submit to the database to ensure that the correct data is successfully stored in the database. However, the method of submitting data one by one will lead to low data storage efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for batch submitting data to database
  • A method and device for batch submitting data to database
  • A method and device for batch submitting data to database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and preferred embodiments. However, it should be noted that many details listed in the specification are only to enable the reader to have a thorough understanding of one or more aspects of the present invention, and these aspects of the present invention can be implemented even without these specific details.

[0052] The terms "module" and "system" used in this application are intended to include computer-related entities, such as but not limited to hardware, firmware, a combination of software and hardware, software, or software in execution. For example, a module may be, but is not limited to: a process, a processor, an object, an executable program, a thread of execution, a program, and / or a computer running on the processor. For example, both the application p...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for submitting data to a database in batch. The method comprises the following steps: after a data submitting device detects that the number of data pieces cached in a data-caching queue exceeds a set threshold value, data is completely extracted out and a SQL data insert statement corresponding to each piece of data is generated for each piece of data; then, the SQL data insert statements are written into an affair in sequence to be submitted to a middleware according to the magnitude sequence of the main keys of each piece of data; the middleware converts each SQL data insert statement in the affair into a corresponding database command to be sent to a database, and if an abnormal execution result fed back from the database is received, the abnormal execution result is reported to the data submitting device; the data submitting device determines the main keys of error data according to the reported abnormal execution result; the data of the main keys, behind the main keys of the error data, is stored into the data-caching queue again. Through the application of the invention, the phenomenon that correct data is discarded can be avoided, and the in-batch data storing efficiency is improved.

Description

Technical field [0001] The present invention relates to database storage technology, in particular to a method and device for submitting data to a database in batches. Background technique [0002] At present, large-scale business application systems such as OA (Office Automation), ERP (Enterprise Resource Planning), CRM (Customer Relationship Management, customer relationship management system), and log analysis systems all need to be stored in a database Of massive business data. Generally speaking, data can be submitted one by one in the database, that is, every time a piece of business data is generated at the data source, the middleware submits the data to the database; however, because only one piece of data can be submitted to the database at a time, the system has a large amount of data. Data needs to be stored in the database, which leads to frequent interaction with the database during the submission process, which occupies a lot of database resources, and the speed of...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/30
CPCG06F16/25
Inventor 田玉祺
Owner JUHAOKAN TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products