CN105279169A - Database operation processing method and apparatus - Google Patents

Database operation processing method and apparatus Download PDF

Info

Publication number
CN105279169A
CN105279169A CN201410298443.3A CN201410298443A CN105279169A CN 105279169 A CN105279169 A CN 105279169A CN 201410298443 A CN201410298443 A CN 201410298443A CN 105279169 A CN105279169 A CN 105279169A
Authority
CN
China
Prior art keywords
user
unique identification
record
result
database
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
Application number
CN201410298443.3A
Other languages
Chinese (zh)
Inventor
程文超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201410298443.3A priority Critical patent/CN105279169A/en
Priority to PCT/CN2014/095004 priority patent/WO2015196771A1/en
Publication of CN105279169A publication Critical patent/CN105279169A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a database operation processing method and apparatus. The method at least comprises the following steps: detecting an operation performed on a database by a user; generating a unique identifier for the operation of the user; and recording a result of the operation of the user and the unique identifier in a result record table corresponding to the unique identifier. According to the database operation processing method and apparatus provided by the present invention, the unique identifier is generated for the operation of the user, so that multiple users, who use the database at the same time, individually apply for and possess different unique identifiers, and multiple users that simultaneously perform query operations or other operations can be distinguished; and furthermore, the result of the operation of the user and the unique identifier are recorded in the result record table corresponding to the unique identifier, so that records of operation results of multiple users can be distinguished by means of the unique identifiers, thereby avoiding mutual interference among the operation result records of multiple users.

Description

A kind of database manipulation disposal route and device
Technical field
The present invention relates to database, a kind of database manipulation disposal route of special design and device.
Background technology
Progressively increase for the statistical form system of management service record and the use of data warehouse at present.These systems relate in a database to inquiry, the statistics and analysis of data, and generate the statistical report form facilitated consultation.The temporary table that this statistical report form generally uses from query script and result table generate, described temporary table and described result table can be used when multiple user concurrent inquiry simultaneously, cause the operation of multi-user to occur the situation of interference mutually, cause Query Result inaccurate further.
Summary of the invention
In view of this, the invention provides a kind of database manipulation disposal route and device.This device effectively can prevent multi-user's simultaneously interfering with each other of causing of usage data storehouse.
Based on above-mentioned purpose database manipulation disposal route provided by the invention, comprise the steps:
The operation of user to database detected;
This operation for user generates unique identification;
This operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
Optionally, described method also comprises:
Receive the operational order of user to outcome record table corresponding to described unique identification;
According to the unique identification in described operational order, the record in described outcome record table is filtered, obtain the record corresponding with described unique identification;
On the basis of the described record corresponding with unique identification, perform the operational order of user.
Optionally, described outcome record table comprises temporary table for recording user single operation result and result table; Be respectively equipped with for recording uniquely identified field in described temporary table and result table.
Optionally, described unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.
Optionally, described ID mark is generated by database functions or storing process function or proceduring sql like language PLSQL block.
Further, the invention provides a kind of database manipulation treating apparatus, this device comprises:
Operation detection module: for the operation of user to database being detected;
Identifier generation module: generate unique identification for this operation for user;
Outcome record module: for this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
Optionally, described device also comprises:
Command reception module: for receiving the operational order of user to outcome record table corresponding to described unique identification;
Record acquisition module: for filtering the record in described outcome record table according to the unique identification in described operational order, obtain the record corresponding with described unique identification;
Operational order execution module: for the basis at the described record corresponding with unique identification, performs the operational order of user.
Optionally, described outcome record table comprises temporary table for recording user single operation result and result table; Be respectively equipped with for recording uniquely identified field in described temporary table and result table.
Optionally, described unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.
Optionally, described identifier generation module generates described ID by database functions or storing process function or proceduring sql like language PLSQL block and identifies.
As can be seen from above, database manipulation disposal route provided by the invention and device, this operation for user generates unique identification, thus multiple users needing SEPARATE APPLICATION and there is different unique identifications according to self in simultaneously usage data storehouse, the multiple users simultaneously making query manipulation or other operation can be distinguished; In addition, this operating result of user is in the outcome record table that described unique identification is corresponding together with described unique identification record by the present invention, the record of multiple user operation result can be distinguished by described unique identification, thus the operating result record between multiple user can be avoided mutually to disturb.The database manipulation disposal route of the embodiment of the present invention and device, can also allow multiple user on the basis that the ID needed identifies corresponding outcome record, to carry out subsequent operation according to actual conditions, avoid the interference that the operation behavior of other users is brought.
Accompanying drawing explanation
Fig. 1 is the database manipulation process flow schematic diagram of the embodiment of the present invention;
The schematic flow sheet that the database manipulation disposal route that Fig. 2 is some embodiments of the invention comprises;
Fig. 3 is temporary table or the result list structure schematic diagram of the embodiment of the present invention;
Fig. 4 is the database manipulation process flow schematic diagram of an embodiment of the present invention;
Fig. 5 is the database manipulation treating apparatus structural representation of the embodiment of the present invention;
Fig. 6 is the database manipulation treating apparatus structural representation of an embodiment of the present invention.
Embodiment
In order to provide effective implementation, the invention provides following examples, below in conjunction with Figure of description, embodiments of the invention being described.
First, the invention provides a kind of database manipulation disposal route, comprise step as shown in Figure 1:
Step 101: the operation of user to database detected;
Step 102: this operation for user generates unique identification;
Step 103: this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
As can be seen from above, database manipulation disposal route provided by the invention, this operation for user generates unique identification, thus multiple users needing SEPARATE APPLICATION and there is different unique identifications according to self in simultaneously usage data storehouse, the multiple users simultaneously making query manipulation or other operation can be distinguished; In addition, this operating result of user is in the outcome record table that described unique identification is corresponding together with described unique identification record by the present invention, the record of multiple user operation result can be distinguished by described unique identification, thus the operating result record between multiple user can be avoided mutually to disturb.
Concrete, each step of said method can adopt following embodiment in real process:
Step 101: the operation of user to database detected.
In above-mentioned steps, the operation of described user to database comprises the inquiry, statistics, analysis etc. of user to database.
Step 102: this operation for user generates unique identification.
In above-mentioned steps, for the single operation such as data query, data statistics, data analysis of user, generate a unique identification, this mark is used for distinguishing multiple user.More specifically, described mark can be the mark being arranged at name field, or is arranged at the mark of sequence-number field, or is arranged at the mark corresponding with other field in outcome record table.
More specifically, when described unique identification is arranged at name field, can be the mark comprising letter character, can be also the mark comprising numeric character, or comprise the mark of other symbol.When described unique identification is arranged at sequence-number field, also can be comprise letter character mark, comprise the mark of numeric character or comprise the mark of other symbol.
Step 103: this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
In specific implementation process, between described outcome record table and described unique identification, can be relation one to one, namely an outcome record table correspondence comprises a certain uniquely identified outcome record.Such as, when described unique identification is the numeric character mark being arranged at sequence-number field, one can be added when establishment outcome record table in the sequence-number field of outcome record table and comprise numeric character mark, such as ID mark 10001; After user performs a query manipulation, operating result corresponding for this query manipulation is recorded in outcome record table, and in this record, adds the ID mark 10001 of sequence-number field.
In specific implementation process, between described outcome record table and described unique identification, can be the relation of one-to-many, namely an outcome record table comprises the different outcome record of unique identification.Such as, when described unique identification is the numeric character mark being arranged at sequence-number field, when adding the operating result record of first user in outcome record table, can add in the sequence-number field of this record the mark that comprises numeric character, as ID mark 10001; When adding the operating result record of the second user in outcome record table, access another mark comprising numeric character in the sequence-number field of this record, as ID mark 10002.Like this, the operating result record of different user can distinguish in outcome record table, avoids the mutual interference between the operation note of multiple user.
In practical operation, if between outcome record table and described unique identification be relation one to one, when then hypothesis has two different users (first user and the second user) to operate database, the subsequent operation of user can perform on the basis formerly operated.And if between outcome record table and described unique identification be the relation of one-to-many, then during user's subsequent operation need by described unique identification, the operation note in outcome record table is filtered.
Therefore, in some embodiments of the invention, described method also comprises step as shown in Figure 2:
Step 201: receive the operational order of user to outcome record table corresponding to described unique identification;
Step 202: filter the record in described outcome record table according to the unique identification in described operational order, obtains the record corresponding with described unique identification;
Step 203: on the basis of the described record corresponding with unique identification, performs the operational order of user.
In specific implementation process, the embodiment shown in Fig. 2 can adopt following manner:
Step 201: receive the operational order of user to outcome record table corresponding to described unique identification.
User, when operating database, can add described unique identification in operational order, when receiving the operational order of user, can obtain described unique identification from operational order.
Step 202: filter the record in described outcome record table according to the unique identification in described operational order, obtains the record corresponding with described unique identification.
In above-mentioned steps, suppose that two different users (first user and the second user) operate database simultaneously, described unique identification is the ID mark of sequence-number field, and the ID mark of first user and the second user is respectively 10001,10002.With reference to Fig. 3, the sequence-number field of the operating result record of first user in outcome record table includes ID mark 10001; The sequence-number field of the operating result record of the second user in outcome record table includes ID mark 10002.After described ID mark creates, when first user continues operation after execution, include ID identification information in its operational order, by described ID identification information, ID is identified the outcome record filtration of non-10001, residue ID is designated the outcome record of 10001.If when the second user performs subsequent operation, include ID identification information in its operational order, by described ID identification information, ID is identified the outcome record filtration of non-10002, residue ID is designated the outcome record of 10002.
When the users of more than three or three operate database simultaneously, the establishment mode of operating result record can be similar with Fig. 3.
Step 203: on the basis of the described record corresponding with unique identification, performs the operational order of user.
When performing the process such as inquiry, statistics, analysis as certain user, in outcome record table, corresponding basis of recording performs, shielding action is played to the information that the operating result according to other user records in record sheet.
In some embodiments of the invention, described outcome record table comprises temporary table for recording user single operation result and result table; Be respectively equipped with for recording uniquely identified field in described temporary table and result table.
Concrete, can when creating temporary table or the result table of the operation such as user data query, statistical study, add uniquely identified field, this interpolation uniquely identified field can be arranged in temporary table or the original sequence-number field of result table, also can be arranged in temporary table or result table other field original.
Before each user uses temporary table or result table, before namely adding the operating result record of user in temporary table or result mark, apply for a unique mark corresponding to this user.After described unique identification application, often inserting user operation outcome record all can the described unique identification of insertion in the sequence-number field of record.
When user reuses database, user also will use the temporary table or the result table that include outcome record described in epimere, such user can add unique identification information in operational order, can by operating result record filtering corresponding in temporary table and result table out by this unique identification information, so that when performing user's current operation, can not other user to the interference of the operation of database.
More specifically, first user uses between temporary table or result table, before namely adding the operating result record of first user in temporary table or result mark, corresponding to the mark that first user application one is unique, this mark can be the ID mark 10001 being arranged at sequence-number field.After described unique identification 10001 is applied for, often inserting a first user operating result record all can the described unique identification 10001 of insertion in the sequence-number field of record.
When first user reuses database, user also will use the temporary table or the result table that include outcome record described in epimere, such user can add unique identification information in operational order, can by operating result record filtering corresponding in temporary table and result table out by this unique identification information, so that when performing user's current operation, the interference of other user to the operation of database can not be subject to.
In some embodiments of the invention, described unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.
In other embodiments, described unique identification is included in other field in the record of outcome record table.But, when a certain user reuses described temporary table or result table, in most cases, this user still wishes to perform subsequent operation on the basis of previous operating result, such as, when user performs query manipulation, first query time section is the data of 2010-2012 years, on these data bases, further query categories is the data of A, so, user then wishes can when carrying out query categories and being the data query of A, what originally found out, belong in the data of 2010-2012 and search, therefore, in preferred embodiment, described unique identification is the ID mark inserted in the sequence-number field in temporary table or result table.
In some embodiments of the invention, the ID mark that often establishment one is new, identifies on basis at the front ID once created and increases by 1.
In some embodiments of the invention, described ID mark is generated by database functions or storing process function or proceduring sql like language PLSQL block.
In a kind of specific embodiment of the present invention, described database manipulation disposal route, comprises step as shown in Figure 4:
Step 401: the operation of user to database detected.
Step 402: this operation for user generates unique identification.
Step 403: this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
Step 404: receive and comprise described uniquely identified user operation instruction.
Step 405: filter the record in described outcome record table according to the unique identification in described operational order, obtains the record corresponding with described unique identification.
Step 406: on the basis of the described record corresponding with unique identification, performs the operational order of user.
In above-mentioned steps 404, described in comprise uniquely identified user operation instruction, can be same user after the operation described in carry out step 401, the operational order sent when again inquiring about, add up or analyze data; Also can be the user different from the user performing the operation described in step 401.
As can be seen from above, database manipulation disposal route provided by the invention, when adding user operation outcome record, increase unique identification, this unique identification can be used for same user at the enterprising single stepping of advancing in the basis of oneself prior operation result, thus the mutual interference that the while of avoiding multiple user, operating database causes.
In addition, the database manipulation disposal route of the embodiment of the present invention, set unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.This ID mark not only allows same user at the enterprising single stepping of advancing in the basis of oneself prior operation result, also may be used for the second user at the enterprising single stepping of advancing in the basis of first user prior operation result, thus avoid the operation of other users to first user and the second user to cause interference.
Further, the invention provides a kind of database manipulation treating apparatus, result as shown in Figure 5, comprising:
Operation detection module: for the operation of user to database being detected;
Identifier generation module: generate unique identification for this operation for user;
Outcome record module: for this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
As can be seen from above, database manipulation treating apparatus provided by the invention, can generate unique identification, to distinguish the operation of other user for the operation of user; Thus effectively to avoid in query script influencing each other and the situation of exception appears in this Query Result that causes further of influencing each other because multi-user concurrent inquire about the result caused.
In some embodiments of the invention, described device also comprises:
Command reception module: for receiving the operational order of user to outcome record table corresponding to described unique identification;
Record acquisition module: for filtering the record in described outcome record table according to the unique identification in described operational order, obtain the record corresponding with described unique identification;
Operational order execution module: for the basis at the described record corresponding with unique identification, performs the operational order of user.
In above-described embodiment, the operational order that described command reception module receives includes unique identification information.
In some embodiments of the invention, described outcome record table comprises temporary table for recording user single operation result and result table; Be respectively equipped with for recording uniquely identified field in described temporary table and result table.
In some embodiments of the invention, described unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.
In some embodiments of the invention, described identifier generation module generates described ID by database functions or storing process function or proceduring sql like language PLSQL block and identifies.
In a kind of specific embodiment of the present invention, described database manipulation treating apparatus comprises structure as shown in Figure 6:
Operation detection module: for the operation of user to database being detected.
Identifier generation module: generate unique identification for this operation for user.
Outcome record module: for this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
Command reception module: comprise described uniquely identified user operation instruction for receiving.
Record acquisition module: for filtering the record in described outcome record table according to the unique identification in described operational order, obtain the record corresponding with described unique identification.
Operational order execution module: for the basis at the described record corresponding with unique identification, performs the operational order of user.
As can be seen from above, database manipulation treating apparatus provided by the invention, not only can only allow same user at the enterprising single stepping of advancing in the basis of oneself prior operation result, also may be used for the second user at the enterprising single stepping of advancing in the basis of first user prior operation result, avoid the operation of other users to first user and the second user to cause interference.
Should be appreciated that multiple embodiments described by this instructions are only for instruction and explanation of the present invention, are not intended to limit the present invention.And when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a database manipulation disposal route, is characterized in that, comprises the steps:
The operation of user to database detected;
This operation for user generates unique identification;
This operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
2. method according to claim 1, is characterized in that, also comprises:
Receive the operational order of user to outcome record table corresponding to described unique identification;
According to the unique identification in described operational order, the record in described outcome record table is filtered, obtain the record corresponding with described unique identification;
On the basis of the described record corresponding with unique identification, perform the operational order of user.
3. method according to claim 1, is characterized in that, described outcome record table comprises temporary table for recording user single operation result and result table; Be respectively equipped with for recording uniquely identified field in described temporary table and result table.
4. according to the method in claim 1-3 described in any one, it is characterized in that, described unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.
5. method according to claim 4, is characterized in that, described ID mark is generated by database functions or storing process function or proceduring sql like language PLSQL block.
6. a database manipulation treating apparatus, is characterized in that, comprising:
Operation detection module: for the operation of user to database being detected;
Identifier generation module: generate unique identification for this operation for user;
Outcome record module: for this operating result of user is recorded in the outcome record table corresponding with described unique identification together with described unique identification.
7. device according to claim 6, is characterized in that, also comprises:
Command reception module: for receiving the operational order of user to outcome record table corresponding to described unique identification;
Record acquisition module: for filtering the record in described outcome record table according to the unique identification in described operational order, obtain the record corresponding with described unique identification;
Operational order execution module: for the basis at the described record corresponding with unique identification, performs the operational order of user.
8. device according to claim 6, is characterized in that, described outcome record table comprises temporary table for recording user single operation result and result table; Be respectively equipped with for recording uniquely identified field in described temporary table and result table.
9. according to the device in claim 6-8 described in any one, it is characterized in that, described unique identification is included in the ID mark inserted in the sequence-number field of the record of outcome record table.
10. device according to claim 9, is characterized in that, described identifier generation module generates described ID by database functions or storing process function or proceduring sql like language PLSQL block and identifies.
CN201410298443.3A 2014-06-26 2014-06-26 Database operation processing method and apparatus Pending CN105279169A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410298443.3A CN105279169A (en) 2014-06-26 2014-06-26 Database operation processing method and apparatus
PCT/CN2014/095004 WO2015196771A1 (en) 2014-06-26 2014-12-25 Method and device for processing database operations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410298443.3A CN105279169A (en) 2014-06-26 2014-06-26 Database operation processing method and apparatus

Publications (1)

Publication Number Publication Date
CN105279169A true CN105279169A (en) 2016-01-27

Family

ID=54936672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410298443.3A Pending CN105279169A (en) 2014-06-26 2014-06-26 Database operation processing method and apparatus

Country Status (2)

Country Link
CN (1) CN105279169A (en)
WO (1) WO2015196771A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1858738A (en) * 2006-02-15 2006-11-08 华为技术有限公司 Method and device for access data bank
CN101860449A (en) * 2009-04-09 2010-10-13 华为技术有限公司 Data query method, device and system
CN102243660A (en) * 2011-07-18 2011-11-16 中兴通讯股份有限公司 Data access method and device
CN103577441A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Storage method and storage device for user operation data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1858738A (en) * 2006-02-15 2006-11-08 华为技术有限公司 Method and device for access data bank
CN101860449A (en) * 2009-04-09 2010-10-13 华为技术有限公司 Data query method, device and system
CN102243660A (en) * 2011-07-18 2011-11-16 中兴通讯股份有限公司 Data access method and device
CN103577441A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Storage method and storage device for user operation data

Also Published As

Publication number Publication date
WO2015196771A1 (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN102779151B (en) The searching method of application program, Apparatus and system
CN106301825B (en) DPI rule generation method and device
DE60318470D1 (en) METHOD FOR GRANTING ACCESS TO A DEVICE THROUGH A LINKING OF A FIRST CHARACTERISTIC OF A FIRST DEVICE AND A SECOND CHARACTERISTIC OF A SECOND DEVICE
CN106375535B (en) Contact person information synchronization method and device
CN106488539A (en) The processing method of WiFi resource and system in terminal
CN110291759B (en) Task management method and system
CN109710140A (en) A kind of smart phone social application automatic data collection method
CN104021219A (en) Method and device for generating data template
CN105912138A (en) Phrase input method and device
CN106557419B (en) Program testing method and device
CN110362585B (en) Data analysis method and device, storage medium and electronic equipment
CN103514303A (en) Method and system for recognizing electrical element wiring diagram
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium
CN102981822A (en) Method and equipment of treatment strategy
CN105279169A (en) Database operation processing method and apparatus
CN104951920B (en) service interface processing device and method
CN112084111A (en) Data processing method, system and device
CN104182479A (en) Method and device for processing information
CN103823791A (en) Method and device for realizing automatic generation of file
CN106503005B (en) Information processing method and terminal
CN104268277A (en) Data reading method and device for database
CN101452458A (en) System for enquiring characters and words in dictionary by wildcard character and method thereof
CN103514123B (en) The recognition methods of a kind of USB equipment connection port and system
CN113923190A (en) Method and device for identifying equipment identification jump, server and storage medium
CN110457187B (en) TPC-E test method and test server capable of conveniently running based on backup test data

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20160127

RJ01 Rejection of invention patent application after publication