CN106897340A - A kind of data table updating method and device - Google Patents
A kind of data table updating method and device Download PDFInfo
- Publication number
- CN106897340A CN106897340A CN201610525332.0A CN201610525332A CN106897340A CN 106897340 A CN106897340 A CN 106897340A CN 201610525332 A CN201610525332 A CN 201610525332A CN 106897340 A CN106897340 A CN 106897340A
- Authority
- CN
- China
- Prior art keywords
- data table
- field value
- field
- record
- raw data
- 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.)
- Pending
Links
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/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
-
- 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
Abstract
A kind of data table updating method of disclosure and device, when only needing to be updated the part field value in tables of data, save computing resource, reduce and waste.Methods described includes:Determine to need the field value of renewal in raw data table, and the field value is updated;Record corresponding with the field value is obtained from the raw data table, and the record is updated according to the field value after renewal, generate temporary data table;According to the temporary data table, the raw data table is updated.
Description
Technical field
The application is related to field of computer technology, more particularly to a kind of data table updating method and device.
Background technology
With the development of computer and Internet technology, each corner in production and living can " data " form
Represent, and as the big data epoch arrive, the data volume for producing all the time is in geometric growth, so calculating energy to computer
The requirement of power is only increased, and so-called Distributed Calculation can realize one to need what very huge computing capability could be solved
Problem is divided into many small parts, distributes to many computers and is processed, and finally respective result of calculation is integrated and is obtained
Final result.Distributed Computing Platform is generally realized more advantageously managing data, use as shown in table 1 below using tables of data
Family information data table, wherein comprising some basic concepts,
Account | Name | Sex | Birthday | Age | Grade | …… |
0001 | Zhang San | Man | 1990/3/19 | 26 | 9 | …… |
0002 | Li Si | Female | 1992/11/4 | 23 | 10 | …… |
0003 | King five | Man | 1991/7/22 | 24 | 5 | …… |
0004 | Zhao six | Female | 1992/6/30 | 24 | 7 | …… |
…… | …… | …… | …… | …… | …… | …… |
Table 1
It is referred to as a record in tables of data per a line, each record includes all data in this line;Wrapped in tables of data
Containing some fields, each field can represent certain attribute, such as " name ", " sex ", " birthday ", " age ", " grade " are
It is field, and some field values of correspondence;Major key (primary key, also known as primary keyword) is one or more words in table
Section, the record that corresponding key assignments is used in unique mark table, such as " account " can serve as major key, and in tables of data only
One, key assignments " 0001 " identifies this record such as " Zhang San ", " man ", " 1990/3/19 ", " 26 ", " 9 " in table.In certain situation
Down, it is necessary to be updated to field value in tables of data, such as " age ", " grade (account grade) ", as the date changes and waits
Level lifting is reduced, it is necessary to which the corresponding field value of field is updated.
When prior art is updated to field value in tables of data, generally whole fields are updated, that is, such as Fig. 1
It is shown, (or calculating) is redefined to the whole field values in every record updating the need in tables of data, to introduce above
As a example by " user profile ", when needing to be updated " age " field value, according to the way of prior art, can be by all fields
Value is redefined (obtain account, name, sex, calculating age etc.) according to whole.
If only needing to be updated the part field in tables of data, can only also be carried out according to the mode of prior art,
This obviously wastes computing resource.So at present in Distributed Computing Platform, if there is the part only needed in tables of data
Field value is updated, then can due to can only to tables of data in whole field values redefine, and cause computing resource waste
Problem.
The content of the invention
The embodiment of the present application provides a kind of data table updating method, is only needing to carry out more the part field value in tables of data
When new, computing resource is saved, reduce and waste.
The embodiment of the present application provides a kind of tables of data updating device, is only needing to carry out more the part field value in tables of data
When new, computing resource is saved, reduce and waste.
The embodiment of the present application uses following technical proposals:
A kind of data table updating method, including:
Determine to need the field value of renewal in raw data table, and the field value is updated;
Record corresponding with the field value is obtained from the raw data table, and according to the field value after renewal to institute
State record to be updated, generate temporary data table;
According to the temporary data table, the raw data table is updated.
Preferably, determine to need the field value of renewal in raw data table, and the field value is updated, including:
According to the field and the corresponding key assignments of major key that need to update in raw data table, it is determined that needing the field for updating
Value;
According to the determination method of the field corresponding field value, key assignments field value corresponding with the field is carried out
Update.
Preferably, record corresponding with the field value is obtained from the raw data table, including:
According to the key assignments, corresponding record is obtained from the raw data table.
Preferably, record corresponding with the field value is obtained from the raw data table, and according to the word after renewal
Segment value is updated to the record, generates temporary data table, including:
Record corresponding with the field value and corresponding partition value are obtained from the raw data table;
The record is updated according to the field value after renewal, temporary data table of the generation comprising partition value.
Preferably, record corresponding with the field value is obtained from the raw data table, including:
Obtain corresponding with the field value and not comprising the record of the field value from the raw data table.
Preferably, the field for needing in raw data table to update is determined, including:
Determine to need in raw data table the field of addition.
A kind of tables of data updating device, including:First updating block, temporary data table generation unit and second update single
Unit, wherein,
First updating block, determines to need the field value of renewal in raw data table, and carry out the field value
Update;
The temporary data table generation unit, obtains record corresponding with the field value from the raw data table,
And the record is updated according to the field value after renewal, generate temporary data table;
Second updating block, according to the temporary data table, is updated to the raw data table.
Preferably, the first updating block,
According to the field and the corresponding key assignments of major key that need to update in raw data table, it is determined that needing the field for updating
Value;
According to the determination method of the field corresponding field value, key assignments field value corresponding with the field is carried out
Update.
Preferably, the temporary data table generation unit,
According to the key assignments, corresponding record is obtained from the raw data table.
Preferably, the temporary data table generation unit,
Record corresponding with the field value and corresponding partition value are obtained from the raw data table;
The record is updated according to the field value after renewal, temporary data table of the generation comprising partition value.
Preferably, the temporary data table generation unit,
Obtain corresponding with the field value and not comprising the record of the field value from the raw data table.
Preferably, first updating block,
Determine to need in raw data table the field of addition.
Above-mentioned at least one technical scheme that the embodiment of the present application is used can reach following beneficial effect:When needing logarithm
When being updated according to the part field value in table, the field value for needing to update is determined in raw data table, and to field value
It is updated, record corresponding with the field value for needing to update is obtained from raw data table, and according to the field value after renewal
The record is updated, temporary data table is generated, corresponding part in raw data table is carried out more by temporary data table
Newly.All records can only be updated and be covered compared to prior art, part of the embodiment of the present application only to needing to update is carried out
Update, and generate the temporary data table only comprising the record for updating field value, then go to cover raw data table, saved calculating money
Source, reduces the waste to computing resource.
Brief description of the drawings
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes the part of the application, this Shen
Schematic description and description please does not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
The schematic diagram of the data table updating method that Fig. 1 is provided for prior art
Fig. 2 is the schematic flow sheet of the data table updating method that the embodiment of the present application 1 is provided;
Fig. 3 is the schematic diagram of the data table updating method that the embodiment of the present application 1 is provided;
Fig. 4 is the structure chart of the tables of data updating device that the embodiment of the present application 2 is provided.
Specific embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and
Corresponding accompanying drawing is clearly and completely described to technical scheme.Obviously, described embodiment is only the application one
Section Example, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under the premise of creative work, belong to the scope of the application protection.
Below in conjunction with accompanying drawing, the technical scheme that each embodiment of the application is provided is described in detail.
Embodiment 1
As it was previously stated, prior art is when field value is updated in Distributed Computing Platform to tables of data, it will usually
Whole fields are updated, such as Hadoop (software frame that distributed treatment can be carried out to mass data), and
ODPS (big data calculates service, a kind of quick, complete trustship TB/PB DBMSs warehouse solution), may be incorporated for branch
Support Distributed Computing Platform, wherein, only insert overwrite sentences can be used for covering the record for having existed.Than
It is updated if desired for table 1, then corresponding each key assignments of major key " account " that will be updated as needed, is determined respectively every
Bar record in each field value and cover raw data table, for example obtain user filled in account " name ", " sex ",
" birthday " and determine " age " and " grade ".But if only needing to be updated part field value, also can only be complete
Portion updates, such as, for business demand, it is only necessary to which " age " field is updated in account " 0003 " and " 0004 ", also only
The whole field values in account " 0003 " and " 0004 " can be updated according to prior art, due to data in actual applications
Amount is often very huge, so will result in serious waste computing resource.So this defect is based on, this application provides a kind of number
According to table updating method, when only needing to be updated the part field value in tables of data, computing resource is saved, reduce and waste.Should
The schematic flow sheet of method as shown in Figures 2 and 3, comprises the steps:
Step 11:Determine to need the field value of renewal in raw data table, and the field value is updated.
By the agency of, comprising field value is included under some fields, and each field in tables of data, works as field value above
When needing to update for business demand, it is necessary to first determine the field value for needing to update.The operation of determination can be business people
Member is triggered, or is triggered by predeterminable event;Such as business personnel can on every Sundays trigger and once update account grade
Operation, then after business personnel on every Sundays triggers, it is possible to determine that it is " etc. that the field value for updating is needed in raw data table
The all field values included under level " field;The event of once renewal " age " field is and for example triggered every day by presetting, every
After one day triggers the time, determine that it is all words included under " age " field that the field value for updating is needed in raw data table
Segment value.
Can be all field values, or part field value included under the field when determining field value, such as may be used
The all field values included under with the field value of determination " sex " field as " female " corresponding " grade " field are to need what is updated
Field value.
By the agency of above, major key can be one or more fields in table, and corresponding key assignments is used for unique mark
Record in table, it is possible to the field value for needing to update come " positioning " by the key assignments of major key.In one embodiment, originally
Step can include:According to the field and the corresponding key assignments of major key that need to update in raw data table, it is determined that needing what is updated
Field value.
Specifically, the field for needing to update in raw data table can be first determined, major key is then looked up, and determine to needing
The key assignments to be updated, finally according to field, and key assignments, orients the field value for needing to update, such as, as shown in table 2 below,
Account | Name | Sex | Birthday | Age | Grade | …… |
0001 | Zhang San | Man | 1990/3/19 | 26 | 9 | …… |
0002 | Li Si | Female | 1992/11/4 | 23 | 10 | …… |
0003 | King five | Man | 1991/7/22 | 24 | 5 | …… |
0004 | Zhao six | Female | 1992/6/30 | 24 | 7 | …… |
…… | …… | …… | …… | …… | …… | …… |
Table 2
, it is necessary to the field for updating is " grade ", it is necessary to update the corresponding key assignments of major key for " 0003 " in raw data table
The account of " 0004 ", then be assured that out that the field value that needs update is the dash area in " 5 " and " 7 ", i.e. table 2.
In actual applications, except changing the field value for having existed, it is also possible to occur adding certain (several) field
Demand, such as on the basis of table 2, add " online hours " field, the online hours for counting account.So,
In a kind of implementation method, this step can also include:Determine to need in raw data table the field of addition.
On the premise of the field value for needing to update is determined, it is possible to the field value is updated, such as can be
(data of user input in account are obtained by way of direct access) to go to update field value.
In actual applications, the determination method of field value is likely to be directly obtained, and needs by being calculated,
Such as " age " field, it is necessary to calculated according to " birthday " field value and current date;And for example " grade " needs to pass through
The operation note (such as online hours, good friend's quantity, transaction stroke count etc.) of account is comprehensive to be determined.So, in a kind of implementation method
In, this step can include:According to the determination method of field corresponding field value, key assignments field value corresponding with the field is entered
Row updates.
Specifically, the determination method of field corresponding field value can be set in advance, such as " age " field, it is determined that side
Method is exactly the difference by current year and time birthday, and whether the current moon, day are more than birthday month, day.Can also be in order at
Business demand modification is completed, such as in the computing formula of " grade " field, have adjusted the weight of individual parameters, or add certain
Individual parameter etc..Key assignments refers to just the corresponding key assignments of the major key determined, field refers to the field updated the need for determining, then
Key assignments field value corresponding with the field is exactly the field value for needing to update, and according to the determination side of field corresponding field value
Method, it is possible to be updated to field value, such as on the basis of table 2 determines the field value for needing renewal, according to " grade "
The determination method of field, " grade " for updating account " 0003 " is 6, and " grade " of account " 0004 " is 9.Here, can be for more
New field value generates a renewal temporary data table, is referred to shown in table 4 below,
Account | Grade |
0003 | 6 |
0004 | 9 |
Table 4
Step 12:Record corresponding with the field value is obtained from raw data table, and according to the field value pair after renewal
The record is updated, and generates temporary data table.
By the agency of, by insert overwrite sentences, can cover original record by new record above,
So this step can just generate a record comprising the field value after updating, and go to cover original record.
Specifically, record corresponding with the field value for needing to update can be first obtained from raw data table, such as, is updated
The field value of " grade " field in account " 0003 " and " 0004 ", it is possible to obtained from raw data table and " grade " field
The corresponding record of field value, herein can also according to get it is original in record generation one it is as shown in table 5 below original
Temporary data table,
Account | Name | Sex | Birthday | Age | Grade | …… |
0003 | King five | Man | 1991/7/22 | 24 | 5 | …… |
0004 | Zhao six | Female | 1992/6/30 | 24 | 7 | …… |
Table 5
In actual applications, field value has repetition after all, so this step can include:According to key assignments, from original number
According to corresponding record is obtained in table, because key assignments is unique, remember so obtaining record according to key assignments and can reach accurate acquisition
The purpose of record.
The field value for needing to update, and this field value are contained in view of the record got from raw data table
It is nonsensical, so in one embodiment, this step can also include:Obtained and the field from raw data table
Corresponding and not comprising the field value the record of value.
Specifically, it is also possible to face according to as shown in table 6 below original of the record generation not comprising the field value is got
When tables of data,
Account | Name | Sex | Birthday | Age | …… |
0003 | King five | Man | 1991/7/22 | 24 | …… |
0004 | Zhao six | Female | 1992/6/30 | 24 | …… |
Table 6
In actual applications, especially Distributed Computing Platform, has a lot (more than one hundred million records), so can in tables of data
Think that tables of data sets up subregion, each subregion represents a specific classification, such as can carry out subregion by the time, it is also possible to
Other features according to field in tables of data carry out subregion, and partition table can be similar to a catalogue, easy-to-look-up tables of data, institute
So that in one embodiment, this step can also include:Obtained from raw data table corresponding with field value record, with
And corresponding partition value;The record is updated according to the field value after renewal, temporary data table of the generation comprising partition value.
Such as, the date can be just partition value, when the corresponding raw data table of field value for needing to update is included in certain subregion,
When record is obtained, it is also desirable to obtain corresponding partition value.And when interim table is generated, it is also desirable to comprising the partition value.
After record corresponding with the field value in getting raw data table, it is possible to according to the field value pair after renewal
The record is updated, and generates temporary data table.Specifically, table 5 or table 6 can be passed through left outer join languages with table 4
Sentence according to the key assignments of major key complete tables of data integration (splicing), using table 4 as left-handed watch, table 5 or table 6 as right table, with left-handed watch
On the basis of, can obtain as shown in table 7 below, have updated " grade " of account " 0003 " is 6, and " grade " of account " 0004 " is 9,
Obtain generating temporary data table.
Account | Name | Sex | Birthday | Age | Grade | …… |
0003 | King five | Man | 1991/7/22 | 24 | 6 | …… |
0004 | Zhao six | Female | 1992/6/30 | 24 | 9 | …… |
Table 7
Wherein, rank field is the result after updating.
Step 13:According to the temporary data table of generation, raw data table is updated.
Temporary data table is generated in step 12, and the record being recorded as after renewal in the temporary data table can be with root
The record in raw data table is covered by insert overwrite sentences according to the record after renewal, so as to complete more
Newly, the key assignments that according to the key assignments of major key, such as can also contain major key in renewal process in the temporary data table of table 7 is " 0003 "
The record of " 0004 ", then the key assignments that can just cover major key in raw data table is the record of " 0003 " and " 0004 ", such as
It is the user profile after renewal shown in table 8 below.
Account | Name | Sex | Birthday | Age | Grade | …… |
0001 | Zhang San | Man | 1990/3/19 | 26 | 9 | …… |
0002 | Li Si | Female | 1992/11/4 | 23 | 10 | …… |
0003 | King five | Man | 1991/7/22 | 24 | 6 | …… |
0004 | Zhao six | Female | 1992/6/30 | 24 | 9 | …… |
…… | …… | …… | …… | …… | …… | …… |
Table 8
The method provided using embodiment 1, when needing to be updated the part field value in tables of data, in original number
The field value of renewal is needed according to being determined in table, and field value is updated, obtain and need to update from raw data table
The corresponding record of field value, and the record is updated according to the field value after renewal, temporary data table is generated, by facing
When tables of data corresponding part in raw data table is updated.All records can only be updated and be covered compared to prior art
Lid, part of the embodiment of the present application only to needing to update is updated, and generates only comprising the interim of the record for updating field value
Tables of data, then go to cover raw data table, computing resource has been saved, reduce the waste to computing resource.
In the prior art, also a kind of method for updating the data table, is that will first obtain the initial data comprising all records
Table, part field value therein is updated further according to service needed, and raw data table is updated further according to the tables of data after renewal.But
It is that, because data volume is very big in big data platform, the raw data table for getting will necessarily also occupy a large amount of memory spaces, make
Into waste of storage space, and the embodiment of the present application, when part field value is updated in only needing to field, needs are determined
After the field value of renewal, the raw data table of the corresponding record of field value for needing to update only is obtained, so that it is empty to have saved storage
Between.
Embodiment 2
Based on identical inventive concept, embodiment 2 provides a kind of tables of data updating device, is only needing in tables of data
When part field value is updated, computing resource is saved, reduce and waste.Fig. 4 is the structure chart of the device, and the device includes:The
One updating block 21, the updating block 23 of temporary data table generation unit 22 and second, wherein,
First updating block 21, it may be determined that the field value for updating is needed in raw data table, and is carried out more to field value
Newly;
Temporary data table generation unit 22, can obtain record corresponding with field value from raw data table, and according to
Field value after renewal is updated to record, generates temporary data table;
Second updating block 23, can be updated according to temporary data table to raw data table.
In one embodiment, the first updating block 21, can be with
According to the field and the corresponding key assignments of major key that need to update in raw data table, it is determined that needing the field for updating
Value;
According to the determination method of field corresponding field value, key assignments field value corresponding with field is updated.
In one embodiment, temporary data table generation unit 22, can be with
According to key assignments, corresponding record is obtained from raw data table.
In one embodiment, temporary data table generation unit 22, can be with
Record corresponding with field value and corresponding partition value are obtained from raw data table;
Record is updated according to the field value after renewal, temporary data table of the generation comprising partition value.
In one embodiment, temporary data table generation unit 22, can be with
Record corresponding with field value and not comprising field value is obtained from raw data table.
In one embodiment, the first updating block 21, can be with
Determine to need in raw data table the field of addition.
The device provided using embodiment 2, when needing to be updated the part field value in tables of data, in original number
The field value of renewal is needed according to being determined in table, and field value is updated, obtain and need to update from raw data table
The corresponding record of field value, and the record is updated according to the field value after renewal, temporary data table is generated, by will
Temporary data table is updated to corresponding part in raw data table.All records can only be updated simultaneously compared to prior art
Covering, part of the embodiment of the present application only to needing to update is updated, and generates only facing comprising the record for updating field value
When tables of data, then go cover raw data table, saved computing resource, reduce the waste to computing resource.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program
Product.Therefore, the application can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.And, the application can be used and wherein include the computer of computer usable program code at one or more
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) is produced
The form of product.
The application is the flow with reference to method, equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructions
The combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices
The device of the function of being specified in present one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy
In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger
Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information Store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, can be used to store the information that can be accessed by a computing device.Defined according to herein, calculated
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
Also, it should be noted that term " including ", "comprising" or its any other variant be intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of key elements not only include those key elements, but also wrapping
Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment is intrinsic wants
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including key element
Also there is other identical element in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.And, the application can be used to be can use in one or more computers for wherein including computer usable program code and deposited
The shape of the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Embodiments herein is these are only, the application is not limited to.To those skilled in the art,
The application can have various modifications and variations.All any modifications made within spirit herein and principle, equivalent,
Improve etc., within the scope of should be included in claims hereof.
Claims (12)
1. a kind of data table updating method, it is characterised in that including:
Determine to need the field value of renewal in raw data table, and the field value is updated;
Record corresponding with the field value is obtained from the raw data table, and according to the field value after renewal to the note
Record is updated, and generates temporary data table;
According to the temporary data table, the raw data table is updated.
2. the method for claim 1, it is characterised in that determine the field value for needing in raw data table to update, and it is right
The field value is updated, including:
According to the field and the corresponding key assignments of major key that need to update in raw data table, it is determined that needing the field value for updating;
According to the determination method of the field corresponding field value, key assignments field value corresponding with the field is carried out more
Newly.
3. method as claimed in claim 2, it is characterised in that obtain corresponding with the field value from the raw data table
Record, including:
According to the key assignments, corresponding record is obtained from the raw data table.
4. method as claimed in claim 2, it is characterised in that obtain corresponding with the field value from the raw data table
Record, and according to the field value after renewal to it is described record be updated, generate temporary data table, including:
Record corresponding with the field value and corresponding partition value are obtained from the raw data table;
The record is updated according to the field value after renewal, temporary data table of the generation comprising partition value.
5. the method for claim 1, it is characterised in that obtain corresponding with the field value from the raw data table
Record, including:
Obtain corresponding with the field value and not comprising the record of the field value from the raw data table.
6. the method for claim 1, it is characterised in that determine the field for needing in raw data table to update, including:
Determine to need in raw data table the field of addition.
7. a kind of tables of data updating device, it is characterised in that including:First updating block, temporary data table generation unit and
Second updating block, wherein,
First updating block, determines to need the field value of renewal in raw data table, and be updated the field value;
The temporary data table generation unit, obtains record corresponding with the field value, and root from the raw data table
The record is updated according to the field value after renewal, generates temporary data table;
Second updating block, according to the temporary data table, is updated to the raw data table.
8. device as claimed in claim 7, it is characterised in that the first updating block,
According to the field and the corresponding key assignments of major key that need to update in raw data table, it is determined that needing the field value for updating;
According to the determination method of the field corresponding field value, key assignments field value corresponding with the field is carried out more
Newly.
9. device as claimed in claim 8, it is characterised in that the temporary data table generation unit,
According to the key assignments, corresponding record is obtained from the raw data table.
10. device as claimed in claim 8, it is characterised in that the temporary data table generation unit,
Record corresponding with the field value and corresponding partition value are obtained from the raw data table;
The record is updated according to the field value after renewal, temporary data table of the generation comprising partition value.
11. devices as claimed in claim 7, it is characterised in that the temporary data table generation unit,
Obtain corresponding with the field value and not comprising the record of the field value from the raw data table.
12. devices as claimed in claim 7, it is characterised in that first updating block,
Determine to need in raw data table the field of addition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610525332.0A CN106897340A (en) | 2016-07-05 | 2016-07-05 | A kind of data table updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610525332.0A CN106897340A (en) | 2016-07-05 | 2016-07-05 | A kind of data table updating method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106897340A true CN106897340A (en) | 2017-06-27 |
Family
ID=59191494
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610525332.0A Pending CN106897340A (en) | 2016-07-05 | 2016-07-05 | A kind of data table updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106897340A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109388644A (en) * | 2017-08-09 | 2019-02-26 | 北京国双科技有限公司 | A kind of data-updating method and device |
CN109785115A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Generation method, device and the computer equipment of test data |
CN110069523A (en) * | 2017-11-23 | 2019-07-30 | 阿里巴巴集团控股有限公司 | A kind of data query method, apparatus and inquiry system |
CN110362629A (en) * | 2019-07-02 | 2019-10-22 | 北京字节跳动网络技术有限公司 | A kind of method, apparatus for guaranteeing data consistency, medium and electronic equipment |
CN110457318A (en) * | 2019-07-24 | 2019-11-15 | 深圳壹账通智能科技有限公司 | The update method of data field, device, medium, electronic equipment in block chain |
CN110659281A (en) * | 2019-08-14 | 2020-01-07 | 中国平安财产保险股份有限公司 | Hive-based data processing method and device, computer equipment and storage medium |
CN111125122A (en) * | 2018-10-31 | 2020-05-08 | 北京国双科技有限公司 | Data updating method and device |
CN111178024A (en) * | 2019-12-17 | 2020-05-19 | 深圳市金蝶天燕云计算股份有限公司 | Data table splicing method and device, computer equipment and storage medium |
CN112100175A (en) * | 2020-08-28 | 2020-12-18 | 拉卡拉支付股份有限公司 | Partition data directional transmission method and device |
CN112287644A (en) * | 2020-09-30 | 2021-01-29 | 成都新潮传媒集团有限公司 | Data submission method and device, computer equipment and readable storage medium |
CN112540995A (en) * | 2020-11-11 | 2021-03-23 | 特劢丝软件科技(上海)有限公司 | Data updating method, electronic device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5842196A (en) * | 1996-04-03 | 1998-11-24 | Sybase, Inc. | Database system with improved methods for updating records |
CN102033948A (en) * | 2010-12-22 | 2011-04-27 | 中国农业银行股份有限公司 | Method and device for updating data |
CN103605776A (en) * | 2013-11-28 | 2014-02-26 | 北京国双科技有限公司 | Method and device for processing data of information database |
-
2016
- 2016-07-05 CN CN201610525332.0A patent/CN106897340A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5842196A (en) * | 1996-04-03 | 1998-11-24 | Sybase, Inc. | Database system with improved methods for updating records |
CN102033948A (en) * | 2010-12-22 | 2011-04-27 | 中国农业银行股份有限公司 | Method and device for updating data |
CN103605776A (en) * | 2013-11-28 | 2014-02-26 | 北京国双科技有限公司 | Method and device for processing data of information database |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109388644B (en) * | 2017-08-09 | 2021-10-15 | 北京国双科技有限公司 | Data updating method and device |
CN109388644A (en) * | 2017-08-09 | 2019-02-26 | 北京国双科技有限公司 | A kind of data-updating method and device |
CN110069523A (en) * | 2017-11-23 | 2019-07-30 | 阿里巴巴集团控股有限公司 | A kind of data query method, apparatus and inquiry system |
CN110069523B (en) * | 2017-11-23 | 2023-08-18 | 阿里巴巴集团控股有限公司 | Data query method, device and query system |
CN111125122A (en) * | 2018-10-31 | 2020-05-08 | 北京国双科技有限公司 | Data updating method and device |
CN109785115A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | Generation method, device and the computer equipment of test data |
CN110362629A (en) * | 2019-07-02 | 2019-10-22 | 北京字节跳动网络技术有限公司 | A kind of method, apparatus for guaranteeing data consistency, medium and electronic equipment |
CN110457318A (en) * | 2019-07-24 | 2019-11-15 | 深圳壹账通智能科技有限公司 | The update method of data field, device, medium, electronic equipment in block chain |
WO2021012554A1 (en) * | 2019-07-24 | 2021-01-28 | 深圳壹账通智能科技有限公司 | Method and apparatus for updating data field in block chain, medium, and electronic device |
CN110659281A (en) * | 2019-08-14 | 2020-01-07 | 中国平安财产保险股份有限公司 | Hive-based data processing method and device, computer equipment and storage medium |
CN110659281B (en) * | 2019-08-14 | 2023-09-12 | 中国平安财产保险股份有限公司 | Hive-based data processing method, hive-based data processing device, computer equipment and storage medium |
CN111178024A (en) * | 2019-12-17 | 2020-05-19 | 深圳市金蝶天燕云计算股份有限公司 | Data table splicing method and device, computer equipment and storage medium |
CN111178024B (en) * | 2019-12-17 | 2023-09-12 | 深圳市金蝶天燕云计算股份有限公司 | Data table splicing method, device, computer equipment and storage medium |
CN112100175A (en) * | 2020-08-28 | 2020-12-18 | 拉卡拉支付股份有限公司 | Partition data directional transmission method and device |
CN112100175B (en) * | 2020-08-28 | 2021-10-19 | 拉卡拉支付股份有限公司 | Partition data directional transmission method and device |
CN112287644A (en) * | 2020-09-30 | 2021-01-29 | 成都新潮传媒集团有限公司 | Data submission method and device, computer equipment and readable storage medium |
CN112287644B (en) * | 2020-09-30 | 2024-01-30 | 成都新潮传媒集团有限公司 | Data submitting method, device, computer equipment and readable storage medium |
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 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106897340A (en) | A kind of data table updating method and device | |
Panescu et al. | Smart contracts for research data rights management over the ethereum blockchain network | |
CN104361018B (en) | Electronic archives information reorganization method and device | |
CN109815228A (en) | Creation method, device, computer equipment and the readable storage medium storing program for executing of database table | |
CN109034988B (en) | Accounting entry generation method and device | |
CN111177200B (en) | Data processing system and method | |
CN106557486A (en) | A kind of storage method and device of data | |
CN108021673A (en) | A kind of user interest model generation method, position recommend method and computing device | |
US10127304B1 (en) | Analysis and visualization tool with combined processing of structured and unstructured service event data | |
US8635252B2 (en) | XBRL flat table mapping system and method | |
CN106649226A (en) | Report generation method and device | |
CN107391537A (en) | Generation method, device and the equipment of data relationship model | |
Vajk et al. | Automatic NoSQL schema development: A case study | |
CN106897338A (en) | A kind of data modification request processing method and processing device for database | |
CN108241670A (en) | Database statement generation method and device | |
Levin et al. | Stratified-sampling over social networks using mapreduce | |
CN112463986A (en) | Information storage method and device | |
CN107026897A (en) | A kind of methods, devices and systems of data processing | |
CN108415990B (en) | Data quality monitoring method and device, computer equipment and storage medium | |
CN106789147A (en) | A kind of flow analysis method and device | |
US9965558B2 (en) | Cross-channel social search | |
CN106570029A (en) | Data processing method and data processing system of distributed relation type database | |
CN115310944A (en) | Online ledger management method, system, device and medium | |
Roy et al. | A novel approach to data storage using blockchain technology | |
US9092472B1 (en) | Data merge based on logical segregation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170627 |