CN103544323A - Data updating method and device - Google Patents
Data updating method and device Download PDFInfo
- Publication number
- CN103544323A CN103544323A CN201310553302.7A CN201310553302A CN103544323A CN 103544323 A CN103544323 A CN 103544323A CN 201310553302 A CN201310553302 A CN 201310553302A CN 103544323 A CN103544323 A CN 103544323A
- Authority
- CN
- China
- Prior art keywords
- data
- major key
- field
- configuration information
- aiming field
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2358—Change logging, detection, and notification
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
An embodiment of the invention discloses a data updating method and device. The data updating method comprises storing configuration information which comprises data tables which involves updating operations and names of source fields and aiming fields and primary key information which comprises names and types of primary key fields to which the source fields and the aiming fields in the configuration information belong in advance; finding data tables having same names with the data tables in the configuration information; finding records having same names with the source fields in the configuration information and having same values with aiming values of the source fields, identifying primary key fields in the records according to names of the primary key fields in the primary key information and setting up primary key conditions according to values of the primary key fields and types of the primary key fields in the primary key information; automatically generating into updating statements according to names of the data tables and aiming fields in the configuration information, aiming field updating values and the primary key conditions and performing updating operations. The data updating method can automatically achieve data updating.
Description
Technical field
The present invention relates to database field, particularly relate to a kind of data-updating method and device.
Background technology
Database be according to data structure organize, the warehouse of store and management data, be the set of the related data that is stored together.Database includes number of different types, and relevant database is one of type of wherein relatively commonly using.At present, the relevant database of main flow has Oracle, DB2 and SYBASE etc.SQL(Structured Query Language) be a kind of language that relevant database is operated, by SQL, can realize and relevant database is carried out to data increase, data deletion, Data Update and data query operate.
In the process of infosystem operation, due to the change of interconnected system or the reasons such as change of native system, there is such demand: the record that is 1 for the value of source entity key element A in some data entity, need to be updated to 3 from 2 by the value of target entity key element B in this record.So-called " data entity " is the tables of data of organizing and storing data in relevant database, and so-called " entity key element " is certain field in tables of data.Wherein, source entity key element A(also can be called " source field A ") and target entity key element B(also can be called " aiming field B ") can be same field, also can be different fields, and source entity key element A and target entity key element B exist in a plurality of data entities simultaneously.For example, in credit operation, because change has occurred for client Zhang San's pipe family manager, pipe family manager corresponding to client Zhang San (being equivalent to " value of source entity key element A is 1 ") need to be updated to king five (being equivalent to " value of target entity key element B is updated to 3 from 2 ") from Li Si.
For the infosystem of more complicated, the complexity of Data Update operation also increases thereupon, and the difficult problem mainly facing is the change of Data Update scene and the change of the Data Update scope in Data Update scene.So-called " Data Update scene " is: in a plurality of data entities, source entity key element A and target entity key element B exist simultaneously, according to the particular value of source entity key element A, realize the value of target entity key element B is upgraded, this (A, B) entity key element constitute a Data Update scene.And so-called " the Data Update scope in Data Update scene " is: all data entities that are applicable to this Data Update scene.
In realizing process of the present invention, the present inventor finds, at present, programming personnel can only be for fixing Data Update scene, and fixing Data Update scope writes date update program, thereby realizes Data Update operation.Once the change of Data Update scene (as, increase Data Update scene), or, Data Update scope change in some Data Update scenes (as, increase the Data Update scope in Data Update scene), programming personnel just need to pay extra work amount and working time and again write date update program, thereby is unfavorable for realizing the renewal to data when Data Update scene and the change of Data Update scope.
Summary of the invention
In order to solve the problems of the technologies described above, the embodiment of the present invention provides a kind of data-updating method and device, automatically according to configuration information and major key information realization Data Update, reduce programming personnel's workload and working time, thereby be conducive to realize the renewal to data when Data Update scene and the change of Data Update scope.
The embodiment of the invention discloses following technical scheme:
A kind of data-updating method, the pre-stored configuration information having arranged and major key information, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field; Described method comprises:
In response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
From described target matrix, lookup names is identical with the title of source field in described configuration information, and the numerical value record identical with source field desired value in described Data Update request is as target record;
According to the title of the major key field in described major key information, identify the major key field in described target record, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
Aiming field renewal value in tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement;
According to the described Data Update statement executing data of automatic generation, upgrade operation.
Preferably, before the title of the tables of data based in described configuration information and aiming field, aiming field renewal value in described Data Update request and described major key condition automatically generated data upgrade statement, described method also comprises:
Generate and carry out according to record sheet, described execution at least comprises described configuration information, described major key information and described major key condition according to record sheet.
Further preferred, described method also comprises:
Show that described execution is according to record sheet, so that prompting user is confirmed whether according to described execution according to the information and executing Data Update operation of recording in record sheet;
Tables of data based in described configuration information and the title of aiming field, the aiming field renewal value in described Data Update request and described major key condition automatically generated data upgrade statement and are specially:
In response to user's confirmation operation, the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement.
Preferably, described method also comprises:
Monitor data upgrades the executing state of operation, and feeds back monitored results.
Preferably, described method also comprises:
In response to flow process rollback request, according to the title of the aiming field in described configuration information, identify the aiming field in described target record, using the value of described aiming field as aiming field original value;
Tables of data based in described configuration information and the title of aiming field, described aiming field original value and the automatic product process rollback of described major key condition statement;
According to the described flow process rollback flow of statement execution rolling back action of automatic generation.
Further preferred, described method also comprises:
The executing state of monitoring flow process rolling back action, and feed back monitored results.
, comprising:
Storage unit, for the pre-stored configuration information having arranged and major key information, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field;
Tables of data is searched unit, be used in response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
Target record is searched unit, and for identical with the title of source field described configuration information from described target matrix lookup names, and the numerical value record identical with source field desired value in described Data Update request is as target record;
Major key condition is set up unit, and for identifying the major key field in described target record according to the title of the major key field of described major key information, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
Upgrade statement generation unit, for the title of the tables of data based on described configuration information and aiming field, aiming field renewal value and described major key condition automatically generated data in described Data Update request, upgrade statement;
Data updating unit, for upgrading operation according to the described Data Update statement executing data automatically generating.
Preferably, described device also comprises:
Execution is according to record sheet generation unit, before title, the aiming field renewal value in described Data Update request and described major key condition automatically generated data renewal statement for the tables of data based on described configuration information and aiming field at described renewal statement generation unit, generate and carry out according to record sheet, described execution at least comprises described configuration information, described major key information and described major key condition according to record sheet.
Further preferred, described device also comprises:
Execution is according to record sheet display unit, for showing that described execution is according to record sheet, so that prompting user is confirmed whether according to described execution according to the information and executing Data Update operation of recording in record sheet;
Described renewal statement generation unit specifically for, in response to user's confirmation operation, the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement.
Preferably, described device also comprises:
Data Update monitoring unit, upgrades the executing state of operation, and feeds back monitored results for monitor data.
Preferably, described device also comprises:
Aiming field original value is recorded unit, in response to flow process rollback request, according to the title of the aiming field in described configuration information, identifies the aiming field in described target record, using the value of described aiming field as aiming field original value;
Flow process rollback statement generation unit, for the title of the tables of data based on described configuration information and aiming field, described aiming field original value and the automatic product process rollback of described major key condition statement;
Flow process rollback unit, the described flow process rollback flow of statement execution rolling back action automatically generating for basis.
Further preferred, described device also comprises:
Flow process rollback monitoring unit, for monitoring the executing state of flow process rolling back action, and feeds back monitored results.
As can be seen from the above-described embodiment, compared with prior art, the invention has the advantages that:
Content based in this configuration information and major key information, and, source field desired value and aiming field renewal by user's typing in Data Update request are worth, can be in the situation that participating in without programming personnel, automatically generated data upgrades statement, and upgrades operation according to this Data Update statement executing data.The in the situation that of Data Update scene or the change of Data Update scope, only need the content of change configuration information and major key information, can realize the more more Data Update operation under new range of new scene or new data of new data.Reduce programming personnel's workload and working time, thereby be conducive to realize the renewal to data when Data Update scene and the change of Data Update scope.
In addition, also supported flow process rolling back action.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the process flow diagram of an embodiment of a kind of data-updating method of the present invention;
Fig. 2 is the process flow diagram of another embodiment of a kind of data-updating method of the present invention;
Fig. 3 is the process flow diagram of another embodiment of a kind of data-updating method of the present invention;
Fig. 4 is the structural drawing of an embodiment of a kind of data update apparatus of the present invention;
Fig. 5 is the structural drawing of another embodiment of a kind of data update apparatus of the present invention;
Fig. 6 is the structural drawing of another embodiment of a kind of data update apparatus of the present invention;
Fig. 7 is the structural drawing of another embodiment of a kind of data update apparatus of the present invention.
Embodiment
The embodiment of the present invention provides a kind of data-updating method and device.The key of technical solution of the present invention is, sets in advance configuration information and major key information, wherein, in this configuration information, include Data Update operation for tables of data, source field and aiming field title.In this major key information, include title and the type of the major key field under source resource in this configuration information and aiming field.Content based in this configuration information and major key information, and, source field desired value and aiming field renewal by user's typing in Data Update request are worth, can be in the situation that participating in without programming personnel, automatically generated data upgrades statement, and upgrades operation according to this Data Update statement executing data.The in the situation that of Data Update scene or the change of Data Update scope, only need the content of change configuration information and major key information, can realize the more more Data Update operation under new range of new scene or new data of new data.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
Refer to Fig. 1, the process flow diagram of its embodiment who is a kind of data-updating method of the present invention, the method comprises the following steps:
Step 100: the pre-stored configuration information having arranged and major key information;
Wherein, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field.
According to the established data Data Update scope in new scene and scene more, configuration information and major key information are set.If the change of Data Update scene, or the Data Update scope change in scene, just need to revise configuration information and major key information.In addition, configuration information and major key information can be safeguarded with the form of tables of data.
Suppose to have two Data Update scenes, scene 1 is: in credit operation, change has occurred client Zhang's pipe family manager, and client Zhang's pipe family manager is updated to Wang from Lee, and the Data Update scope under scene 1 is that tables of data 1(name is called Table1).Scene 2 is: in credit operation, change has occurred in client Zhao's Guan Hu mechanism, and client Zhao's Guan Hu mechanism is updated to B mechanism from A mechanism, and the Data Update scope under scene 2 is that tables of data 2(name is called Table2).
Based on above-mentioned supposed situation, the configuration information of setting is as shown in the table:
The classification of Data Update scene | The title of tables of data | The title of source field | The title of aiming field |
01 | Table1 | Client | Pipe family manager |
02 | Table2 | Client | Guan Hu mechanism |
Based on above-mentioned supposed situation, the major key information of setting is as shown in the table:
Step 101: in response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
When user initiates a data update request, first by user's logging data classification of new scene more, if the classification of the Data Update scene of user's typing is 01, what illustrate that user wishes to upgrade is that client's pipe family is handled.Then, then be worth by user's typing source field desired value and aiming field renewal, as, source field desired value is Zhang, aiming field renewal value is Wang.
For example, the information based on user's typing, can generate respectively application process table and application detail list for user's inquiry, and application process table is:
Application process ID | The classification of Data Update scene | Applicant | Application organization |
****** | 01 | * | * branch |
****** | 02 | * | * branch |
Application detail list is:
Application process ID | The classification of Data Update scene | Source field desired value | Aiming field renewal value |
****** | 01 | Zhang | Lee |
****** | 02 | Zhao | B |
Generate after application process table and application detail list, these two tables can also be submitted to approver, by approver, according to content in table, examined, if examine by, response data update request, does not pass through if examined, not response data update request.
When response data update request, from configuration information, extract the title of tables of data, that is, and Table1 and Table2, and lookup names is that the tables of data of Table1 and Table2 is as target matrix.
Suppose, after searching, name is called the part record following (for convenience of description, only having shown the partial content in tables of data 1 below) of the tables of data 1 of Table1:
Key_1 | Client | Pipe family manager |
Zhujianzhi_1 | Zhang | Lee |
Zhujianzhi_2 | Week certain | Lee |
Zhujianzhi_3 | Wu | Lee |
Step 102: lookup names is identical with the title of source field in described configuration information from described target matrix, and the numerical value record identical with source field desired value in described Data Update request is as target record;
The above-mentioned tables of data 1 of take is example, searches field name for client from tables of data 1, and the record that field value is Zhang is as target record, and through searching, target record is article one record in tables of data 1.
Step 103: identify the major key field in described target record according to the title of the major key field in described major key information, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
According to the title of the major key field in major key information (, Key_1) major key field in identification target record, then the value based on major key field (, the type of the major key field Zhujianzhi_1) and in major key information (that is, character type) is set up major key condition: where Key_1=' Zhujianzhi_1 '.
Step 104: the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement;
Tables of data based in configuration information and the title of aiming field are (, Table1 and pipe family manager), the aiming field renewal value in Data Update request (, Wang) and major key condition (that is, where Key_1=' Zhujianzhi_1 '), automatically generate a Data Update statement:
Update Table1set manages family manager=' Wang ' where Key_1=' Zhujianzhi_1 '
Step 105: upgrade operation according to the described Data Update statement executing data of automatic generation.
Carry out after above-mentioned Data Update statement, tables of data 1 is updated to:
Key_1 | Client | Pipe family manager |
Zhujianzhi_1 | Zhang | Wang |
Zhujianzhi_2 | Week certain | Lee |
Zhujianzhi_3 | Wu | Lee |
In addition, can also upgrade the executing state of operation by monitor data, and feed back monitored results.
For example, monitored results can be recorded in application process table for user's inquiry.
Application process ID | The classification of Data Update scene | Applicant | Application organization | Mode of operation |
****** | 01 | * | * branch | Data Update completes |
****** | 02 | * | * branch | Wait to examine |
As can be seen from the above-described embodiment, compared with prior art, the invention has the advantages that:
Content based in this configuration information and major key information, and, source field desired value and aiming field renewal by user's typing in Data Update request are worth, can be in the situation that participating in without programming personnel, automatically generated data upgrades statement, and upgrades operation according to this Data Update statement executing data.The in the situation that of Data Update scene or the change of Data Update scope, only need the content of change configuration information and major key information, can realize the more more Data Update operation under new range of new scene or new data of new data.Reduce programming personnel's workload and working time, thereby be conducive to realize the renewal to data when Data Update scene and the change of Data Update scope.
The difference of the present embodiment and first embodiment is, in Data Update operating process, increase the link of user intervention,, before generated data upgrades statement, the execution that first generation comprises configuration information, major key information and major key condition is according to record sheet, and be shown to user, by user, according to this execution, according to record sheet, be confirmed whether that executing data upgrades operation.
Refer to Fig. 2, the process flow diagram of its another embodiment that is a kind of data-updating method of the present invention, the method comprises the following steps:
Step 200: the pre-stored configuration information having arranged and major key information, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field;
Step 201: in response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
Step 202: lookup names is identical with the title of source field in described configuration information from described target matrix, and the numerical value record identical with source field desired value in described Data Update request is as target record;
Step 203: identify the major key field in described target record according to the title of the major key field in described major key information, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
Step 204: generate and carry out according to record sheet, described execution at least comprises described configuration information, described major key information and described major key condition according to record sheet;
For example, the execution generating according to the scene 1 of hypothesis in embodiment mono-according to record sheet is:
Field name | Executive logging 1 |
Execution is according to ID | ****** |
Application process ID | ****** |
The classification of Data Update scene | 01 |
The title of tables of data | Table1 |
Major key condition | where?Key_1=‘Zhujianzhi_1’ |
The title of source field | Client |
Source field desired value | Zhang |
The title of aiming field | Pipe family manager |
Aiming field original value | Lee |
Aiming field renewal value | Wang |
Step 205: in response to user's confirmation operation, the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement;
Step 206: upgrade operation according to the described Data Update statement executing data of automatic generation.
Above-mentioned steps 200-203, and the implementation of step 205-206 can be referring to the step 100-105 in embodiment mono-, the present embodiment repeats no more.
As can be seen from the above-described embodiment, compared with prior art, the invention has the advantages that:
Content based in this configuration information and major key information, and, source field desired value and aiming field renewal by user's typing in Data Update request are worth, can be in the situation that participating in without programming personnel, automatically generated data upgrades statement, and upgrades operation according to this Data Update statement executing data.The in the situation that of Data Update scene or the change of Data Update scope, only need the content of change configuration information and major key information, can realize the more more Data Update operation under new range of new scene or new data of new data.Reduce programming personnel's workload and working time, thereby be conducive to realize the renewal to data when Data Update scene and the change of Data Update scope.
The difference of the present embodiment and first embodiment is, except realizing Data Update operation, and can also realization flow rolling back action.
Refer to Fig. 3, the process flow diagram of its another embodiment that is a kind of data-updating method of the present invention, the method comprises the following steps:
Step 300: the pre-stored configuration information having arranged and major key information, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field;
Step 304a: the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement;
The implementation of above-mentioned steps 300-305a can be referring to the step 100-105 in embodiment mono-, and the present embodiment repeats no more.
For example, still take that to implement a Scene 1 be example, according to the aiming field in the title of the aiming field in configuration information (that is, pipe family manager) identification target record, by the value of aiming field (that is, Lee) as aiming field original value.
Tables of data based in configuration information and the title of aiming field are (, Table1 and pipe family manager), aiming field original value (, Lee) and major key condition (that is, where Key_1=' Zhujianzhi_1 '), automatically generate a flow process rollback statement:
Update Table1set manages family manager=' Lee ' where Key_1=' Zhujianzhi_1 '
It should be noted that, if generate to have when carrying out Data Update, carry out according to record sheet, as, execution in second embodiment is according to record sheet, tables of data in configuration information and the title of aiming field in this execution, have been recorded according to record sheet, aiming field original value and major key condition, therefore, a kind of preferred mode is, omit above-mentioned steps 301b and 302b, and be in response to flow process rollback request, directly from this execution according to extracting tables of data in configuration information and the title of aiming field record sheet, aiming field original value and major key condition, and product process rollback statement.Like this, can save the expense of backstage when carrying out flow process rollback.
Carry out after above-mentioned flow process rollback statement, tables of data 1 becomes again original value:
Key_1 | Client | Pipe family manager |
Zhujianzhi_1 | Zhang | Lee |
Zhujianzhi_2 | Week certain | Lee |
Zhujianzhi_3 | Wu | Lee |
In addition, can also monitor the executing state of flow process rolling back action, and feed back monitored results.
For example, monitored results can be recorded in application process table for user's inquiry.
Application process ID | The classification of Data Update scene | Applicant | Application organization | Mode of operation |
****** | 01 | * | * branch | Flow process rollback completes |
****** | 02 | * | * branch | Data Update completes |
As can be seen from the above-described embodiment, compared with prior art, the invention has the advantages that:
Content based in this configuration information and major key information, and, source field desired value and aiming field renewal by user's typing in Data Update request are worth, can be in the situation that participating in without programming personnel, automatically generated data upgrades statement, and upgrades operation according to this Data Update statement executing data.The in the situation that of Data Update scene or the change of Data Update scope, only need the content of change configuration information and major key information, can realize the more more Data Update operation under new range of new scene or new data of new data.Reduce programming personnel's workload and working time, thereby be conducive to realize the renewal to data when Data Update scene and the change of Data Update scope.
In addition, also supported flow process rolling back action.
Corresponding with above-mentioned a kind of data-updating method, the embodiment of the present invention also provides a kind of data update apparatus.Refer to Fig. 4, its structural drawing that is an embodiment of a kind of data update apparatus of the present invention, this device comprises: storage unit 401, tables of data search that unit 403 is searched in unit 402, target record, major key condition is set up unit 404, upgraded statement generation unit 405 and data updating unit 406.Principle of work below in conjunction with this device is further introduced its inner structure and annexation.
Tables of data is searched unit 402, be used in response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
Target record is searched unit 403, and for identical with the title of source field described configuration information from described target matrix lookup names, and the numerical value record identical with source field desired value in described Data Update request is as target record;
Major key condition is set up unit 404, and for identifying the major key field in described target record according to the title of the major key field of described major key information, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
Upgrade statement generation unit 405, for the title of the tables of data based on described configuration information and aiming field, aiming field renewal value and described major key condition automatically generated data in described Data Update request, upgrade statement;
Preferably, as shown in Figure 5, this device also comprises:
Execution is according to record sheet generation unit 407, before title, the aiming field renewal value in described Data Update request and described major key condition automatically generated data renewal statement for the tables of data based on described configuration information and aiming field at described renewal statement generation unit 405, generate and carry out according to record sheet, described execution at least comprises described configuration information, described major key information and described major key condition according to record sheet.
Further preferred, as shown in Figure 6, this device also comprises:
Execution is according to record sheet display unit 408, for showing that described execution is according to record sheet, so that prompting user is confirmed whether according to described execution according to the information and executing Data Update operation of recording in record sheet;
Described renewal statement generation unit 406 specifically for, in response to user's confirmation operation, the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement.
Preferably, this device also comprises: Data Update monitoring unit, upgrades the executing state of operation, and feeds back monitored results for monitor data.
Preferably, as shown in Figure 7, this device also comprises:
Aiming field original value is recorded unit 409, in response to flow process rollback request, according to the title of the aiming field in described configuration information, identifies the aiming field in described target record, using the value of described aiming field as aiming field original value;
Flow process rollback statement generation unit 410, for the title of the tables of data based on described configuration information and aiming field, described aiming field original value and the automatic product process rollback of described major key condition statement;
Flow process rollback unit 411, the described flow process rollback flow of statement execution rolling back action automatically generating for basis.
Further preferred, this device also comprises: flow process rollback monitoring unit, for monitoring the executing state of flow process rolling back action, and feeds back monitored results.
As can be seen from the above-described embodiment, compared with prior art, the invention has the advantages that:
Content based in this configuration information and major key information, and, source field desired value and aiming field renewal by user's typing in Data Update request are worth, can be in the situation that participating in without programming personnel, automatically generated data upgrades statement, and upgrades operation according to this Data Update statement executing data.The in the situation that of Data Update scene or the change of Data Update scope, only need the content of change configuration information and major key information, can realize the more more Data Update operation under new range of new scene or new data of new data.Reduce programming personnel's workload and working time, thereby be conducive to realize the renewal to data when Data Update scene and the change of Data Update scope.
In addition, also supported flow process rolling back action.
The technician in described field can be well understood to, and with succinct, the specific works process of the system of foregoing description, device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here for convenience of description.
In several embodiment provided by the present invention, should be understood that disclosed system, apparatus and method can realize by another way.For example, described above to device embodiment be only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can be in conjunction with being maybe integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrical, mechanical or other form.
The described unit as separating component explanation can or can be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and can adopt the form of SFU software functional unit to realize.
It should be noted that, one of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above a kind of data-updating method provided by the present invention and device are described in detail, applied specific embodiment herein principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.
Claims (12)
1. a data-updating method, it is characterized in that, the pre-stored configuration information having arranged and major key information, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field; Described method comprises:
In response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
From described target matrix, lookup names is identical with the title of source field in described configuration information, and the numerical value record identical with source field desired value in described Data Update request is as target record;
According to the title of the major key field in described major key information, identify the major key field in described target record, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
Aiming field renewal value in tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement;
According to the described Data Update statement executing data of automatic generation, upgrade operation.
2. method according to claim 1, it is characterized in that, before the title of the tables of data based in described configuration information and aiming field, aiming field renewal value in described Data Update request and described major key condition automatically generated data upgrade statement, described method also comprises:
Generate and carry out according to record sheet, described execution at least comprises described configuration information, described major key information and described major key condition according to record sheet.
3. method according to claim 2, is characterized in that, described method also comprises:
Show that described execution is according to record sheet, so that prompting user is confirmed whether according to described execution according to the information and executing Data Update operation of recording in record sheet;
Tables of data based in described configuration information and the title of aiming field, the aiming field renewal value in described Data Update request and described major key condition automatically generated data upgrade statement and are specially:
In response to user's confirmation operation, the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement.
4. according to the method described in any one in claims 1 to 3, it is characterized in that, described method also comprises:
Monitor data upgrades the executing state of operation, and feeds back monitored results.
5. method according to claim 1, is characterized in that, described method also comprises:
In response to flow process rollback request, according to the title of the aiming field in described configuration information, identify the aiming field in described target record, using the value of described aiming field as aiming field original value;
Tables of data based in described configuration information and the title of aiming field, described aiming field original value and the automatic product process rollback of described major key condition statement;
According to the described flow process rollback flow of statement execution rolling back action of automatic generation.
6. method according to claim 5, is characterized in that, described method also comprises:
The executing state of monitoring flow process rolling back action, and feed back monitored results.
7. a data update apparatus, is characterized in that, comprising:
Storage unit, for the pre-stored configuration information having arranged and major key information, described configuration information at least comprise Data Update operation institute for the title of tables of data, source field and aiming field, described major key information at least comprises title and the type of source field in described configuration information and the affiliated major key field of aiming field;
Tables of data is searched unit, be used in response to Data Update request, the lookup names tables of data identical with the title of tables of data in described configuration information, as target matrix, wherein, carries source field desired value and aiming field renewal value in described Data Update request;
Target record is searched unit, and for identical with the title of source field described configuration information from described target matrix lookup names, and the numerical value record identical with source field desired value in described Data Update request is as target record;
Major key condition is set up unit, and for identifying the major key field in described target record according to the title of the major key field of described major key information, the type of the major key field in the value based on described major key field and described major key information is set up major key condition;
Upgrade statement generation unit, for the title of the tables of data based on described configuration information and aiming field, aiming field renewal value and described major key condition automatically generated data in described Data Update request, upgrade statement;
Data updating unit, for upgrading operation according to the described Data Update statement executing data automatically generating.
8. device according to claim 7, is characterized in that, described device also comprises:
Execution is according to record sheet generation unit, before title, the aiming field renewal value in described Data Update request and described major key condition automatically generated data renewal statement for the tables of data based on described configuration information and aiming field at described renewal statement generation unit, generate and carry out according to record sheet, described execution at least comprises described configuration information, described major key information and described major key condition according to record sheet.
9. device according to claim 8, is characterized in that, described device also comprises:
Execution is according to record sheet display unit, for showing that described execution is according to record sheet, so that prompting user is confirmed whether according to described execution according to the information and executing Data Update operation of recording in record sheet;
Described renewal statement generation unit specifically for, in response to user's confirmation operation, the aiming field renewal value in the tables of data based in described configuration information and the title of aiming field, described Data Update request and described major key condition automatically generated data upgrade statement.
10. according to the device described in any one in claim 7 to 9, it is characterized in that, described device also comprises:
Data Update monitoring unit, upgrades the executing state of operation, and feeds back monitored results for monitor data.
11. devices according to claim 7, is characterized in that, described device also comprises:
Aiming field original value is recorded unit, in response to flow process rollback request, according to the title of the aiming field in described configuration information, identifies the aiming field in described target record, using the value of described aiming field as aiming field original value;
Flow process rollback statement generation unit, for the title of the tables of data based on described configuration information and aiming field, described aiming field original value and the automatic product process rollback of described major key condition statement;
Flow process rollback unit, the described flow process rollback flow of statement execution rolling back action automatically generating for basis.
12. devices according to claim 11, is characterized in that, described device also comprises:
Flow process rollback monitoring unit, for monitoring the executing state of flow process rolling back action, and feeds back monitored results.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310553302.7A CN103544323B (en) | 2013-11-08 | 2013-11-08 | A kind of data-updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310553302.7A CN103544323B (en) | 2013-11-08 | 2013-11-08 | A kind of data-updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103544323A true CN103544323A (en) | 2014-01-29 |
CN103544323B CN103544323B (en) | 2017-01-04 |
Family
ID=49967775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310553302.7A Active CN103544323B (en) | 2013-11-08 | 2013-11-08 | A kind of data-updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103544323B (en) |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021219A (en) * | 2014-06-23 | 2014-09-03 | 东莞市西奥计算机智能科技有限公司 | Method and device for generating data template |
CN104536871A (en) * | 2015-01-05 | 2015-04-22 | 中国农业银行股份有限公司 | Information stream display method and device |
CN105094907A (en) * | 2014-07-25 | 2015-11-25 | 沈阳美行科技有限公司 | Upgrading and loading methods and upgrading and loading devices for navigation data |
CN106168960A (en) * | 2016-06-30 | 2016-11-30 | 努比亚技术有限公司 | The adjusting apparatus of a kind of data resource and method of adjustment thereof |
CN106547795A (en) * | 2015-09-22 | 2017-03-29 | 北京国双科技有限公司 | Data-updating method and device |
CN107103035A (en) * | 2017-03-22 | 2017-08-29 | 福建榕基软件股份有限公司 | This earth's surface data-updating method and device |
CN107341253A (en) * | 2017-07-11 | 2017-11-10 | 深圳市信义科技有限公司 | A kind of method being updated according to data level to master data |
WO2018086264A1 (en) * | 2016-11-14 | 2018-05-17 | 平安科技(深圳)有限公司 | Method, device, and terminal for modifying information, and storage medium |
CN108228695A (en) * | 2017-06-30 | 2018-06-29 | 勤智数码科技股份有限公司 | A kind of dynamic real-time update method of business datum |
CN108629050A (en) * | 2018-05-16 | 2018-10-09 | 中国平安人寿保险股份有限公司 | Business datum method of adjustment, device, computer equipment and storage medium |
CN109857749A (en) * | 2018-12-30 | 2019-06-07 | 贝壳技术有限公司 | Method of data synchronization and device based on configuration data change record |
CN110019111A (en) * | 2017-08-15 | 2019-07-16 | 北京国双科技有限公司 | Data processing method, device, storage medium and processor |
CN110362629A (en) * | 2019-07-02 | 2019-10-22 | 北京字节跳动网络技术有限公司 | A kind of method, apparatus for guaranteeing data consistency, medium and electronic equipment |
CN110955671A (en) * | 2019-11-21 | 2020-04-03 | 北京天元创新科技有限公司 | Data updating processing method and device |
CN111078774A (en) * | 2019-12-05 | 2020-04-28 | 中国科学技术大学智慧城市研究院(芜湖) | Automatic data integration method |
CN112181995A (en) * | 2020-11-06 | 2021-01-05 | 深圳视界信息技术有限公司 | Data processing method, device and equipment of data table and storage medium |
CN112287216A (en) * | 2020-10-23 | 2021-01-29 | 微医云(杭州)控股有限公司 | Information pushing method and device, server and storage medium |
CN112540995A (en) * | 2020-11-11 | 2021-03-23 | 特劢丝软件科技(上海)有限公司 | Data updating method, electronic device and storage medium |
CN110019212B (en) * | 2017-11-29 | 2021-06-18 | 杭州海康威视数字技术股份有限公司 | Data processing method and device and database server |
CN113704257A (en) * | 2021-08-06 | 2021-11-26 | 网易(杭州)网络有限公司 | Data table updating method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101000615A (en) * | 2006-12-31 | 2007-07-18 | 华为技术有限公司 | Service processing method and device based on data base |
CN101021875A (en) * | 2007-03-22 | 2007-08-22 | 金蝶软件(中国)有限公司 | Object-oriented data bank access method and system |
CN102033948A (en) * | 2010-12-22 | 2011-04-27 | 中国农业银行股份有限公司 | Method and device for updating data |
US20120030258A1 (en) * | 2010-08-02 | 2012-02-02 | Oracle International Corporation | Effective Dating for Entity Attributes and Relationships |
-
2013
- 2013-11-08 CN CN201310553302.7A patent/CN103544323B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101000615A (en) * | 2006-12-31 | 2007-07-18 | 华为技术有限公司 | Service processing method and device based on data base |
CN101021875A (en) * | 2007-03-22 | 2007-08-22 | 金蝶软件(中国)有限公司 | Object-oriented data bank access method and system |
US20120030258A1 (en) * | 2010-08-02 | 2012-02-02 | Oracle International Corporation | Effective Dating for Entity Attributes and Relationships |
CN102033948A (en) * | 2010-12-22 | 2011-04-27 | 中国农业银行股份有限公司 | Method and device for updating data |
Cited By (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021219A (en) * | 2014-06-23 | 2014-09-03 | 东莞市西奥计算机智能科技有限公司 | Method and device for generating data template |
CN105094907A (en) * | 2014-07-25 | 2015-11-25 | 沈阳美行科技有限公司 | Upgrading and loading methods and upgrading and loading devices for navigation data |
CN104536871A (en) * | 2015-01-05 | 2015-04-22 | 中国农业银行股份有限公司 | Information stream display method and device |
CN104536871B (en) * | 2015-01-05 | 2017-06-30 | 中国农业银行股份有限公司 | A kind of information flow methods of exhibiting and device |
CN106547795A (en) * | 2015-09-22 | 2017-03-29 | 北京国双科技有限公司 | Data-updating method and device |
CN106168960A (en) * | 2016-06-30 | 2016-11-30 | 努比亚技术有限公司 | The adjusting apparatus of a kind of data resource and method of adjustment thereof |
CN106168960B (en) * | 2016-06-30 | 2019-06-18 | 努比亚技术有限公司 | A kind of the adjustment device and its method of adjustment of data resource |
WO2018086264A1 (en) * | 2016-11-14 | 2018-05-17 | 平安科技(深圳)有限公司 | Method, device, and terminal for modifying information, and storage medium |
CN107103035A (en) * | 2017-03-22 | 2017-08-29 | 福建榕基软件股份有限公司 | This earth's surface data-updating method and device |
CN107103035B (en) * | 2017-03-22 | 2020-04-10 | 福建榕基软件股份有限公司 | Local table data updating method and device |
CN108228695A (en) * | 2017-06-30 | 2018-06-29 | 勤智数码科技股份有限公司 | A kind of dynamic real-time update method of business datum |
CN107341253A (en) * | 2017-07-11 | 2017-11-10 | 深圳市信义科技有限公司 | A kind of method being updated according to data level to master data |
CN107341253B (en) * | 2017-07-11 | 2020-07-07 | 深圳市信义科技有限公司 | Method for updating main data according to data grade |
CN110019111A (en) * | 2017-08-15 | 2019-07-16 | 北京国双科技有限公司 | Data processing method, device, storage medium and processor |
CN110019212B (en) * | 2017-11-29 | 2021-06-18 | 杭州海康威视数字技术股份有限公司 | Data processing method and device and database server |
CN108629050A (en) * | 2018-05-16 | 2018-10-09 | 中国平安人寿保险股份有限公司 | Business datum method of adjustment, device, computer equipment and storage medium |
CN109857749A (en) * | 2018-12-30 | 2019-06-07 | 贝壳技术有限公司 | Method of data synchronization and device based on configuration data change record |
CN110362629A (en) * | 2019-07-02 | 2019-10-22 | 北京字节跳动网络技术有限公司 | A kind of method, apparatus for guaranteeing data consistency, medium and electronic equipment |
CN110955671A (en) * | 2019-11-21 | 2020-04-03 | 北京天元创新科技有限公司 | Data updating processing method and device |
CN111078774A (en) * | 2019-12-05 | 2020-04-28 | 中国科学技术大学智慧城市研究院(芜湖) | Automatic data integration method |
CN112287216A (en) * | 2020-10-23 | 2021-01-29 | 微医云(杭州)控股有限公司 | Information pushing method and device, server and storage medium |
CN112181995A (en) * | 2020-11-06 | 2021-01-05 | 深圳视界信息技术有限公司 | Data processing method, device and equipment of data table and storage medium |
CN112181995B (en) * | 2020-11-06 | 2023-08-29 | 深圳数阔信息技术有限公司 | Data processing method, device, equipment and storage medium of data table |
CN112540995A (en) * | 2020-11-11 | 2021-03-23 | 特劢丝软件科技(上海)有限公司 | Data updating method, electronic device and storage medium |
CN112540995B (en) * | 2020-11-11 | 2022-12-02 | 上海赛美特软件科技有限公司 | Data updating method, electronic device and storage medium |
CN113704257A (en) * | 2021-08-06 | 2021-11-26 | 网易(杭州)网络有限公司 | Data table updating method and device |
CN113704257B (en) * | 2021-08-06 | 2023-09-26 | 网易(杭州)网络有限公司 | Data table updating method and device |
Also Published As
Publication number | Publication date |
---|---|
CN103544323B (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103544323A (en) | Data updating method and device | |
US10671642B2 (en) | Copying data changes to a target database | |
US11397722B2 (en) | Applications of automated discovery of template patterns based on received requests | |
US7480643B2 (en) | System and method for migrating databases | |
EP2784665B1 (en) | Program and version control method | |
US7752165B2 (en) | Persistent query system for automatic on-demand data subscriptions from mobile devices | |
CN102651008B (en) | Method and equipment for organizing data records in relational data base | |
AU2003231837B2 (en) | High-performance change capture for data warehousing | |
US10585909B2 (en) | Task-execution in a DBMS using stored procedures | |
US8103624B2 (en) | Apparatus and method for automating the logging of table changes in a database | |
US8521711B2 (en) | Providing persistent refined intermediate results selected from dynamic iterative filtering | |
US20140095441A1 (en) | Archiving Data in Database Management Systems | |
CN103678556A (en) | Method for processing column-oriented database and processing equipment | |
US20060253483A1 (en) | Method and mechanism of materialized view mix incremental refresh | |
US9569485B2 (en) | Optimizing database query | |
US20140046928A1 (en) | Query plans with parameter markers in place of object identifiers | |
US10120768B2 (en) | Data management system and method for backup, recovery, and mount of time-series data | |
CN102819585A (en) | Method for controlling document of extensive makeup language (XML) database | |
US7716213B2 (en) | Apparatus, system, and method for efficiently supporting generic SQL data manipulation statements | |
US11853279B2 (en) | Data storage using vectors of vectors | |
US20170185604A1 (en) | Row-based archiving in database accelerators | |
JP2017027326A (en) | Storage system and program for the same | |
US20200004750A1 (en) | Transforming a user-defined table function to a derived table in a database management system | |
CN104731641A (en) | Method and system of replication of batch jobs of computing systems | |
US20210182115A1 (en) | Dependency handling for configuration transport |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |