Dml statement recording method and device, server and storage medium
By generating DML statements from operation logs obtained from the storage path without shutting down the database, the problem of generating DML statements affecting database operation in existing technologies is solved, and fast and accurate DML statement generation and data operation management are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-30
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, the process of generating DML statements requires shutting down the database and reconfiguring the log level, which affects the normal operation of the database.
DML statements are generated by retrieving database operation logs from a specified storage path without shutting down the database. This logs include full-page data before the operation, field data after the operation, operation type, and table structure information.
It enables the rapid and accurate generation of DML statements without affecting the normal operation of the database, and supports data restoration and undo operations.
Smart Images

Figure CN116107809B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of database management technology, and in particular to a method, apparatus, server and storage medium for recording DML statements. Background Technology
[0002] One way databases store data is by storing it in rows and columns. These rows and columns are called tables, and a set of tables makes up a database. When users need to perform operations on the database (such as adding or deleting data), database operation logs can be recorded.
[0003] Currently, when it's necessary to record the DML statements corresponding to each database operation, the database must be shut down beforehand, and then the database log level must be reconfigured to record both the full page data before and after the operation. Then, the database is restarted. After each subsequent database operation, the full page data before and after the operation is recorded in a specified storage path. Furthermore, the corresponding DML statement can be generated based on the recorded full page data before and after the operation. It's clear that the above process of generating DML statements relies on shutting down the database and reconfiguring the database log level, which affects the normal operation of the database. Summary of the Invention
[0004] This application provides a method, apparatus, server, and storage medium for recording DML statements, which solves the problem in the prior art where the process of generating DML statements depends on first shutting down the database and reconfiguring the database's log level, thus affecting the normal operation of the database.
[0005] Firstly, this application provides a DML statement recording method, comprising: a server receiving a data operation DML statement generation instruction from a user terminal at a first moment; the server retrieving database operation logs generated within a first time period from a specified storage path. The first time period is the interval between the second moment after the last backup of the database data and the first moment. The database operation logs include the full page data before the first operation on the target page of the database within the first time period, the data corresponding to the operated fields after each operation, the operation type for each operation, and the table structure information of the target page. Based on the full page data, the afterimage data corresponding to the operated fields after each operation, the operation type for each operation, and the table structure information of the target page, the server generates DML statements corresponding to each operation; the server records the set of DML statements to execute the corresponding operation processing.
[0006] In one possible implementation, the server, based on the full page data, the afterimage data corresponding to the fields operated on after each operation, the operation type, and the table structure information of the target page, includes: the server determining the beforeimage data corresponding to the fields operated on before the Nth operation from the full page data before the Nth operation, where N is a positive integer. When N is greater than 1, the full page data before the Nth operation is generated based on the full page data before the (N-1)th operation and the DML statement corresponding to the (N-1)th operation; the server determining the DML statement corresponding to the Nth operation based on the beforeimage data corresponding to the fields operated on before the Nth operation, the afterimage data corresponding to the fields operated on after the Nth operation, the operation type of the Nth operation, and the table structure information of the target page.
[0007] This allows for the quick and accurate determination of the DML statement corresponding to the Nth operation.
[0008] In one possible implementation, before the server receives the data operation DML statement recovery instruction from the user terminal at the first moment, the method provided in this application further includes: when the server receives the operation instruction on the target page of the database for the first time within the first time period, recording the full page data before the first operation on the target page of the database in a specified storage path.
[0009] In one possible implementation, before the server receives the data operation DML statement recovery instruction from the user terminal at the first moment, the method provided in this application further includes: each time the server performs an operation on the database within the first time period, recording the data corresponding to the operated field, the operation type, and the table structure information of the target page in a specified storage path.
[0010] In one possible implementation, DML statements are operation statements used to instruct data restoration. After the server records the set of DML statements, the method provided in this application further includes: the server receiving a data restoration instruction from the user terminal at a third time after the first time; and the server restoring the database at the first time based on the data of the previously backed-up database and the set of DML statements in response to the data restoration instruction.
[0011] Understandably, based on the data from the last backup of the database and the set of DML statements, the database at the moment of the last backup can be quickly and accurately restored.
[0012] In one possible implementation, the DML statement is an operation statement used to indicate the undo operation. After the server records the set of DML statements, the method provided in this application further includes: the server receiving an undo instruction from the user terminal at a third time after the first time; in response to the undo instruction, the server undoes the operations on the database within the first time period based on the data of the database at the third time and the set of DML statements, so as to obtain the database at the second time.
[0013] Understandably, based on the data and DML statement set of the database at the third time step, the database at the second time step can be obtained quickly and accurately.
[0014] In one possible implementation, the operation type is a delete operation, an update operation, or an add operation.
[0015] Secondly, this application also provides a DML statement recording device, comprising: an instruction receiving unit, configured to receive a data operation DML statement generation instruction from a user terminal at a first moment; a log acquisition unit, configured to acquire database operation logs generated within a first duration from a specified storage path; wherein the first duration is the interval between the second moment of the last backup of the database data and the first moment; the database operation log includes full page data before the first operation on the target page of the database within the first duration, data corresponding to the fields operated on after each operation, the operation type of each operation, and the table structure information of the target page; a statement generation unit, configured to generate DML statements corresponding to each operation based on the full page data, data corresponding to the fields operated on after each operation, the operation type of each operation, and the table structure information of the target page; and a statement recording unit, configured to record the DML statement set.
[0016] Thirdly, this application provides a server including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the server performs the method provided in the first aspect.
[0017] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the computer to perform the method provided in the first aspect.
[0018] Fifthly, this application also provides a computer program product, including a computer program that, when run, causes a computer to perform the method provided in the first aspect.
[0019] This application provides a method, apparatus, server, and storage medium for recording DML statements. The server can obtain database operation logs generated within a first time period from a specified storage path. Since the database operation logs include the full page data before the first operation on the target page of the database within the first time period, the afterimage data corresponding to the operated fields after each operation, the operation type, and the table structure information of the target page, the server can directly generate DML statements corresponding to each operation based on the full page data before the first operation, the afterimage data corresponding to the operated fields after each operation, the operation type, and the table structure information of the target page. Compared to the prior art where generating DML statements requires shutting down the database and reconfiguring the database log level, thus affecting the normal operation of the database, this application generates DML statements primarily based on the full page data before the first operation and the afterimage data corresponding to the operated fields after each operation, rather than the full page data before and after the operation. Therefore, it is not necessary to shut down the database when generating DML statements, allowing the database to operate normally. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 One of the flowcharts for the DML statement recording method provided in the embodiments of this application;
[0022] Figure 2 The second flowchart of the DML statement recording method provided in the embodiments of this application;
[0023] Figure 3 This is a schematic diagram illustrating the updating of the content of field 1 in the target page, provided as an embodiment of this application.
[0024] Figure 4 The third flowchart of the DML statement recording method provided in the embodiments of this application;
[0025] Figure 5 The fourth flowchart of the DML statement recording method provided in the embodiments of this application;
[0026] Figure 6 The fifth flowchart of the DML statement recording method provided in the embodiments of this application;
[0027] Figure 7This is one of the functional module block diagrams of the DML statement recording device provided in the embodiments of this application;
[0028] Figure 8 This is the second functional block diagram of the DML statement recording device provided in the embodiments of this application;
[0029] Figure 9 The third functional block diagram of the DML statement recording device provided in the embodiments of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0031] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] Currently, when it's necessary to record the DML statements corresponding to each database operation, the database must be shut down beforehand, and then the database log level must be reconfigured to record both the full page data before and after the operation. Then, the database is restarted. After each subsequent database operation, the full page data before and after the operation is recorded in a specified storage path. Furthermore, the corresponding DML statement can be generated based on the recorded full page data before and after the operation. It's clear that the above process of generating DML statements relies on shutting down the database and reconfiguring the database log level, which affects the normal operation of the database.
[0033] Based on the above-mentioned technical problems, the inventive concept of this application is: how to effectively generate DML statements without affecting the normal operation of the database.
[0034] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0035] This application provides a method for recording DML statements, applied to a server. The server communicates with the user terminal to exchange data. Figure 1 As shown, the method provided in this application embodiment includes:
[0036] S101: The server receives the DML statement generation instruction from the user terminal at the first moment.
[0037] For example, the user terminal can display a database operation interface, which includes a DML statement generation button. In response to the user's activation of the DML statement generation button, the user terminal can send a data operation DML statement generation instruction to the server. Subsequently, the server receives the data operation DML statement generation instruction from the user terminal in the first instant.
[0038] S102: The server retrieves the database operation logs generated within the first time period from the specified storage path.
[0039] The first duration is the interval between the second moment after the last database backup and the first moment. Understandably, the server backs up incremental data to the database at preset intervals to prevent data loss due to unforeseen events (such as database failure or power outages). The second moment is the start time of the preset period. For example, the start time of the preset period can be 23:00 or 7:00 every day. When the first moment is 7:00 and the second moment is 9:00, the first duration is the interval between 7:00 and 9:00.
[0040] Specifically, the database operation log includes the full page data before the first operation on the target page of the database within the first time period, the afterimage data corresponding to the operated fields after each operation, the operation type of each operation, and the table structure information of the target page.
[0041] Understandably, the database stores data in pages. When a target page in the database is accessed within a first time period, the database records the entire page's data up to the first access within that first time period. Here, "entire page data" refers to all the data content of the target page.
[0042] The afterimage data corresponding to the operated field after each operation refers to: for example, if the content A of field 1 in sub-segment 1 of the target page is updated to the content B, then the afterimage data corresponding to the operated field 1 is the content B.
[0043] Additionally, the operation type can be, but is not limited to, delete, update, or add operations. The table structure information of the target page is used to indicate the location of the field being operated on in the target page (the table structure information can be "Name" and "Score"; or "Department" and "Performance").
[0044] S103: The server generates DML statements corresponding to each operation based on the full page data, the subsequent data corresponding to the fields operated on after each operation, the operation type, and the table structure information of the target page.
[0045] For example, such as Figure 2 As shown, S103 can be specifically implemented as follows:
[0046] S201: The server determines the preceding image data corresponding to the field operated on before the Nth operation from the full page data before the Nth operation.
[0047] Where N is a positive integer, when N is greater than 1, the full page data before the Nth operation is generated based on the full page data before the (N-1)th operation and the DML statement corresponding to the (N-1)th operation. Understandably, since executing the DML statement corresponding to the (N-1)th operation on the full page data before the (N-1)th operation yields the full page data before the Nth operation, the reliability is high.
[0048] For example, when the target page is page1, such as Figure 3 As shown, when N=1, the first operation is: the field content A of sub-segment 1 in the target page is updated to the field content B. Then the full page data before the first operation is the full page data of the target page before the first operation on the target page of the database within the first time period.
[0049] Still Figure 3 As shown, when N=2, the second operation is as follows: the content B of field 1 in the target page is updated to the content C. Therefore, the data of the entire page before the second operation is: the target page containing field 1 with content B. It can be understood that the preceding data of the operated field 1 before the second operation is field content A.
[0050] Similarly, still Figure 3As shown, when N=3, the third operation is: the content C of field 1 in the target page is updated to the content D. Therefore, the full page data before the third operation is: the target page containing field 1 with content C. It can be understood that the operated field is field 1, and the previous data of field 1 before the third operation is the content C.
[0051] In addition, Figure 3 When the target page is page1, page2, page3, or page4, the preceding image data corresponding to the field being operated on before the Nth operation is determined. This is the same as when the target page is page1, and no further restrictions are imposed here.
[0052] S202: The server determines the DML statement corresponding to the Nth operation based on the previous image data corresponding to the field operated on before the Nth operation, the subsequent image data corresponding to the field operated on after the Nth operation, the operation type of the Nth operation, and the table structure information of the target page.
[0053] By executing the DML statement corresponding to the operation type of the Nth operation on the preceding field of the Nth operation, we can obtain the following field of the Nth operation. The table structure information of the target page is used to locate the preceding and following data. Thus, based on the preceding and following data, operation type, and table structure information, the DML statement corresponding to the Nth operation can be accurately and reliably determined.
[0054] S104: The server records a set of DML statements to perform corresponding operations.
[0055] Understandably, this refers to the set of DML statements corresponding to each operation within the first time period, i.e., the set of DML statements.
[0056] In this embodiment, the server can obtain the database operation logs generated within a first time period from a specified storage path. Since the database operation logs include the full-page data before the first operation on the target page of the database within the first time period, the afterimage data corresponding to the fields operated on after each operation, the operation type, and the table structure information of the target page, the server can directly generate DML statements corresponding to each operation based on the full-page data, the afterimage data corresponding to the fields operated on after each operation, the operation type, and the table structure information of the target page. Compared to the prior art where generating DML statements requires shutting down the database and reconfiguring the database log level, thus affecting the normal operation of the database, this application generates DML statements primarily based on the full-page data before the first operation and the afterimage data corresponding to the fields operated on after each operation, rather than the full-page data before and after the operation. Therefore, it is not necessary to shut down the database when generating DML statements, allowing the database to operate normally.
[0057] In addition, such as Figure 4 As shown, prior to S101, the method provided in this application embodiment may further include:
[0058] S301: When the server receives an operation instruction for the target page of the database for the first time within the first time period, it records the full page data before the first operation on the target page of the database in the specified storage path.
[0059] S302: Each time the server performs an operation on the database within the first time period, it records the data corresponding to the operated field, the operation type, and the table structure information of the target page in the specified storage path.
[0060] For example, the application of DML statement sets includes, but is not limited to, the following two:
[0061] The first type: DML statements are operation statements used to instruct data restoration, such as... Figure 5 As shown, after S104, the method provided in this application embodiment further includes:
[0062] S401: The server receives a data restoration command from the user terminal at the third moment after the first moment.
[0063] Understandably, if the database data at the initial moment is lost due to an accident (such as database failure, power outage, etc.), the user has a need to restore the database data at that initial moment. Thus, the user terminal can respond to the user's trigger operation by sending a data restoration command to the server at the third moment. The server can then receive the data restoration command from the user terminal.
[0064] S402: The server responds to the data restore command and restores the database to its current state based on the data from the last backup and the set of DML statements.
[0065] Since the database was backed up at the beginning of the first time period, and the DML statement set is a series of operations performed on the database within the first time period that instruct data restoration, the database at the time of the first backup can be restored based on the data from the previous backup and the DML statement set.
[0066] Understandably, based on the data from the last backup of the database and the set of DML statements, the database at the moment of the last backup can be quickly and accurately restored.
[0067] The second type: DML statements are operation statements used to indicate undo operations, such as... Figure 6 As shown, after S104, the method provided in this application embodiment further includes:
[0068] S501: The server receives a cancellation command from the user terminal at the third moment after the first moment.
[0069] Understandably, if an error occurs during a series of operations within the first time period, the user has a need to restore the database data from that initial moment. Therefore, in the third moment, the user terminal can respond to the user's triggered operation by sending an undo command to the server. Subsequently, the server can receive the data undo command from the user terminal.
[0070] S502: In response to the undo command, the server undoes the operations performed on the database within the first time period based on the data and DML statement set in the database at the third time period, so as to obtain the database at the second time period.
[0071] Since the database data from the last backup was backed up at the beginning of the first time period, and the DML statement set is a series of operations performed on the database within the first time period that indicate undo operations, the operations performed on the database within the first time period can be undone based on the database data at the third time period and the DML statement set, thus obtaining the database at the second time period.
[0072] Please see Figure 7This application also provides a DML statement recording device 600. It should be noted that the basic principle and technical effects of the DML statement recording device 600 provided in this application are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this application can be referred to the corresponding content in the above embodiments. Specifically, the DML statement recording device 600 includes an instruction receiving unit 601, a log acquisition unit 602, a statement generation unit 603, and a statement recording unit 604, wherein...
[0073] The instruction receiving unit 601 is used to receive data operation DML statement generation instructions from the user terminal at the first moment.
[0074] The log acquisition unit 602 is used to acquire database operation logs generated within a first time period from a specified storage path.
[0075] The first duration is the interval between the second moment of the last database backup and the first moment.
[0076] The database operation log includes the full page data before the first operation on the target page of the database within the first time period, the data corresponding to the fields operated on after each operation, the operation type of each operation, and the table structure information of the target page.
[0077] In one possible implementation, the operation type is a delete operation, an update operation, or an add operation.
[0078] The statement generation unit 603 is used to generate DML statements corresponding to each operation based on the full page data, the data corresponding to the fields operated on after each operation, the operation type, and the table structure information of the target page.
[0079] Specifically, the statement generation unit 603 is used to determine the preceding image data corresponding to the operated field before the Nth operation from the full page data before the Nth operation. Here, N is a positive integer. When N is greater than 1, the full page data before the Nth operation is generated based on the full page data before the (N-1)th operation and the DML statement corresponding to the (N-1)th operation. The server determines the DML statement corresponding to the Nth operation based on the preceding image data corresponding to the operated field before the Nth operation, the following image data corresponding to the operated field after the Nth operation, the operation type of the Nth operation, and the table structure information of the target page.
[0080] Statement recording unit 604 is used to record the set of DML statements.
[0081] In one possible implementation, the apparatus 600 provided in this application further includes: a data recording unit, configured to record, in a specified storage path, all page data prior to the first operation on the target page of the database when an operation instruction for the target page of the database is first received within a first time period.
[0082] In one possible implementation, the data recording unit is further configured to record, in a specified storage path, the data corresponding to the operated field, the operation type, and the table structure information of the target page each time an operation is performed on the database within the first time period.
[0083] In one possible implementation, DML statements are operation statements used to instruct data restoration. For example... Figure 8 As shown, the apparatus 600 provided in this application embodiment further includes: a data receiving unit 701, which is further configured to receive a data restoration command from a user terminal at a third time after the first time. A data restoration unit 702 is configured to, in response to the data restoration command, restore the database at the first time based on the data from the previously backed-up database and the set of DML statements.
[0084] In one possible implementation, such as Figure 9 As shown, DML statements are operation statements used to indicate undo operations. The apparatus 600 provided in this application embodiment further includes: a data receiving unit 801, used to receive an undo command from a user terminal at a third time after the first time; and a data undo unit 802, used to, in response to the undo command, undo the operations on the database within the first time period based on the data of the database at the third time and the set of DML statements, so as to obtain the database at the second time.
[0085] This application also provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the server to perform the method provided in the above embodiments of this application.
[0086] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the computer to perform the method provided in the above embodiments of this application.
[0087] This application also provides a computer program product, including a computer program that, when run, causes a computer to perform the methods provided in the above embodiments.
[0088] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method of recording DML statements, characterized by, The method comprises: The server receives a data operation DML statement generation instruction from a user terminal at a first time; The server obtains database operation logs generated within a first time duration from a specified storage path, wherein the first time duration is an interval between a second time when data of a database is last backed up and the first time; the database operation logs comprise full page data before a target page of the database is operated for the first time within the first time duration, post-image data corresponding to fields operated after each operation, operation types of each operation, and table structure information of the target page; The server generates the DML statement corresponding to each operation according to the full page data, the post-image data corresponding to the field operated after each operation, the operation type of each operation, and the table structure information of the target page, comprising: the server determines the pre-image data corresponding to the field operated before the Nth operation from the full page data before the Nth operation, wherein N is a positive integer, and when N is greater than 1, the full page data before the Nth operation is generated according to the full page data before the (N-1)th operation and the DML statement corresponding to the (N-1)th operation; The server determines the pre-image data corresponding to the field operated before the Nth operation from the full page data before the Nth operation, wherein N is a positive integer, and when N is greater than 1, the full page data before the Nth operation is generated according to the full page data before the (N-1)th operation and the DML statement corresponding to the (N-1)th operation; The server determines the pre-image data corresponding to the field operated before the Nth operation from the full page data before the Nth operation, wherein N is a positive integer, and when N is greater than 1, the full page data before the Nth operation is generated according to the full page data before the (N-1)th operation and the DML statement corresponding to the (N-1)th operation; The server records a DML statement set to perform corresponding operation processing.
2. The method of claim 1, wherein, Before the server receives a data operation DML statement recovery instruction from a user terminal at a first time, the method further comprises: When the server receives an operation instruction for the target page of the database for the first time within the first time duration, the server records full page data before the target page of the database is operated for the first time in the specified storage path.
3. The method of claim 1, wherein, Before the server receives a data operation DML statement recovery instruction from a user terminal at a first time, the method further comprises: When the server performs an operation on the database each time within the first time duration, the server records data corresponding to fields after the operation, operation types, and table structure information of the target page in the specified storage path.
4. The method of claim 1, wherein, The DML statement is an operation statement for indicating data restoration, and after the server records the DML statement set, the method further comprises: The server receives a data restoration instruction from the user terminal at a third time after the first time; The server restores the database at the first time according to data of a database last backed up and the DML statement set in response to the data restoration instruction.
5. The method of claim 1, wherein, The DML statement is an operation statement for indicating a cancellation operation, and after the server records the DML statement set, the method further comprises: The server receives a cancellation instruction from the user terminal at a third time after the first time; The server cancels operations on the database within the first time duration according to data of the database at the third time and the DML statement set in response to the cancellation instruction, to obtain the database at the second time.
6. The method according to any one of claims 1 to 5, characterized in that, The operation type is a deletion operation, an update operation, or an addition operation.
7. A DML statement logging apparatus characterized by comprising: The apparatus comprises: An instruction receiving unit configured to cause a server to receive a data operation DML statement generation instruction from a user terminal at a first time; A log obtaining unit configured to cause the server to obtain database operation logs generated within a first time duration from a specified storage path, wherein the first time duration is an interval between a second time when data of a database is last backed up and the first time; the database operation logs comprise full page data before a target page of the database is operated for the first time within the first time duration, data corresponding to fields operated after each operation, operation types of each operation, and table structure information of the target page; and The sentence generation unit is configured to generate a DML sentence corresponding to each operation according to full-page data, data corresponding to a field operated after each operation, an operation type of each operation, and table structure information of the target page, including: determining, by the server, pre-image data corresponding to a field operated before the Nth operation from full-page data before the Nth operation, where N is a positive integer, and when N is greater than 1, the full-page data before the Nth operation is generated according to full-page data before the (N-1)th operation and a DML sentence corresponding to the (N-1)th operation ; determining, by the server, a DML sentence corresponding to the Nth operation according to the pre-image data corresponding to the field operated before the Nth operation, post-image data corresponding to the field operated after the Nth operation, the operation type of the Nth operation, and the table structure information of the target page. A statement recording unit, configured to record a set of DML statements by the server.
8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor, so that the server executes the method in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor, so that the computer executes the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for data synchronization of relational heterogeneous databases
CN103761318A
System and method for improving the efficiency, comfort, and / or reliability in Operating Systems, such as for example Windows.
US20050240756A1