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

Method and device for adding transaction control to relational database script

A database and transaction technology, applied in the field of database management, can solve problems such as heavy workload, large system, dirty data, etc., to achieve the effect of improving work efficiency, avoiding human errors, and reducing manual work

Active Publication Date: 2019-05-03
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method of manually adding transaction control is inefficient, and the workload is huge when the amount of data is large. Due to human errors, a large amount of system dirty data will also be generated, thereby increasing the workload of the operation and maintenance DBA.

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
  • Method and device for adding transaction control to relational database script
  • Method and device for adding transaction control to relational database script
  • Method and device for adding transaction control to relational database script

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0045] figure 1 It is a flowchart of a method for adding transaction control to relational database scripts provided by Embodiment 1 of the present invention. This embodiment is applicable to adding transaction control to scripts that have been exported from relational databases or adding transactions when exporting scripts in relational databases Control, this method can be carried out by computer, specifically comprises the following steps:

[0046] Step 110, configure transaction granularity.

[0047] Wherein, the transaction granularity refers to the smallest unit for inserting transaction control into a relational database script, that is, a transaction control statement COMMIT is inserted into a script of every transaction granularity in a relational database script.

[0048] Wherein, the range of the transaction granularity is preferably 200-500. The range of transaction granularity, that is, the line interval of 200-500 is obtained through multiple tests, which can m...

Embodiment 2

[0056] figure 2 It is a flow chart of a method for adding transaction control to a relational database script provided by Embodiment 2 of the present invention, specifically including the following steps:

[0057]Step 210, according to whether there is already a transaction control statement, determine whether to add transaction control, if so, trigger the operation of configuring transaction granularity.

[0058] When there is already a transaction control statement in the database script, it is judged that there is no need to add transaction control; of course, when there is already a transaction control statement in the database script but the line interval of the transaction control statement in the script is relatively large (for example, the line interval is 1000, but The line interval required by the business is 200), and when the business needs are not met, it is also judged that transaction control needs to be added; when there is no transaction control statement in ...

Embodiment 3

[0063] image 3 It is a flowchart of a method for adding transaction control to a relational database script provided by Embodiment 3 of the present invention. Compared with Embodiment 1, Step 120 is further divided into Step 320 and Step 330 in this embodiment. It is suitable for adding transaction control to scripts that have been exported from relational databases, and specifically includes the following steps:

[0064] Step 310, configure transaction granularity.

[0065] Step 320, calculate the remainder of the read temporary line number of the script to the transaction granularity.

[0066] When adding transaction control to a script that has been exported from the database, you can start reading the script from the first line of the script, and in the process of reading a line of script, compare the temporary line number of the read script to the transaction granularity Perform remainder calculations. Among them, the temporary line number refers to the line number of...

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 an apparatus for adding transaction control to a relational database script. The method comprises: configuring transaction granularity; and adding a transaction control statement before and after a line with a line number of an integral multiple of the transaction granularity. According to the invention, the transaction granularity may be dynamically configured, so that dynamic configuration of adding of transaction control is implemented, efficiency of adding of transaction control is improved, and overall work efficiency may be improved. With the growing of maintenance systems, a great deal of repetitive manual work can be reduced, thereby greatly improving work efficiency and avoiding a human error generated by a manual operation in the prior art.

Description

technical field [0001] The embodiment of the present invention relates to database management technology, in particular to a method and device for adding transaction control to a relational database script. Background technique [0002] In the daily operation and maintenance of the database, scripts are often inserted in batches. The scripts for batch insertion are usually provided by developers. The insertion scripts are basically tens of thousands or even hundreds of thousands of data. One time insertion without any submission statement, when the program is abnormal It is self-evident that the transaction rollback will have an impact on the running system. Therefore, it is necessary to add the transaction control statement COMMIT when executing the script. [0003] In the prior art, the transaction control statement is manually added by an operation and maintenance DBA (Database administrator, database administrator) or a developer. This method of manually adding transact...

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): G06F16/21G06F16/28
CPCG06F16/217G06F16/284
Inventor 李亮光
Owner BEIJING JINGDONG SHANGKE INFORMATION 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