CN102567544A - Database query method and database query device - Google Patents

Database query method and database query device Download PDF

Info

Publication number
CN102567544A
CN102567544A CN2012100127107A CN201210012710A CN102567544A CN 102567544 A CN102567544 A CN 102567544A CN 2012100127107 A CN2012100127107 A CN 2012100127107A CN 201210012710 A CN201210012710 A CN 201210012710A CN 102567544 A CN102567544 A CN 102567544A
Authority
CN
China
Prior art keywords
database
data
query
base
information
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
CN2012100127107A
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN2012100127107A priority Critical patent/CN102567544A/en
Publication of CN102567544A publication Critical patent/CN102567544A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a database query method and a database query device. The database query method comprises the following steps of: according to the query information carried in the received database query request, obtaining a database record corresponding to the query information from the database; generating a query result according to the database record corresponding to the query information, and transmitting the query result. The database query device specifically comprises an obtaining module and a query result generation module. With the database query method and the database query device, the database record corresponding to the database query request is extracted from the database only when the database query request is received, and corresponding calculation is performed so as to generate the query result, the process of updating the database when the database changes so as to take the result of the updating operation as the query result to feed back to the user is not needed, the problem of table lock caused when updating the database can be avoided, and the stability of a database system is improved.

Description

Data base query method and device
Technical field
The present invention relates to database technology, relate in particular to a kind of data base query method and device.
Background technology
Current in the internet, industries such as telecommunications, finance, the mass data epoch have arrived, the data volume sustainable growth of miscellaneous service makes enterprise have in the face of the problem of growing Service Data Management.These mass datas are effectively stored, can realize that the stability of retrieving desired data fast and keeping system is the key that guarantees the normal operation of operation system.
Prior art comes business datum is managed through database usually; When producing new data in the business procedure; Generate data-base recording according to these data, and database is upgraded operation, so that the result that the user operates this renewal inquires about according to this data-base recording.But, because existing database storing method often relates to the association between the tables of data, when mass data being upgraded operation, database lock table problem very easily occurs, and then cause system crash, make operation system normally to move.
Summary of the invention
The present invention provides a kind of data base query method and device, to improve the stability of Database Systems.
First aspect of the present invention provides a kind of data base query method, comprising:
According to the Query Information that carries in the data base querying request that receives, from database, obtain the corresponding data-base recording of said Query Information;
Data-base recording generated query result and the transmission corresponding according to said Query Information.
Another aspect of the present invention provides a kind of data base querying device, comprising:
Acquisition module is used for the Query Information that carries according to the data base querying request that receives, from database, obtains the corresponding data-base recording of said Query Information;
The Query Result generation module is used for data-base recording generated query result and the transmission corresponding according to said Query Information.
Can know by technique scheme; The data base query method that first aspect of the present invention provides; According to the Query Information that carries in the data base querying request that receives; From database, obtain the corresponding data-base recording of Query Information, data-base recording generated query result and the transmission corresponding according to Query Information.Because when receiving the data base querying request; Just that this data base querying request is corresponding data-base recording extracts from database; Carry out corresponding calculating with the generated query result; And need can not avoid database is upgraded the lock table problem that causes when operating to when database is changed, just database being upgraded operation, improve the stability of Database Systems.
The data base querying device that another aspect of the present invention provides; Acquisition module is according to the Query Information that carries in the data base querying request that receives; From database, obtain the corresponding data-base recording of Query Information, data-base recording generated query result and transmission that the Query Result generation module is corresponding according to Query Information.Because when receiving the data base querying request; Just that this data base querying request is corresponding data-base recording extracts from database; Carry out corresponding calculating with the generated query result; Because Query Result generates according to data-base recording; And need not feed back to the user with the result that will upgrade operation as Query Result to when database is changed, just database being upgraded operation, and can avoid database is upgraded the lock table problem that causes when operating, improve the stability of Database Systems.
Description of drawings
The data base query method process flow diagram that Fig. 1 provides for the embodiment of the invention one;
The data base querying apparatus structure synoptic diagram that Fig. 2 provides for the embodiment of the invention three;
The data base querying apparatus structure synoptic diagram that Fig. 3 provides for the embodiment of the invention four.
Embodiment
Embodiment one
The data base query method process flow diagram that Fig. 1 provides for the embodiment of the invention one.As shown in Figure 1, the data base query method that present embodiment provides specifically can be applied to the management process to database, can be carried out by the data base querying device, and this data base querying device can be realized through software and/or hardware mode.
The data base query method that present embodiment provides specifically comprises:
The Query Information that carries in step 10, the basis data base querying request that receives obtains the corresponding data-base recording of Query Information from database;
Step 20, according to the corresponding data-base recording generated query result of Query Information and send.
Particularly; The data base querying request can be the request in order to business information inquired about of user through the client transmission; For example for the inquiry system of telecommunications industry; This data base querying request specifically can carry Query Information for account balance inquiry etc. in this data base querying request, Query Information for example can comprise user's account information etc.The data base querying device obtains the corresponding data-base recording of this Query Information according to Query Information from database when receiving this data base querying request, and this data-base recording is handled; With the generated query result; And this Query Result sent to client, because Query Result generates according to data-base recording, therefore; Need when database is changed, just not upgrade (update) operation, feed back to the user as Query Result with the result that will upgrade operation to database.Data-base recording is handled specifically and can be calculated for the mode that adopts data aggregate, the data base querying pond can be set, with the intermediate data that produces in the storing queries processing procedure.
The data base query method that present embodiment provides according to the Query Information that carries in the data base querying request that receives, obtains the corresponding data-base recording of Query Information from database, data-base recording generated query result and the transmission corresponding according to Query Information.Because when receiving the data base querying request; Just that this data base querying request is corresponding data-base recording extracts from database; Carry out corresponding calculating with the generated query result; Because Query Result generates according to data-base recording; And need not feed back to the user with the result that will upgrade operation as Query Result to when database is changed, just database being upgraded operation, and can avoid database is upgraded the lock table problem that causes when operating, improve the stability of Database Systems.
Embodiment two
The data base query method that present embodiment provides specifically can also comprise the steps: on the basis of embodiment one
Step 30, generate data-base recording, data-base recording is inserted in the database in the corresponding tables of data according to the business information of carrying in the database that the receives change request.
Particularly; Database change request is sent by business processing center, carries business information in this database change request, and database is used for service related information is stored; Specifically can be provided with a plurality of tables of data in the database, so that different service information is managed.When receiving this database change request; Generate the corresponding database record according to business information; And this data-base recording is inserted in the database through inserting (insert) operation, specifically can this data recording be inserted in the corresponding data table of database according to the content of this data recording.Operation is only inserted in change for database, and does not upgrade operation.
For example, in telecommunications industry, bill record collection equipment is gathered ticket, and ticket is sent to the cost information that the charging center is handled this ticket correspondence of generation accordingly.The charging center can be this business processing center, and then the service related information of database storing is user's ticket information and corresponding cost information.The charging center can send to the data base querying device as business information through the database update request according to this ticket and corresponding cost information thereof; The data base querying device generates data recording according to this business information, and this data recording is inserted in the database.
Owing to be used to store the database of mass data; The frequency of Data Update is very high, when database is upgraded, only database is inserted operation; And do not upgrade operation, can have and avoid effectively database is upgraded the lock table problem that causes when operating.And simplified data change flow process to database.
In the present embodiment, be inserted in the database data-base recording in the corresponding tables of data in the step 30 before, specifically can also comprise the steps:
The professional key word that step 40, basis get access to carries out the branch storehouse to database and is processed into a plurality of word banks, wherein, comprises at least one tables of data in the word bank.
Particularly, can carry out combing and classification to professional critical field earlier, to obtain professional key word.Professional key word specifically can comprise user name, type of service etc.According to this business key word database being carried out the branch storehouse handles; Manage in identical word bank will unify the stronger Data Loading of attribute or relevance; Reduce the relevance of business information between different word banks, further reduced the probability of happening of the lock performance elephant of database.Correspondingly, in the time of in the corresponding data table that newly-generated data-base recording is inserted into database, can obtain corresponding word bank, again this data-base recording is inserted in the corresponding data table of word bank according to the content of this data-base recording.
In the present embodiment, step 20 after Query Information corresponding data-base recording generated query result and transmission, specifically can also comprise the steps:
Step 50, corresponding database record in the database is upgraded according to Query Result.
Renewal operation to database is carried out after to data library inquiry request response; Because the user is limited to the query manipulation frequency of a certain data recording such as account balance in the database, well below change operation, therefore to database; Also can reduce the database lock table problem that operation causes of upgrading to a certain extent; And, inquiry next time is carried out based on this renewal result to the renewal of data-base recording, reduced the calculated amount in the data aggregate processing procedure.
Embodiment three
The data base querying apparatus structure synoptic diagram that Fig. 2 provides for the embodiment of the invention three.As shown in Figure 2, the data base querying device that present embodiment provides specifically can be realized each step of the data base query method that any embodiment of the present invention provides, and this repeats no more.
The data base querying device 21 that present embodiment provides specifically comprises acquisition module 11 and Query Result generation module 12.Acquisition module 11 is used for the Query Information that carries according to the data base querying request that receives, from database 22, obtains the corresponding data-base recording of Query Information.Query Result generation module 12 is used for data-base recording generated query result and the transmission corresponding according to Query Information.
The data base querying device 21 that present embodiment provides; Acquisition module 11 is according to the Query Information that carries in the data base querying request that receives; From database 22, obtain the corresponding data-base recording of Query Information, data-base recording generated query result and transmission that Query Result generation module 12 is corresponding according to Query Information.Because when receiving the data base querying request; Just that this data base querying request is corresponding data-base recording extracts from database 22; Carry out corresponding calculating with the generated query result; Because Query Result generates according to data-base recording; And need not feed back to the user with the result that will upgrade operation as Query Result to when database 22 is changed, just database 22 being upgraded operation, and can avoid database 22 is upgraded the lock table problem that causes when operating, improve the stability of Database Systems.
Embodiment four
The data base querying apparatus structure synoptic diagram that Fig. 3 provides for the embodiment of the invention four.As shown in Figure 3; In the present embodiment; This data base querying device 21 specifically can also comprise insert module 13; Insert module 13 is used for generating data-base recording according to the business information that the database that receives change request is carried, and data-base recording is inserted in the database 22 in the corresponding tables of data.Owing to be used to store the database 22 of mass data; The frequency of Data Update is very high, when database 22 is upgraded, only database 22 is inserted operation; And do not upgrade operation, can avoid effectively database 22 is upgraded the lock table problem that causes when operating.And simplified data change flow process to database 22.
In the present embodiment, this data base querying device 21 specifically can also comprise branch library module 14, divides library module 14 to be used for according to the professional key word that gets access to database 22 being carried out the branch storehouse and is processed into a plurality of word banks, wherein, comprises at least one tables of data in the word bank.Through the setting of minute library module 14, can in identical word bank, manage unifying the stronger Data Loading of attribute or relevance, reduced the relevance of business information between different word banks, further reduced the probability of happening of the lock performance elephant of database 22.
In the present embodiment, this data base querying device 21 specifically can also comprise update module 15, and update module 15 is used for according to Query Result database 22 corresponding database record being upgraded.Through the setting of update module 15, carried out the inquiry of the database 22 renewal result based on this next time, reduced the calculated amount in the data aggregate processing procedure.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of programmed instruction; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.

Claims (8)

1. a data base query method is characterized in that, comprising:
According to the Query Information that carries in the data base querying request that receives, from database, obtain the corresponding data-base recording of said Query Information;
Data-base recording generated query result and the transmission corresponding according to said Query Information.
2. data base query method according to claim 1 is characterized in that, also comprises:
Business information according to carrying in the database that the receives change request generates data-base recording, and said data-base recording is inserted in the said database in the corresponding tables of data.
3. data base query method according to claim 2 is characterized in that, be inserted in the said database said data-base recording in the corresponding tables of data before, also comprise:
According to the professional key word that gets access to said database is carried out the branch storehouse and be processed into a plurality of word banks, wherein, comprise at least one tables of data in the said word bank.
4. data base query method according to claim 1 and 2 is characterized in that, after said Query Information corresponding data-base recording generated query result and transmission, also comprises:
According to said Query Result corresponding database record in the said database is upgraded.
5. a data base querying device is characterized in that, comprising:
Acquisition module is used for the Query Information that carries according to the data base querying request that receives, from database, obtains the corresponding data-base recording of said Query Information;
The Query Result generation module is used for data-base recording generated query result and the transmission corresponding according to said Query Information.
6. data base querying device according to claim 5 is characterized in that, also comprises:
Insert module is used for generating data-base recording according to the business information that the database that receives change request is carried, and said data-base recording is inserted in the said database in the corresponding tables of data.
7. data base querying device according to claim 6 is characterized in that, also comprises:
Divide library module, be used for said database being carried out the branch storehouse and be processed into a plurality of word banks, wherein, comprise at least one tables of data in the said word bank according to the professional key word that gets access to.
8. according to claim 5 or 6 described data base querying devices, it is characterized in that, also comprise:
Update module is used for according to said Query Result said database corresponding database record being upgraded.
CN2012100127107A 2012-01-16 2012-01-16 Database query method and database query device Pending CN102567544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100127107A CN102567544A (en) 2012-01-16 2012-01-16 Database query method and database query device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100127107A CN102567544A (en) 2012-01-16 2012-01-16 Database query method and database query device

Publications (1)

Publication Number Publication Date
CN102567544A true CN102567544A (en) 2012-07-11

Family

ID=46412942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100127107A Pending CN102567544A (en) 2012-01-16 2012-01-16 Database query method and database query device

Country Status (1)

Country Link
CN (1) CN102567544A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050297A (en) * 2014-07-03 2014-09-17 中国工商银行股份有限公司 Inquiry transaction distribution method and device
CN107203613A (en) * 2017-05-23 2017-09-26 北京微影时代科技有限公司 A kind of method and device of high concurrent request processing
CN110472751A (en) * 2019-07-23 2019-11-19 上海易点时空网络有限公司 Handle the method and device of data
CN111708848A (en) * 2020-06-12 2020-09-25 北京思特奇信息技术股份有限公司 Data query method and system and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091128A1 (en) * 2003-10-24 2005-04-28 Luo Sheng-Chi System and method for querying inventory
CN200976656Y (en) * 2006-06-27 2007-11-14 上海全成通信技术有限公司 Novel large-capacity user information processing system
CN101464894A (en) * 2008-12-30 2009-06-24 北京中创信测科技股份有限公司 Data query method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091128A1 (en) * 2003-10-24 2005-04-28 Luo Sheng-Chi System and method for querying inventory
CN200976656Y (en) * 2006-06-27 2007-11-14 上海全成通信技术有限公司 Novel large-capacity user information processing system
CN101464894A (en) * 2008-12-30 2009-06-24 北京中创信测科技股份有限公司 Data query method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050297A (en) * 2014-07-03 2014-09-17 中国工商银行股份有限公司 Inquiry transaction distribution method and device
CN107203613A (en) * 2017-05-23 2017-09-26 北京微影时代科技有限公司 A kind of method and device of high concurrent request processing
CN110472751A (en) * 2019-07-23 2019-11-19 上海易点时空网络有限公司 Handle the method and device of data
CN111708848A (en) * 2020-06-12 2020-09-25 北京思特奇信息技术股份有限公司 Data query method and system and electronic equipment
CN111708848B (en) * 2020-06-12 2024-02-23 北京思特奇信息技术股份有限公司 Data query method, system and electronic equipment

Similar Documents

Publication Publication Date Title
EP1566753B1 (en) Searchable archive
CN102541927B (en) Method and device for realizing data cache
CN103902623B (en) Method and system for the accessing file in storage system
US8229902B2 (en) Managing storage of individually accessible data units
CN100583832C (en) Data management method and system
CN109359222A (en) Date storage method and system, equipment and storage medium
CN101405728B (en) Relational database architecture with dynamic load capability
CN102495894A (en) Method, device and system for searching repeated data
JPH10501086A (en) Storage plane organization and storage system based thereon
KR20100015368A (en) A method of data storage and management
CN102609488A (en) Client, data query method of client, server and data query system
CN103544153A (en) Data updating method and system based on database
CN105787058A (en) User label system and data pushing system based on same
CN104657387A (en) Data query method and device
CN103186622A (en) Updating method of index information in full text retrieval system and device thereof
CN110019111A (en) Data processing method, device, storage medium and processor
CN102779138A (en) Hard disk access method of real time data
CN110096509A (en) Realize that historical data draws the system and method for storage of linked list modeling processing under big data environment
CN102346744A (en) Device for processing materialized table in multi-tenancy (MT) application system
CN102456188A (en) Data management system and design method thereof
CN102567544A (en) Database query method and database query device
CN111708895B (en) Knowledge graph system construction method and device
CN109815244A (en) A kind of data processing method and device
CN114185934B (en) Indexing and query method and system based on Tiandun database column storage
CN104834664A (en) Optical disc juke-box oriented full text retrieval system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120711