CN101706819A - Query method and system of database, client side, server and database - Google Patents

Query method and system of database, client side, server and database Download PDF

Info

Publication number
CN101706819A
CN101706819A CN200910250679A CN200910250679A CN101706819A CN 101706819 A CN101706819 A CN 101706819A CN 200910250679 A CN200910250679 A CN 200910250679A CN 200910250679 A CN200910250679 A CN 200910250679A CN 101706819 A CN101706819 A CN 101706819A
Authority
CN
China
Prior art keywords
sequence number
querying command
page
data
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
CN200910250679A
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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN200910250679A priority Critical patent/CN101706819A/en
Publication of CN101706819A publication Critical patent/CN101706819A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses a query method and a system of database, a client side, a server and a database. The method realizing on the client side comprises the following steps: receiving a first query command input by users by providing a visual interface to a user, wherein the first query command comprises a filtering condition of data needing to be queried; sending the first query command to a server; receiving and displaying a major key listing returned by the server; receiving a second query command input by users by the visual interface provided for the user; sending the second query command to the server, wherein the second query command comprises a major key assembly needing to be queried in a major key listing; receiving and displaying data which corresponds to the major key assembly and is returned by the server. One query is divided into two stages, thus reducing sending data amount; because the data quantity queried in the second stage is less if compared with all data, occupied cache is less; because sending data quantity and occupied cache are decreased, the query speed is higher.

Description

The querying method of database and system, client, server and database
Technical field
The present invention relates to technical field of data storage, the particularly querying method of database and system, client, server and database.
Background technology
Database is used to store various data, and the user can inquire about the data of needs from database when needing data.Existing querying method: in database one side, database receives the querying command that client sends, and has comprised the filtercondition of the data of needs inquiries in the above-mentioned querying command; Database root is searched the data of storing in the database according to the filtercondition that receives, and all data that will find send to client.In client one side, client leaves the data that the receive mode with vernier in the buffer memory in; Client receives the sequence number of the demonstration page or leaf of user's input again, searches the data of the demonstration page or leaf correspondence of above-mentioned sequence number then by the mode of vernier, and shows the data of the demonstration page or leaf correspondence of above-mentioned sequence number.
The inventor finds in realizing process of the present invention: because all data that database will find all send to client, need expend very big transmission bandwidth.Because it is the data that find need be stored in the buffer memory, very big or to expend buffer memory under a lot of situation of concurrent inquiry big in the data volume that finds; When concurrent inquiry is a lot of, expend buffer memory in large quantities and access cache causes system response slow.
Summary of the invention
The technical matters that the embodiment of the invention will solve provides the querying method and the system of database, client, server and database.
For solving the problems of the technologies described above, the querying method embodiment of database provided by the present invention can be achieved through the following technical solutions:
Receive first querying command that the user imports by the visualization interface that provides for the user, described first querying command comprises the filtercondition that needs data query; Send described first querying command to server;
The list of primary keys that reception and display server return; Second querying command of user's input is provided by the visualization interface that provides for the user; Send described second querying command to server, described second querying command comprises the set that needs the major key inquired about in the list of primary keys; Receive and the display server data corresponding that return with set described major key.
A kind of querying method of database comprises:
To send to database from first querying command of client; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends, described second querying command comprises the set that needs the major key inquired about in the list of primary keys; Send described second querying command to database; Receive database and use the data of returning after the set inquiry of described major key, and described data are sent to client.
A kind of querying method of database comprises:
Receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, and the list of primary keys that finds sent to server; Receive second querying command; According to the set of the major key that comprises in described second querying command, from the described data that found list of primary keys, search the data of the set correspondence of described major key, and send to server.
A kind of client comprises:
The querying command receiving element is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; Second querying command of user's input is provided by the visualization interface that provides for the user;
The querying command transmitting element is used for sending described first querying command to server; Send described second querying command to server, described second querying command comprises the set that needs the major key inquired about in the list of primary keys;
Receive display unit, be used to receive and list of primary keys that display server returns; Receive and the display server data corresponding that return with set described major key.
A kind of server comprises:
The order retransmission unit is used for first querying command and second querying command from client are sent to database; Described first querying command comprises the filtercondition that needs data query; Described second querying command comprises the set that needs the major key inquired about in the list of primary keys;
The data forwarding unit is used to receive database and uses the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive database and use the data of returning after the set inquiry of described major key, and described data are sent to client.
A kind of database comprises:
The order receiving element is used to receive first querying command and second querying command;
Query unit is used for the filtercondition Query Database that described first querying command of foundation comprises, and obtains list of primary keys; According to the set of the major key that comprises in described second querying command, from the described data that found list of primary keys, search the data of the set correspondence of described major key, and send to server;
Transmitting element, the list of primary keys that is used for finding sends to server; The data of the set correspondence of described major key are sent to server.
A kind of inquiry system of database comprises:
Client is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; Send described first querying command to server; The list of primary keys that reception and display server return; Receive second querying command of user's input by the visualization interface that provides for the user, described second querying command comprises the set that needs the major key inquired about in the list of primary keys; Send described second querying command to server; Receive and the display server data corresponding that return with set described major key;
Server is used for first querying command from client is sent to database; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends; Send described second querying command to database; Receive database and use the data of returning after the set inquiry of described major key, and described data are sent to client;
Database is used to receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, and the list of primary keys that finds sent to server; Receive second querying command; According to the set of the major key that comprises in described second querying command, from the described data that found list of primary keys, search the data of the set correspondence of described major key, and send to server.
A kind of querying method of database comprises:
Receive first querying command that the user imports by the visualization interface that provides for the user, described first querying command comprises the filtercondition that needs data query; Send described first querying command to server; The list of primary keys that reception and display server return; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user; According to the sequence number of the page of described needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates described sequence number; Send second querying command to server, described second querying command comprises the sequence number of data item in temporary table of the page of described sequence number; Receive and the display server data corresponding that return with the page described sequence number.
A kind of querying method of database comprises:
To send to database from first querying command of client, described first querying command comprises the filtercondition that needs data query; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends, described second querying command comprises the sequence number of data item in temporary table of the page of the sequence number that needs inquire about; Send described second querying command to database; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the described sequence number that needs inquiry, and described data are sent to client.
A kind of querying method of database comprises:
Receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, create the data that the temporary table storage finds, and to each data item editing sequence number; The list of primary keys that finds is sent to server; Receive second querying command; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of foundation reads the data corresponding with the page of described sequence number, and sends to server from described interim tabulation.
A kind of client comprises:
The querying command receiving element is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user;
Computing unit is used for according to the data item of the sequence number of the page of described needs inquiry and the page that predetermined page size the calculates described sequence number sequence number at temporary table;
The querying command transmitting element sends described first querying command to server; Send second querying command to server, described second querying command comprises the sequence number of data item in temporary table of the page of described sequence number;
Receive display unit, be used to receive and list of primary keys that display server returns; Receive and the display server data corresponding that return with the page described sequence number.
A kind of server comprises:
The order retransmission unit is used for first querying command and second querying command from client are sent to database; Described first querying command comprises the filtercondition that needs data query; Described second querying command comprises the sequence number of data item in temporary table of the page of the sequence number of needs inquiries;
The data forwarding unit is used to receive database and uses the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the described sequence number that needs inquiry, and described data are sent to client.
A kind of database comprises:
The order receiving element is used to receive first querying command and second querying command;
Query unit is used for obtaining list of primary keys and data according to the filtercondition Query Database that described first querying command comprises; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of foundation reads the data corresponding with the page of described sequence number from described interim tabulation;
The table creating unit is used to create the data that the temporary table storage finds, and to each data item editing sequence number;
Transmitting element, the list of primary keys that is used for finding sends to server; With the corresponding data of the page described and described sequence number, send to server.
A kind of inquiry system of database comprises:
Client is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; Send described first querying command to server; The list of primary keys that reception and display server return; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user; According to the sequence number of the page of described needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates described sequence number; Send second querying command to server, described second querying command comprises the sequence number of data item in temporary table of the page of described sequence number; Receive and the display server data corresponding that return with the page described sequence number;
Server is used for first querying command from client is sent to database; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends, described second querying command comprises the sequence number of data item in temporary table of the page of the sequence number that needs inquire about; Send described second querying command to database; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the described sequence number that needs inquiry, and described data are sent to client;
Database is used to receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, create the data that the temporary table storage finds, and to each data item editing sequence number; The list of primary keys that finds is sent to server; Receive second querying command; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of foundation reads the data corresponding with the page of described sequence number, and sends to server from described interim tabulation.
Technique scheme has following beneficial effect: one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so part of the data that the data that subordinate phase sends also only can inquire for the phase one, than sending all data, reduced the data volume that sends; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the embodiment of the invention one first a method schematic flow sheet;
Fig. 2 is the embodiment of the invention one second a method schematic flow sheet;
Fig. 3 is the embodiment of the invention one third party's method schematic flow sheet;
Fig. 4 is the embodiment of the invention two method flow synoptic diagram;
Fig. 5 is the embodiment of the invention two visual interface synoptic diagram;
Fig. 6 is that the embodiment of the invention two is showed the interface synoptic diagram;
Fig. 7 is the embodiment of the invention three client terminal structure synoptic diagram;
Fig. 8 is the embodiment of the invention three another client terminal structure synoptic diagram;
Fig. 9 is the embodiment of the invention four server architecture synoptic diagram;
Figure 10 is the embodiment of the invention five database structure synoptic diagram;
Figure 11 is the embodiment of the invention six system architecture synoptic diagram;
Figure 12 is the embodiment of the invention 7 first method schematic flow sheets;
Figure 13 is the embodiment of the invention 7 second method schematic flow sheets;
Figure 14 is the embodiment of the invention seven third party's method schematic flow sheets;
Figure 15 is an embodiment of the invention method schematic flow sheet from all directions;
Figure 16 is the embodiment of the invention eight visual interface synoptic diagram;
Figure 17 is that the embodiment of the invention eight is showed the interface synoptic diagram;
Figure 18 is the embodiment of the invention nine client terminal structure synoptic diagram;
Figure 19 is the embodiment of the invention ten server architecture synoptic diagram;
Figure 20 is the embodiment of the invention 11 database structure synoptic diagram;
Figure 21 is the embodiment of the invention ten two system structural representations.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one, the embodiment of the invention provide a kind of querying method of database, and the realization on end side as shown in Figure 1, comprising:
101: receive first querying command that the user imports by the visualization interface that provides for the user, above-mentioned first querying command comprises the filtercondition that needs data query;
102: send above-mentioned first querying command to server;
103: the list of primary keys that reception and display server return;
Because the list item of list of primary keys may be many, can adopt asynchronous mode to transmit, be specially: in above-mentioned 103, the list of primary keys that reception and display server return comprises: receive the son that adopts asynchronous system to send and tabulate, above-mentioned son tabulation is split as the length of setting by list of primary keys.
104: second querying command that user's input is provided by the visualization interface that provides for the user; Send above-mentioned second querying command to server, above-mentioned second querying command comprises the set that needs the major key inquired about in the list of primary keys;
What the user imported in visualization interface can be the sequence number of the page, bring in by the client then and calculate the major key set, be specially: receive second querying command of user's input by the visualization interface that provides for the user, above-mentioned second querying command comprises needs the set of the major key inquired about to comprise in the list of primary keys:
Second querying command of user's input is provided by the visualization interface that provides for the user, according to the page sequence number of appointment in second querying command and predetermined page size, calculate the set of the major key of specified page sequence number, the set of the major key that aforementioned calculation is obtained is added into second querying command.
105: receive and the display server data corresponding that return with set above-mentioned major key.
The embodiment of the invention also provides a kind of querying method of database, and the realization on server as shown in Figure 2, comprising:
201: will send to database from first querying command of client, first querying command comprises the filtercondition that needs data query;
202: receive database and use the list of primary keys of returning after the above-mentioned filtercondition inquiry; Above-mentioned list of primary keys is sent to client;
Because the list item of list of primary keys may be many, can adopt asynchronous mode to transmit, be specially: in above-mentioned 202, above-mentioned list of primary keys is sent to client comprise: above-mentioned list of primary keys is split as the son tabulation of the length of setting, above-mentioned son tabulation adopts asynchronous system to send to client.
203: receive second querying command that client sends, above-mentioned second querying command comprises the set that needs the major key inquired about in the list of primary keys; Send above-mentioned second querying command to database;
204: receive database and use the data of returning after the set inquiry of above-mentioned major key, and above-mentioned data are sent to client.
The embodiment of the invention also provides a kind of querying method of database, and the realization on database as shown in Figure 3, comprising:
301: receive first querying command;
302:, and the list of primary keys that finds sent to server according to the filtercondition Query Database that comprises in above-mentioned first querying command;
303: receive second querying command;
304:, from the above-mentioned data that found list of primary keys, search the data of the set correspondence of above-mentioned major key, and send to server according to the set of the major key that comprises in above-mentioned second querying command.
The implementation of embodiment one, one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so the part of the data that the data that subordinate phase sends also only can inquire for the phase one than sending all data, has reduced the data volume of transmission; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
Embodiment two, and the embodiment of the invention has provided a concrete example querying method of database is described, and the inquiry with order is an example in the present embodiment, and filtercondition comprises: " amount of money " (amount)>100 as shown in Figure 4, may further comprise the steps:
401: the user at first needs to determine the major key of order inquiry, for example FID in the order table example 1;
Table 1, order table example
Figure G2009102506799D0000091
402: as shown in Figure 5, client receives the filtercondition of user's input for the user provides visual interface; Follow filtercondition, the query statement of being inquired about specifically according to user's input: select FID Fromorder Where amount>100, and this query statement sent to server;
403: server will be transmitted to database from the query statement of client;
404: database is with it is investigated that asking the statement inquiry obtains all major key ID, and all major keys can be put into buffer memory with the form of tabulation, as: the form with list of primary keys (idList) is deposited into buffer memory; Then idList is sent to server;
405: server end carries out idList to cut apart by certain size, and the son tabulation of the idList after will cutting apart then uses asynchronous mode to send to client;
406: client calculates total number of pages according to the asynchronous son tabulation of sending back of server and predetermined page size (be that what data item each page shows, in the present embodiment be example with 100), can also calculate first page major key;
According to first page that calculates major key, the query statement of first page of major key of structure inquiry, as: select*from order Where id IN (1,2 ...., 100);
According to above-mentioned inquiry, obtain data and carry out showing interface, as shown in Figure 6;
407: the set of the major key that the needs that client is set by the visualization interface reception user who provides for the user are inquired about, this major key set can need the page displayed sequence number to embody by appointment; Sequence number according to the page of user data, can from idList, obtain all major keys in the page of above-mentioned sequence number, make up query statement then, as, the data that the needs inquiry is the 3rd page, the 3rd page the id value that obtains from idList is (500,511.....), then the query statement of the page data of above-mentioned sequence number can be: and select*from orderWhere id In (500,511....), then above-mentioned query statement is sent to server;
408: server sends to database with the query statement that receives;
409: the Query Result that database root obtains according to this query statement, and Query Result sent to server;
410: the above-mentioned Query Result that server will receive sends to client;
411: client shows the Query Result that receives, and the user just can see the result of inquiry like this.
If the client need inquire about the data that major key is other pages of FID and amount>100, only need import in 407 visualization interface needs the sequence number of the page inquired about just passable, and client, server and database can repeat 407~411 step and carry out the inquiry of above-mentioned other page datas.
Embodiment two, one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so the part of the data that the data that subordinate phase sends also only can inquire for the phase one than sending all data, has reduced the data volume of transmission; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
Embodiment three, as shown in Figure 7, the embodiment of the invention also provides a kind of client, comprising:
Querying command receiving element 701 is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and above-mentioned first querying command comprises the filtercondition that needs data query; Second querying command of user's input is provided by the visualization interface that provides for the user;
Querying command transmitting element 702 is used for sending above-mentioned first querying command to server; Send above-mentioned second querying command to server, above-mentioned second querying command comprises the set that needs the major key inquired about in the list of primary keys;
Receive display unit 703, be used to receive and list of primary keys that display server returns; Receive and the display server data corresponding that return with set above-mentioned major key.
Particularly, above-mentioned reception display unit 703 is used to receive and the list of primary keys returned of display server specifically comprises: be used to receive the son tabulation of adopting asynchronous system to send, above-mentioned son tabulation is split as the length of setting by list of primary keys.
Alternatively, what second querying command that the user imports by visualization interface comprised is fixed page sequence number, and as shown in Figure 8, above-mentioned client also comprises:
Major key set computing unit 801 is used for according to the page sequence number of the second querying command appointment and predetermined page size, calculates the set of the major key of specified page sequence number;
Major key adding device 802, the set that is used for major key that aforementioned calculation is obtained is added into second querying command.
Embodiment four, and as shown in Figure 9, the embodiment of the invention also provides a kind of server, comprising:
Order retransmission unit 901 is used for first querying command and second querying command from client are sent to database; Above-mentioned first querying command comprises the filtercondition that needs data query; Above-mentioned second querying command comprises the set that needs the major key inquired about in the list of primary keys;
Data forwarding unit 902 is used to receive database and uses the list of primary keys of returning after the above-mentioned filtercondition inquiry; Above-mentioned list of primary keys is sent to client; Receive database and use the data of returning after the set inquiry of above-mentioned major key, and above-mentioned data are sent to client.
Particularly, data forwarding unit 902 is used for that above-mentioned list of primary keys is sent to client and specifically comprises: above-mentioned list of primary keys is split as the son tabulation of the length of setting, above-mentioned son tabulation adopts asynchronous system to send to client.
Embodiment five, and as shown in figure 10, the embodiment of the invention also provides a kind of database, comprising:
Order receiving element 1001 is used to receive first querying command and second querying command;
Query unit 1002 is used for the filtercondition Query Database that above-mentioned first querying command of foundation comprises, and obtains list of primary keys; According to the set of the major key that comprises in above-mentioned second querying command, from the above-mentioned data that found list of primary keys, search the data of the set correspondence of above-mentioned major key, and send to server.
Transmitting element 1003, the list of primary keys that is used for finding sends to server; The data of the set correspondence of above-mentioned major key are sent to server.
Embodiment six, and as shown in figure 11, the embodiment of the invention also provides a kind of inquiry system of database, comprising:
Client 1101 is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and above-mentioned first querying command comprises the filtercondition that needs data query; Send above-mentioned first querying command to server 1102; The list of primary keys that reception and display server 1102 return; Receive second querying command of user's input by the visualization interface that provides for the user, above-mentioned second querying command comprises the set that needs the major key inquired about in the list of primary keys; Send above-mentioned second querying command to server 1102; Receive and display server 1102 data corresponding that return with the set of above-mentioned major key;
Server 1102 is used for first querying command from client 1101 is sent to database 1103; Receive database 1103 and use the list of primary keys of returning after the above-mentioned filtercondition inquiry; Above-mentioned list of primary keys is sent to client 1101; Receive second querying command that client 1101 sends; Send above-mentioned second querying command to database 1103; Receive database 1103 and use the data of returning after the set inquiry of above-mentioned major key, and above-mentioned data are sent to client 1101;
Database 1103 is used to receive first querying command; According to the filtercondition Query Database 1103 that comprises in above-mentioned first querying command, and the list of primary keys that finds sent to server 1102; Receive second querying command; According to the set of the major key that comprises in above-mentioned second querying command, from the above-mentioned data that found list of primary keys, search the data of the set correspondence of above-mentioned major key, and send to server 1102;
Alternatively, above-mentioned list of primary keys is sent to client 1101 comprise: above-mentioned list of primary keys is split as the son tabulation of the length of setting, above-mentioned son tabulation adopts asynchronous system to send to client 1101.
Alternatively, receive second querying command of user's input by the visualization interface that provides for the user, above-mentioned second querying command comprises needs the set of the major key inquired about to comprise in the list of primary keys:
Second querying command of user's input is provided by the visualization interface that provides for the user, according to the page sequence number of appointment in second querying command and predetermined page size, calculate the set of the major key of specified page sequence number, the set of the major key that aforementioned calculation is obtained is added into second querying command.
Embodiment three to embodiment six, one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so the part of the data that the data that subordinate phase sends also only can inquire for the phase one than sending all data, has reduced the data volume of transmission; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
Embodiment seven, and the embodiment of the invention also provides the querying method of another kind of database, and the realization on client as shown in figure 12, comprising:
1201: receive first querying command that the user imports by the visualization interface that provides for the user, above-mentioned first querying command comprises the filtercondition that needs data query;
1202: send above-mentioned first querying command to server;
1203: the list of primary keys that reception and display server return;
1204: the sequence number of the page that the inquiry of user's input is provided by the visualization interface that provides for the user;
1205: according to the sequence number of the page of above-mentioned needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates above-mentioned sequence number;
Alternatively, in above-mentioned 1205, it is 1 that the sequence number of the data item in the temporary table adopts the Base Serial Number of serial number and first page, and the sequence number of the above-mentioned page according to above-mentioned needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates above-mentioned sequence number comprise:
Calculate the inquiry of above-mentioned sequence number the page sequence number and 1 difference again with the long-pending last of predetermined page size and 1 and as the start sequence number of the sequence number of above-mentioned data item in temporary table, calculate the inquiry of above-mentioned sequence number the page sequence number and predetermined page size amass end sequence number as the sequence number of above-mentioned data item in temporary table, with above-mentioned start sequence number to the sequence number section of above-mentioned end sequence number as the sequence number of above-mentioned data item in temporary table.
1206: send second querying command to server, above-mentioned second querying command comprises the sequence number of data item in temporary table of the page of above-mentioned sequence number;
1207: receive and the display server data corresponding that return with the page above-mentioned sequence number;
The embodiment of the invention also provides the querying method of another kind of database, and the realization on server as shown in figure 13, comprising:
1301: will send to database from first querying command of client, first querying command comprises the filtercondition that needs data query;
1302: receive database and use the list of primary keys of returning after the above-mentioned filtercondition inquiry; Above-mentioned list of primary keys is sent to client;
1303: receive second querying command that client sends, above-mentioned second querying command comprises the sequence number of data item in temporary table of the page of the sequence number that needs inquire about; Send above-mentioned second querying command to database;
1304: receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the above-mentioned sequence number that needs inquiry, and above-mentioned data are sent to client;
The embodiment of the invention also provides the querying method of another kind of database, and the realization on database as shown in figure 14, comprising:
1401: receive first querying command;
1402: according to the filtercondition Query Database that comprises in above-mentioned first querying command, create the data that the temporary table storage finds, and to each data item editing sequence number;
1403: the list of primary keys that finds is sent to server;
1404: receive second querying command;
1405: the sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in above-mentioned second querying command of foundation, read the data corresponding with the page of above-mentioned sequence number, and send to server from above-mentioned interim tabulation.
In 1402, it is 1 that the sequence number of above-mentioned data item adopts the start sequence number of serial number and first page; So in 1405, the sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in above-mentioned second querying command of foundation, reading the data corresponding with the page of above-mentioned sequence number from above-mentioned interim tabulation comprises: according to the sequence number section that comprises in above-mentioned second querying command, read above-mentioned sequence number section all data item in interim tabulation as the data corresponding with the page of above-mentioned sequence number.
The implementation of embodiment seven, one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so the part of the data that the data that subordinate phase sends also only can inquire for the phase one than sending all data, has reduced the data volume of transmission; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
Embodiment eight, and the embodiment of the invention has provided a concrete example querying method of database is described, and the inquiry with order is an example in the present embodiment, and filtercondition comprises: " amount of money " (amount)>100 as shown in figure 15, may further comprise the steps:
1501: the user at first needs to determine the major key of order inquiry, for example FID in the order table example 2;
Table 2, order table example
Figure G2009102506799D0000151
1502: as shown in figure 16, client receives the filtercondition of user's input for the user provides visual interface; Follow filtercondition, the query statement of being inquired about specifically according to user's input: select FIDFrom order Where amount>100, and this query statement sent to server;
1503: server will be transmitted to database from the query statement of client;
1504: database is with it is investigated that asking the statement inquiry obtains all major key ID, and all major keys can be put into buffer memory with the form of list of primary keys (idList), can also create the data that the temporary table storage finds, and be each data item editing sequence number; The data item of temporary table can reference: and t order queryID (FSeq, FID); Wherein FSeq represents the sequence number field of list of primary keys;
1505: server end sends to client with idList; Can also carry the information of the item number of idList and since list of primary keys integral body sent to client, its item number can carry out technology by client and obtain, so the information of this item number is optional;
1506: list of primary keys that client is sent back according to server and predetermined page size (be that what data item each page shows, in the present embodiment be example with 100), calculate total number of pages, can also calculate first page major key; According to first page that calculates major key, the query statement of first page of major key of structure inquiry, as: select*from order Where id IN (1,2 ...., 100) obtain data and carry out showing interface, as shown in figure 17.
1507: the sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user client: according to the sequence number of the page of above-mentioned needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates above-mentioned sequence number, for example the sequence number of the page of Shu Ru inquiry is 1, calculates the 1st page FSeq scope so; FSeq scope according to the 1st page, major key ID table name, construct the query statement of the 1st page FSeq field data, as: select t1.*from order t1 inner Joint_order_queryID t2 On t1.FID=t2.FID Where t2.FSeq Between 1 And 100; Then above-mentioned query statement is sent to server;
1508: server sends to database with the query statement that receives;
1509: database reads the data corresponding with the page of above-mentioned sequence number, and sends to server according to the sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in above-mentioned second querying command from above-mentioned interim tabulation;
1510: the above-mentioned Query Result that server will receive sends to client;
1511: client shows the Query Result that receives, and the user just can see the result of inquiry like this.
If the client need inquire about the data that major key is other pages of FID and amount>100, only need import in 1507 visualization interface needs the sequence number of the page inquired about just passable, and client, server and database can repeat 1507~1511 step and carry out the inquiry of above-mentioned other page datas.
Embodiment eight, one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so the part of the data that the data that subordinate phase sends also only can inquire for the phase one than sending all data, has reduced the data volume of transmission; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
Embodiment nine, and as shown in figure 18, the embodiment of the invention also provides another kind of client, comprising:
Querying command receiving element 1801 is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and above-mentioned first querying command comprises the filtercondition that needs data query; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user;
Computing unit 1802 is used for according to the data item of the sequence number of the page of above-mentioned needs inquiry and the page that predetermined page size the calculates above-mentioned sequence number sequence number at temporary table;
Querying command transmitting element 1803 sends above-mentioned first querying command to server; Send second querying command to server, above-mentioned second querying command comprises the sequence number of data item in temporary table of the page of above-mentioned sequence number;
Receive display unit 1804, be used to receive and list of primary keys that display server returns; Receive and the display server data corresponding that return with the page above-mentioned sequence number;
Alternatively, aforementioned calculation unit 1802, specifically be used for calculating above-mentioned sequence number inquiry the page sequence number and 1 difference again with the long-pending last of predetermined page size and 1 and as the start sequence number of above-mentioned data item in the sequence number of temporary table, calculate the inquiry of above-mentioned sequence number the page sequence number and predetermined page size amass end sequence number as the sequence number of above-mentioned data item in temporary table, with above-mentioned start sequence number to the sequence number section of above-mentioned end sequence number as the sequence number of above-mentioned data item in temporary table.
Embodiment ten, and as shown in figure 19, the embodiment of the invention also provides another kind of server, comprising:
Order retransmission unit 1901 is used for first querying command and second querying command from client are sent to database; Above-mentioned first querying command comprises the filtercondition that needs data query; Above-mentioned second querying command comprises the sequence number of data item in temporary table of the page of the sequence number of needs inquiries;
Data forwarding unit 1902 is used to receive database and uses the list of primary keys of returning after the above-mentioned filtercondition inquiry; Above-mentioned list of primary keys is sent to client; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the above-mentioned sequence number that needs inquiry, and above-mentioned data are sent to client.
Embodiment 11, and as shown in figure 20, the embodiment of the invention also provides a kind of database, comprising:
Order receiving element 2001 is used to receive first querying command and second querying command;
Query unit 2002 is used for obtaining list of primary keys and data according to the filtercondition Query Database that above-mentioned first querying command comprises; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in above-mentioned second querying command of foundation reads the data corresponding with the page of above-mentioned sequence number from above-mentioned interim tabulation;
Table creating unit 2003 is used to create the data that the temporary table storage finds, and to each data item editing sequence number;
Transmitting element 2004, the list of primary keys that is used for finding sends to server; With the corresponding data of the page above-mentioned and above-mentioned sequence number, send to server.
Alternatively, to adopt the start sequence number of serial number and first page be 1 to the sequence number of above-mentioned data item; Above-mentioned query unit 2002, the sequence number of data item in temporary table of the page of the sequence number that the needs that are used for comprising according to above-mentioned second querying command are inquired about, reading the data corresponding with the page of above-mentioned sequence number from above-mentioned interim tabulation comprises: be used for the sequence number section that above-mentioned second querying command of foundation comprises, read above-mentioned sequence number section all data item in interim tabulation as the data corresponding with the page of above-mentioned sequence number.
Embodiment 12, and as shown in figure 21, the embodiment of the invention also provides the inquiry system of another kind of database, comprising:
Client 2101 is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and above-mentioned first querying command comprises the filtercondition that needs data query; Send above-mentioned first querying command to server 2102; The list of primary keys that reception and display server 2102 return; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user; According to the sequence number of the page of above-mentioned needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates above-mentioned sequence number; Send second querying command to server 2102, above-mentioned second querying command comprises the sequence number of data item in temporary table of the page of above-mentioned sequence number; Receive and the corresponding data of display server 2102 pages that return and above-mentioned sequence number;
Server 2102 is used for first querying command from client 2101 is sent to database 2103; Receive database 2103 and use the list of primary keys of returning after the above-mentioned filtercondition inquiry; Above-mentioned list of primary keys is sent to client 2101; Receive second querying command that client 2101 sends, above-mentioned second querying command comprises the sequence number of data item in temporary table of the page of the sequence number that needs inquire about; Send above-mentioned second querying command to database 2103; Receive database 2103 and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the above-mentioned sequence number that needs inquiry, and above-mentioned data are sent to client 2101;
Database 2103 is used to receive first querying command; According to the filtercondition Query Database 2103 that comprises in above-mentioned first querying command, create the data that the temporary table storage finds, and to each data item editing sequence number; The list of primary keys that finds is sent to server 2102; Receive second querying command; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in above-mentioned second querying command of foundation reads the data corresponding with the page of above-mentioned sequence number, and sends to server 2102 from above-mentioned interim tabulation.
Alternatively, the sequence number employing serial number of the data item in the temporary table and first page Base Serial Number are 1, then above-mentioned client 2101 is used for comprising in the sequence number of temporary table according to the sequence number of the page of above-mentioned needs inquiry and the data item of the page that predetermined page size calculates above-mentioned sequence number:
Be used for calculating above-mentioned sequence number inquiry the page sequence number and 1 difference again with the long-pending last of predetermined page size and 1 and as the start sequence number of above-mentioned data item in the sequence number of temporary table, calculate the inquiry of above-mentioned sequence number the page sequence number and predetermined page size amass end sequence number as the sequence number of above-mentioned data item in temporary table, with above-mentioned start sequence number to the sequence number section of above-mentioned end sequence number as the sequence number of above-mentioned data item in temporary table;
Above-mentioned database 2103, the sequence number of data item in temporary table of the page of the sequence number that the needs that are used for comprising according to above-mentioned second querying command are inquired about, reading the data corresponding with the page of above-mentioned sequence number from above-mentioned interim tabulation comprises: be used for the sequence number section that above-mentioned second querying command of foundation comprises, read above-mentioned sequence number section all data item in interim tabulation as the data corresponding with the page of above-mentioned sequence number.
Embodiment nine to embodiment 12, one query is divided into two stages, what the phase one client received is list of primary keys, than receiving data, reduced the data volume that sends, because what client sent in the subordinate phase is data designated in the inquiry phase one, so the part of the data that the data that subordinate phase sends also only can inquire for the phase one than sending all data, has reduced the data volume of transmission; In addition since the data of subordinate phase inquiry than total data still less, the buffer memory that takies also can be still less; All reduced owing to send data volume and cache occupation amount, thereby the speed of inquiry will be faster.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, above-mentioned program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be a ROM (read-only memory), disk or CD etc.
More than to the querying method and the system of the database that the embodiment of the invention provided, client, server and database are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, to sum up, this description should not be construed as limitation of the present invention.

Claims (27)

1. the querying method of a database is characterized in that, comprising:
Receive first querying command that the user imports by the visualization interface that provides for the user, described first querying command comprises the filtercondition that needs data query; Send described first querying command to server;
The list of primary keys that reception and display server return; Second querying command of user's input is provided by the visualization interface that provides for the user; Send described second querying command to server, described second querying command comprises the set that needs the major key inquired about in the list of primary keys; Receive and the display server data corresponding that return with set described major key.
2. according to the described method of claim 1, it is characterized in that the list of primary keys that reception and display server return comprises: receive the son that adopts asynchronous system to send and tabulate, described son tabulation is split as the length of setting by list of primary keys.
3. according to claim 1 or 2 described methods, it is characterized in that, receive second querying command of user's input by the visualization interface that provides for the user, described second querying command comprises needs the set of the major key inquired about to comprise in the list of primary keys:
Second querying command of user's input is provided by the visualization interface that provides for the user, according to the page sequence number of appointment in second querying command and predetermined page size, calculate the set of the major key of specified page sequence number, the set of the described major key that calculates is added into second querying command.
4. the querying method of a database is characterized in that, comprising:
To send to database from first querying command of client; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends, described second querying command comprises the set that needs the major key inquired about in the list of primary keys; Send described second querying command to database; Receive database and use the data of returning after the set inquiry of described major key, and described data are sent to client.
5. according to the described method of claim 4, it is characterized in that, described list of primary keys is sent to client comprise: described list of primary keys is split as the son tabulation of the length of setting, described son tabulation adopts asynchronous system to send to client.
6. the querying method of a database is characterized in that, comprising:
Receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, and the list of primary keys that finds sent to server; Receive second querying command; According to the set of the major key that comprises in described second querying command, from the described data that found list of primary keys, search the data of the set correspondence of described major key, and send to server.
7. a client is characterized in that, comprising:
The querying command receiving element is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; Second querying command of user's input is provided by the visualization interface that provides for the user;
The querying command transmitting element is used for sending described first querying command to server; Send described second querying command to server, described second querying command comprises the set that needs the major key inquired about in the list of primary keys;
Receive display unit, be used to receive and list of primary keys that display server returns; Receive and the display server data corresponding that return with set described major key.
8. according to the described client of claim 7, it is characterized in that, described reception display unit is used to receive and the list of primary keys returned of display server specifically comprises: be used to receive the son tabulation of adopting asynchronous system to send, described son tabulation is split as the length of setting by list of primary keys.
9. according to claim 7 or 8 described clients, it is characterized in that what second querying command that the user imports by visualization interface comprised is fixed page sequence number, described client also comprises:
Major key set computing unit is used for according to the page sequence number of the second querying command appointment and predetermined page size, calculates the set of the major key of specified page sequence number;
The major key adding device is used for the set of the described major key that calculates is added into second querying command.
10. a server is characterized in that, comprising:
The order retransmission unit is used for first querying command and second querying command from client are sent to database; Described first querying command comprises the filtercondition that needs data query; Described second querying command comprises the set that needs the major key inquired about in the list of primary keys;
The data forwarding unit is used to receive database and uses the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive database and use the data of returning after the set inquiry of described major key, and described data are sent to client.
11. according to the described server of claim 10, it is characterized in that, the data forwarding unit is used for that described list of primary keys is sent to client and specifically comprises: described list of primary keys is split as the son tabulation of the length of setting, described son tabulation adopts asynchronous system to send to client.
12. a database is characterized in that, comprising:
The order receiving element is used to receive first querying command and second querying command;
Query unit is used for the filtercondition Query Database that described first querying command of foundation comprises, and obtains list of primary keys; According to the set of the major key that comprises in described second querying command, from the described data that found list of primary keys, search the data of the set correspondence of described major key, and send to server;
Transmitting element, the list of primary keys that is used for finding sends to server; The data of the set correspondence of described major key are sent to server.
13. the inquiry system of a database is characterized in that, comprising:
Client is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; Send described first querying command to server; The list of primary keys that reception and display server return; Receive second querying command of user's input by the visualization interface that provides for the user, described second querying command comprises the set that needs the major key inquired about in the list of primary keys; Send described second querying command to server; Receive and the display server data corresponding that return with set described major key;
Server is used for first querying command from client is sent to database; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends; Send described second querying command to database; Receive database and use the data of returning after the set inquiry of described major key, and described data are sent to client;
Database is used to receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, and the list of primary keys that finds sent to server; Receive second querying command; According to the set of the major key that comprises in described second querying command, from the described data that found list of primary keys, search the data of the set correspondence of described major key, and send to server.
14. according to the described system of claim 13, it is characterized in that, described list of primary keys is sent to client comprise: described list of primary keys is split as the son tabulation of the length of setting, described son tabulation adopts asynchronous system to send to client.
15., it is characterized in that according to claim 13 or 14 described systems, receive second querying command of user's input by the visualization interface that provides for the user, described second querying command comprises needs the set of the major key inquired about to comprise in the list of primary keys:
Second querying command of user's input is provided by the visualization interface that provides for the user, according to the page sequence number of appointment in second querying command and predetermined page size, calculate the set of the major key of specified page sequence number, the set of the described major key that calculates be added into second querying command.
16. the querying method of a database is characterized in that, comprising:
Receive first querying command that the user imports by the visualization interface that provides for the user, described first querying command comprises the filtercondition that needs data query; Send described first querying command to server; The list of primary keys that reception and display server return; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user; According to the sequence number of the page of described needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates described sequence number; Send second querying command to server, described second querying command comprises the sequence number of data item in temporary table of the page of described sequence number; Receive and the display server data corresponding that return with the page described sequence number.
17. according to the described method of claim 16, it is characterized in that, it is 1 that the sequence number of the data item in the temporary table adopts the Base Serial Number of serial number and first page, and the sequence number of the described page according to described needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates described sequence number comprise:
Calculate the inquiry of described sequence number the page sequence number and 1 difference again with the long-pending last of predetermined page size and 1 and as the start sequence number of the sequence number of described data item in temporary table, calculate the inquiry of described sequence number the page sequence number and predetermined page size amass end sequence number as the sequence number of described data item in temporary table, with described start sequence number to the sequence number section of described end sequence number as the sequence number of described data item in temporary table.
18. the querying method of a database is characterized in that, comprising:
To send to database from first querying command of client, described first querying command comprises the filtercondition that needs data query; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends, described second querying command comprises the sequence number of data item in temporary table of the page of the sequence number that needs inquire about; Send described second querying command to database; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the described sequence number that needs inquiry, and described data are sent to client.
19. the querying method of a database is characterized in that, comprising:
Receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, create the data that the temporary table storage finds, and to each data item editing sequence number; The list of primary keys that finds is sent to server; Receive second querying command; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of foundation reads the data corresponding with the page of described sequence number, and sends to server from described interim tabulation.
20., it is characterized in that the sequence number employing serial number of described data item and first page start sequence number are 1 according to the described method of claim 19;
The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of described foundation, read the data corresponding with the page of described sequence number and comprise from described interim tabulation:
According to the sequence number section that comprises in described second querying command, read described sequence number section all data item in interim tabulation as the data corresponding with the page of described sequence number.
21. a client is characterized in that, comprising:
The querying command receiving element is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user;
Computing unit is used for according to the data item of the sequence number of the page of described needs inquiry and the page that predetermined page size the calculates described sequence number sequence number at temporary table;
The querying command transmitting element sends described first querying command to server; Send second querying command to server, described second querying command comprises the sequence number of data item in temporary table of the page of described sequence number;
Receive display unit, be used to receive and list of primary keys that display server returns; Receive and the display server data corresponding that return with the page described sequence number.
22. according to the described client of claim 21, it is characterized in that, described computing unit, specifically be used for calculating described sequence number inquiry the page sequence number and 1 difference again with the long-pending last of predetermined page size and 1 and as the start sequence number of described data item in the sequence number of temporary table, calculate the inquiry of described sequence number the page sequence number and predetermined page size amass end sequence number as the sequence number of described data item in temporary table, with described start sequence number to the sequence number section of described end sequence number as the sequence number of described data item in temporary table.
23. a server is characterized in that, comprising:
The order retransmission unit is used for first querying command and second querying command from client are sent to database; Described first querying command comprises the filtercondition that needs data query; Described second querying command comprises the sequence number of data item in temporary table of the page of the sequence number of needs inquiries;
The data forwarding unit is used to receive database and uses the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the described sequence number that needs inquiry, and described data are sent to client.
24. a database is characterized in that, comprising:
The order receiving element is used to receive first querying command and second querying command;
Query unit is used for obtaining list of primary keys and data according to the filtercondition Query Database that described first querying command comprises; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of foundation reads the data corresponding with the page of described sequence number from described interim tabulation;
The table creating unit is used to create the data that the temporary table storage finds, and to each data item editing sequence number;
Transmitting element, the list of primary keys that is used for finding sends to server; With the corresponding data of the page described and described sequence number, send to server.
25., it is characterized in that the sequence number employing serial number of described data item and first page start sequence number are 1 according to the described database of claim 24;
Described query unit, the sequence number of data item in temporary table of the page of the sequence number that the needs that are used for comprising according to described second querying command are inquired about, reading the data corresponding with the page of described sequence number from described interim tabulation comprises: be used for the sequence number section that described second querying command of foundation comprises, read described sequence number section all data item in interim tabulation as the data corresponding with the page of described sequence number.
26. the inquiry system of a database is characterized in that, comprising:
Client is used for receiving first querying command that the user imports by the visualization interface that provides for the user, and described first querying command comprises the filtercondition that needs data query; Send described first querying command to server; The list of primary keys that reception and display server return; The sequence number of the page of the inquiry of user's input is provided by the visualization interface that provides for the user; According to the sequence number of the page of described needs inquiry and the sequence number of data item in temporary table of the page that predetermined page size calculates described sequence number; Send second querying command to server, described second querying command comprises the sequence number of data item in temporary table of the page of described sequence number; Receive and the display server data corresponding that return with the page described sequence number;
Server is used for first querying command from client is sent to database; Receive database and use the list of primary keys of returning after the described filtercondition inquiry; Described list of primary keys is sent to client; Receive second querying command that client sends, described second querying command comprises the sequence number of data item in temporary table of the page of the sequence number that needs inquire about; Send described second querying command to database; Receive database and use the data of returning after the sequence number inquiry of data item in temporary table of the page of the described sequence number that needs inquiry, and described data are sent to client;
Database is used to receive first querying command; According to the filtercondition Query Database that comprises in described first querying command, create the data that the temporary table storage finds, and to each data item editing sequence number; The list of primary keys that finds is sent to server; Receive second querying command; The sequence number of data item in temporary table of the page of the sequence number of the needs inquiry that comprises in described second querying command of foundation reads the data corresponding with the page of described sequence number, and sends to server from described interim tabulation.
27., it is characterized in that the sequence number employing serial number of the data item in the temporary table and first page Base Serial Number are 1 according to the described system of claim 26,
Described client is used for comprising in the sequence number of temporary table according to the sequence number of the page of described needs inquiry and the data item of the page that predetermined page size calculates described sequence number:
Be used for calculating described sequence number inquiry the page sequence number and 1 difference again with the long-pending last of predetermined page size and 1 and as the start sequence number of described data item in the sequence number of temporary table, calculate the inquiry of described sequence number the page sequence number and predetermined page size amass end sequence number as the sequence number of described data item in temporary table, with described start sequence number to the sequence number section of described end sequence number as the sequence number of described data item in temporary table;
Described database, the sequence number of data item in temporary table of the page of the sequence number that the needs that are used for comprising according to described second querying command are inquired about, read the data corresponding with the page of described sequence number and comprise from described interim tabulation:
Be used for the sequence number section that described second querying command of foundation comprises, read described sequence number section all data item in interim tabulation as the data corresponding with the page of described sequence number.
CN200910250679A 2009-12-14 2009-12-14 Query method and system of database, client side, server and database Pending CN101706819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910250679A CN101706819A (en) 2009-12-14 2009-12-14 Query method and system of database, client side, server and database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910250679A CN101706819A (en) 2009-12-14 2009-12-14 Query method and system of database, client side, server and database

Publications (1)

Publication Number Publication Date
CN101706819A true CN101706819A (en) 2010-05-12

Family

ID=42377044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910250679A Pending CN101706819A (en) 2009-12-14 2009-12-14 Query method and system of database, client side, server and database

Country Status (1)

Country Link
CN (1) CN101706819A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541927A (en) * 2010-12-30 2012-07-04 北京新媒传信科技有限公司 Method and device for realizing data cache
CN102682006A (en) * 2011-03-10 2012-09-19 珠海格力电器股份有限公司 Method and device for inquiring operation data of container air conditioner
CN102918538A (en) * 2011-01-13 2013-02-06 三菱电机株式会社 Network selection assistance method and network selection assistance device
CN104424258A (en) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 Multidimensional data query method and system, query server and column storage server
CN105446990A (en) * 2014-07-04 2016-03-30 阿里巴巴集团控股有限公司 Service data processing method and equipment
CN106528844A (en) * 2016-11-24 2017-03-22 腾讯科技(深圳)有限公司 Data request method and apparatus, and data storage system
WO2022161417A1 (en) * 2021-01-27 2022-08-04 华为技术有限公司 Data query method and apparatus, and device and storage medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541927A (en) * 2010-12-30 2012-07-04 北京新媒传信科技有限公司 Method and device for realizing data cache
CN102541927B (en) * 2010-12-30 2013-11-13 北京新媒传信科技有限公司 Method and device for realizing data cache
CN102918538A (en) * 2011-01-13 2013-02-06 三菱电机株式会社 Network selection assistance method and network selection assistance device
US9450827B2 (en) 2011-01-13 2016-09-20 Mitsubishi Electric Corporation Network selection supporting method and network selection supporting apparatus
CN102682006A (en) * 2011-03-10 2012-09-19 珠海格力电器股份有限公司 Method and device for inquiring operation data of container air conditioner
CN102682006B (en) * 2011-03-10 2015-10-07 珠海格力电器股份有限公司 The service data querying method of container air conditioner and device
CN104424258A (en) * 2013-08-28 2015-03-18 腾讯科技(深圳)有限公司 Multidimensional data query method and system, query server and column storage server
CN105446990A (en) * 2014-07-04 2016-03-30 阿里巴巴集团控股有限公司 Service data processing method and equipment
CN105446990B (en) * 2014-07-04 2019-03-08 阿里巴巴集团控股有限公司 A kind of business data processing method and equipment
CN106528844A (en) * 2016-11-24 2017-03-22 腾讯科技(深圳)有限公司 Data request method and apparatus, and data storage system
CN106528844B (en) * 2016-11-24 2019-07-05 腾讯科技(深圳)有限公司 A kind of data request method and device and data-storage system
WO2022161417A1 (en) * 2021-01-27 2022-08-04 华为技术有限公司 Data query method and apparatus, and device and storage medium

Similar Documents

Publication Publication Date Title
CN101706819A (en) Query method and system of database, client side, server and database
US8359318B2 (en) System and method for distributed index searching of electronic content
CN108255958A (en) Data query method, apparatus and storage medium
CN101996217A (en) Method for storing data and memory device thereof
US20070239713A1 (en) Identifying the items most relevant to a current query based on user activity with respect to the results of similar queries
US20090083338A1 (en) Synchronization of electronic postings
EP2344959A2 (en) Index compression in databases
CN104142958A (en) Storage method for data in Key-Value system and related device
CN107992492A (en) A kind of storage method of data block, read method, its device and block chain
WO2021047323A1 (en) Data operation method and apparatus, and system
CN104536908B (en) A kind of magnanimity small records efficient storage management method towards unit
US20070174764A1 (en) Data Collection
CN102902763A (en) Method and device for relating and retrieving information processing data and processing information tasks
CN102622434A (en) Data storage method, data searching method and device
CN108228663A (en) A kind of paging search method and device
CN110503352A (en) A kind of method, apparatus and computer readable storage medium of determining delivery point
CN103688513A (en) Content sharing method and Social Synchronizing Apparatus
CN109636485A (en) Information recommendation method and device based on driving behavior data
CN101393551B (en) Index establishing system and method for patent full text search
CN103885721A (en) Data storing or reading method and device for key-value system
CN1869977A (en) Retrieval system and method
CN103841168B (en) Data trnascription update method and meta data server
US8959248B2 (en) Personal computing environment with virtual computing device
CN105893396A (en) Interpreting user queries based on nearby locations
US7392268B2 (en) Systems and methods for partitioning data on multiple servers

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: 20100512