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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com