CN104391923A - Data set query method and apparatus - Google Patents

Data set query method and apparatus Download PDF

Info

Publication number
CN104391923A
CN104391923A CN201410667802.8A CN201410667802A CN104391923A CN 104391923 A CN104391923 A CN 104391923A CN 201410667802 A CN201410667802 A CN 201410667802A CN 104391923 A CN104391923 A CN 104391923A
Authority
CN
China
Prior art keywords
sql
service
query
sql statement
statement
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
CN201410667802.8A
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201410667802.8A priority Critical patent/CN104391923A/en
Publication of CN104391923A publication Critical patent/CN104391923A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation

Landscapes

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

Abstract

The embodiment of the invention discloses a data set query method and apparatus. The method includes the steps of obtaining a SQL (Structured Query Language) statement for data set querying, pre-processing the SQL statement to generate a pre-processed SQL statement, performing legitimacy analysis on the pre-processed SQL statement, sending illegitimacy information when the pre-processed SQL statement is illegitimate, splitting the pre-processed SQL statement into at least one SQL key field when the pre-processed SQL statement is legitimate, performing the querying operation corresponding to the SQL key field in the data set to obtain a query result, and sending back the query result. By means of the technical scheme, the data set query method and apparatus achieves data set querying through the SQL statement, thereby improving the versatility of the query of multiple data sets, simplifying the operation of data set querying and being capable of easily achieving the operation of query, filter and statistics for locally-cached data sets.

Description

A kind of method of data query collection and device
Technical field
The embodiment of the present invention relates to data query technique field, particularly relates to a kind of method and device of data query collection.
Background technology
Along with the development of informationization technology and the development of data management technique, Database Systems more and more become an indispensable comprising modules in computer utility.Database Systems make computer utility be main being converted into based on data processing from scientific algorithm, and make computing machine be able to generally should use in all trades and professions.
There is provided in data query service process in usage data storehouse, in order to improve data base querying access performance, reduce database disk read-write visit capacity, a conventional way is exactly the data centralization of Query Result from database caches to this locality when inquiring about first, thereafter follow-up to Query Result first query filter statistical operation all carries out for being buffered in local data set, and no longer connection data storehouse operates.But be that particular code by writing for data set realizes to the query manipulation of data set.
The technological deficiency that above-mentioned prior art exists is: adopt specific code to realize to the inquiry being buffered in local data set, cause the query filter statistical operation of the data set to local cache very inconvenient, and, when needs are inquired about multiple data set, the particular code workload of writing data query collection is large, query manipulation is more complicated also, is inconvenient to realize carrying out query filter statistical operation to being buffered in local data set.
Summary of the invention
The embodiment of the present invention provides a kind of method and device of data query collection, to improve being buffered in the versatility of local data set inquiry and simplicity.
First aspect, embodiments provide a kind of method of data query collection, the method comprises:
Obtain the SQL statement being used for data query collection;
Pre-service is carried out to described SQL statement, SQL statement after generation pre-service;
Legitimacy analysis is carried out to SQL statement after described pre-service, when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out;
When SQL statement is legal statement after described pre-service, SQL statement after described pre-service is split at least one SQL critical field;
The query manipulation corresponding with described SQL critical field is performed, to obtain Query Result in described data centralization;
Return described Query Result.
Second aspect, the embodiment of the present invention additionally provides a kind of device of data query collection, and this device comprises:
Acquiring unit, for obtaining the SQL statement for data query collection;
Pretreatment unit, for carrying out pre-service to described SQL statement, SQL statement after generation pre-service;
Analytic unit, for carrying out legitimacy analysis to SQL statement after described pre-service, and when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out;
Split cells, for when SQL statement is legal statement after described pre-service, splits at least one SQL critical field by SQL statement after described pre-service;
Query unit, for performing the query manipulation corresponding with described SQL critical field, to obtain Query Result in described data centralization;
Return unit, for returning described Query Result.
The technical scheme that the embodiment of the present invention provides, first the SQL statement being used for data query collection is obtained, then pre-service and legitimacy analysis are carried out to described SQL statement, when SQL statement is legal statement, SQL statement is become critical field according to key word split, the query manipulation corresponding with described SQL critical field is performed in data centralization, to obtain Query Result, finally Query Result is stored into Query Result to concentrate, realize not needing to write the particular code for data set inquiry to the inquiry of data set by SQL statement, improve the versatility that multiple data set is inquired about, and simplify the operation of data query collection, can realize more easily carrying out query filter statistical operation to being buffered in local data set.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the method for a kind of data query collection that the embodiment of the present invention one provides;
Fig. 2 is the schematic flow sheet of the method for a kind of data query collection that the embodiment of the present invention two provides;
Fig. 3 is the structural representation of the querying condition syntax tree involved by method of a kind of data query collection that the embodiment of the present invention two provides;
Fig. 4 is the structural representation of the device of a kind of data query collection that the embodiment of the present invention three provides.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not entire infrastructure.
Embodiment one
Fig. 1 is the schematic flow sheet of the method for a kind of data query collection that the embodiment of the present invention one provides.The method can be performed by the device of data query collection, and described device is realized by software.See Fig. 1, the method for the data query collection that the present embodiment provides specifically comprises following operation:
Operate S110, obtain the SQL statement being used for data query collection.
Traditional normally adopts particular code to realize to the query manipulation being buffered in local data set, does not have versatility, and carries out query filter statistical operation complexity to being buffered in local data set.For this reason, the present embodiment can use SQL statement to carry out the data set of query caching in this locality, improves the versatility of local cache data collection query filter statistical operation and simplicity.
In the present embodiment, obtain the SQL statement being used for data query collection, can be specially:
To for the functional module of management database or electronic equipment, initiate inquiry request first;
Obtain the SQL statement being used for the functional module of management database or electronic equipment and obtaining according to inquiry request first, and data set accordingly, and this data set is buffered in this locality.
Operate S120, pre-service is carried out to described SQL statement, SQL statement after generation pre-service.
In this operation, carrying out pre-service to SQL statement can for following operation: the multiple line statement in SQL statement is replaced to single file, and mainly by being replaced with carriage return character (a) and newline (n), space realizes for this; By in SQL statement Tab key (t) replace to space; The continuous space comprised in SQL statement is replaced to single space; SQL reserved character string in SQL statement is all become lowercase versions, and SQL reserved character string has where, select, from, group by, order by, asc, desc, like, min, max, avg, sum, count etc.After pre-service is carried out to SQL statement, obtain SQL statement after pre-service.
Operate S130, legitimacy analysis is carried out to SQL statement after described pre-service, when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out.
In this operation, carrying out legitimacy analysis to SQL statement after the pre-service obtained after pre-service can be following operation:
The spelling correctness of SQL reserved character string in SQL statement is judged;
The combination correctness of SQL reserved character string is judged;
Whether single quotation marks in SQL statement is judged in pairs;
Whether double quotation marks in SQL statement is judged in pairs;
Whether SQL statement bracket is judged in pairs;
Field name correctness in SQL statement is judged; Preferably, field name f adds a numeral composition, and numeral is the position of this field in data set record, and first is 1, is thereafter 2,3,4, the like, if field name meets this naming rule, then name is correct, otherwise naming errors;
The legitimacy of the value string length of SQL statement conditional field is judged; Preferably, the maximum length of each value character string is 1024 characters, and minimum length is 1 character, so the value string length of SQL statement conditional field is legal critical field between 1 ~ 1024 character, otherwise illegal.
Carrying out in the process of legitimacy analysis SQL statement, once find that SQL statement exists illegal problem, subsequent operation will no longer be carried out, and by dishing out, legitimacy abnormal information provides abnormal prompt.
Operate S140, when SQL statement is legal statement after described pre-service, SQL statement after described pre-service split at least one SQL critical field.
SQL statement splits by the present embodiment, SQL statement is split at least one critical field.Critical field can be select section, from section, where section, groupby section, having section, orderby section, can extract easily to process which data set of this ground, inquire about and meet which condition, point set condition, screening conditions, sort criteria and return the result set etc. comprising which field after fractionation.
Operate S150, perform the query manipulation corresponding with described SQL critical field, to obtain Query Result in described data centralization.
Operate S160, return described Query Result.
It should be noted that, the present embodiment is only to be illustrated the query manipulation of data set, in addition, identical to principle of operation such as the filtering statistical of data set.
First the present embodiment obtains the SQL statement for data query collection, then pre-service is carried out to described SQL statement and obtain SQL statement after pre-service, legitimacy analysis is carried out to SQL statement after pre-service, when SQL statement after pre-service is legal statement, SQL statement after pre-service is become critical field according to key word split, the query manipulation corresponding with described SQL critical field is performed in data centralization, to obtain Query Result, finally Query Result is stored into Query Result to concentrate, realize not needing to write the particular code for data set inquiry to the inquiry of data set by SQL statement, improve the versatility that multiple data set is inquired about, simplify the operation of data query collection, can realize more easily carrying out query filter statistical operation to being buffered in local data set.
Embodiment two
Fig. 2 is the schematic flow sheet of the method for a kind of data query collection that the embodiment of the present invention two provides.The present embodiment, on the basis of above-described embodiment one, is optimized its operation S140 and operation S150.See Fig. 2, the method for the data query collection that the present embodiment provides specifically comprises following operation:
Operate S210, obtain the SQL statement being used for data query collection.
Operate S220, pre-service is carried out to described SQL statement, SQL statement after generation pre-service.
Operate S230, legitimacy analysis is carried out to SQL statement after described pre-service, when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out.
Operation S241, judge described pre-service after SQL statement whether be nested SQL statements.
After determining pre-service, SQL statement is split and query manipulation SQL statement after pre-service after legal statement, before fractionation and query manipulation, after first judging pre-service, whether SQL statement is nested SQL statements, if SQL statement is nested SQL statements after pre-service, and executable operations S242, operation S251 and operation S260 successively; If SQL statement is not nested SQL statements after pre-service, executable operations S243, operation S252 and operation S260 successively.
Operate S242, SQL statement after described pre-service is split into corresponding SQL substatement from inside to outside successively according to the level of nesting, and described SQL substatement is successively split into SQL critical field successively according to key word.
When after described pre-service, SQL statement is nested SQL statements, two steps are comprised to the fractured operation of SQL statement after pre-service: the first step realizes the fractionation of nested SQL statements nest relation, the SQL statement with nest relation progressively can perform outermost layer from nest relation layer innermost layer when subsequent query, splits into corresponding SQL substatement from inside to outside successively accordingly to nested SQL statements according to the level of nesting.Second step realizes the fractionation of SQL clause to SQL section, and successively split into SQL critical field successively by SQL substatement according to key word, SQL critical field can be select section, from section, where section, groupby section, having section, orderby section etc.Can extract easily after fractionation and which data set of this ground is processed, inquire about and meet which condition, point set condition, screening conditions, sort criteria and return the result set comprising which field.
In order to the process that clearer explanation nested SQL statements splits, be first illustrated.Such as, after pre-service, SQL statement is nested statement A: " select f1, f3 from (select f1, f2, f3 from t1 wheref2=beijing or f3=beijing) where f1=010 order by f3 desc ".
The first step, realizes the fractionation of nested SQL statements nest relation, and after pre-service, SQL statement A is split into SQL clause A1 and SQL clause A2, and wherein A1 is: " select f1, f3 from A2 where f1=010order by f3 desc "; A2 is: " select f1, f2, f3 from t1 where f2=beijing or f3=Beijing ".
Second step, splits into SQL critical field by SQL clause A1 and SQL clause A2, will split into for SQL clause A2: critical field select f1, f2, f3; Critical field from t1; Critical field wheref2=beijing or f3=Beijing.To split into for SQL clause A1: critical field select f1, f3; Critical field from A2; Critical field where f1=010; Critical field order by f3 desc.
Operate S243, SQL statement after described pre-service is successively split into SQL critical field successively according to key word.
When SQL statement is not nested SQL statements after described pre-service, directly SQL statement after pre-service is successively split into SQL critical field successively according to key word.
Operation S251, according to level of nesting order from inside to outside and the sequencing of each SQL critical field that presets, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization.
Here, the sequencing of each SQL critical field preset is the order that in operation S242, SQL clause splits into SQL critical field.To the query manipulation of SQL statement after pre-service, SQL clause's query manipulation can be progressively performed from innermost layer to outermost layer according to SQL statement nest relation, the inquiry of each SQL clause comprises again the inquiry to each SQL critical field in SQL clause, first can carry out the inquiry of SQL clause A2 when performing inquiry, after being finished, performing the inquiry of SQL clause A1 again.
As a kind of embodiment, the sequencing of each SQL critical field preset is followed successively by: from section, where section, group by section, having section, order by section and select section.Then following step can be divided into perform the inquiry of SQL critical field in SQL clause: the first step obtains the data set of inquiry by analyzing from section; Second step obtains querying condition by analyzing where section, screens data set; 3rd step obtains packet situation by analyzing group by section, carries out division operation to the result data of second step; 4th step, by analyzing aggregate function, carries out computing to the result of the 3rd step; 5th step obtains screening grouping situation by analyzing having section, carries out screening packet transaction to the result of the 4th step; 6th step sorts to result set by analyzing order by section, comprises ASC (ascending order) and DESC (descending) two kinds to result set sequence; 7th step is undertaken exporting by regulation field by analyzing the result of select section to the 6th step.
Operation S252, sequencing according to each SQL critical field preset, perform the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service, to obtain Query Result successively in described data centralization.
When after described pre-service, SQL statement is not nested SQL statements, directly according to the sequencing of each SQL critical field preset, perform the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service successively in described data centralization, and obtain Query Result.
Operate S260, return described Query Result.
The present embodiment one preferred embodiment in, perform the inquiry corresponding with SQL critical field conditional field in described data centralization and can adopt following operation:
Obtain the querying condition of SQL critical field conditional field, and according to described querying condition generated query condition syntax tree;
According to described querying condition syntax tree, perform the query manipulation corresponding with described condition field in described data centralization.
In above-mentioned preferred implementation, be specially according to querying condition generated query condition syntax tree: convert query expression corresponding for querying condition to querying condition syntax tree.Such as, the querying condition B of certain condition field is (f2=beijing or f3<=4) and (f2=shanghai or f3<6 or f4>2), then querying condition B is converted into condition syntax tree as shown in Figure 3.To when performing the query manipulation corresponding with condition field, from the leaf of querying condition syntax tree, progressively search query term, and call corresponding query function execution query manipulation.The query term of the present embodiment refers to the subtree only comprising leaf in a querying condition syntax tree.A query term, after executing query manipulation, can replace with a leaf its rreturn value of this query term.
Querying condition syntax tree as shown in Figure 3, first the query manipulation of f2=Beijing, f3<=4, f2=shanghai, f3<6, f4>2 is performed, then these 5 query terms in querying condition syntax tree are replaced with the Query Result of gained, secondly two or query terms of the second layer can be performed, then replace these two query terms in querying condition syntax tree with Query Result, finally perform the and query term of ground floor.Wherein function can for being greater than query function, be less than query function, equal query function, be less than or equal to query function, be more than or equal to query function, like query function, between query function, and query function, or query function, not query function.
First the present embodiment obtains the SQL statement for data query collection, then pre-service is carried out to described SQL statement and obtain SQL statement after pre-service, legitimacy analysis is carried out to SQL statement after pre-service, when SQL statement after pre-service is legal statement, after judging pre-service, whether SQL statement is nested SQL statements, if SQL statement is nested SQL statements after pre-service, first according to nest relation, SQL statement after pre-service is split into SQL clause, again SQL clause is split into SQL critical field, otherwise directly SQL statement after pre-service is split into SQL critical field, which SQL statement after splitting can be extracted easily to data set operate, and inquire about satisfied condition and return the result set comprising which field, secondly, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively in described data centralization, to obtain Query Result, finally, Query Result is stored in result set.Realize not needing to write the particular code for data set inquiry to the inquiry of data set by SQL statement, improve the versatility that multiple data set is inquired about, and simplify the operation of data query collection, can realize more easily carrying out query filter statistical operation to being buffered in local data set.
Embodiment three
Fig. 4 is the structural representation of the device of a kind of data query collection that the embodiment of the present invention three provides.See Fig. 4, the concrete structure of this device is as follows:
Acquiring unit 401, for obtaining the SQL statement for data query collection;
Pretreatment unit 402, for carrying out pre-service to described SQL statement, SQL statement after generation pre-service;
Analytic unit 403, for carrying out legitimacy analysis to SQL statement after described pre-service, and when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out;
Split cells 404, for when SQL statement is legal statement after described pre-service, splits at least one SQL critical field by SQL statement after described pre-service;
Query unit 405, for performing the query manipulation corresponding with described SQL critical field, to obtain Query Result in described data centralization;
Return unit 406, for returning described Query Result.
Whether further, described split cells 404 also comprises: judgment sub-unit 4041, be nested SQL statements for SQL statement after judging described pre-service;
First splits subelement 4042, for when after described pre-service, SQL statement is nested SQL statements, SQL statement after described pre-service is split into corresponding SQL substatement from inside to outside successively according to the level of nesting, and described SQL substatement is successively split into SQL critical field successively according to key word;
Second splits subelement 4043, for when SQL statement is not nested SQL statements after described pre-service, SQL statement after described pre-service is successively split into SQL critical field successively according to key word.
Further, described query unit specifically for:
When after described pre-service, SQL statement is nested SQL statements, according to level of nesting order from inside to outside and the sequencing of each SQL critical field that presets, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization;
When after described pre-service, SQL statement is not nested SQL statements, according to the sequencing of each SQL critical field preset, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization.
Further, SQL critical field comprises condition field; Described query unit comprises condition query subelement, for: the querying condition obtaining SQL critical field conditional field, and according to querying condition generated query condition syntax tree;
According to described querying condition syntax tree, perform the query manipulation corresponding with described condition field in described data centralization.
The said goods can perform the method that any embodiment of the present invention provides, and possesses the corresponding functional module of manner of execution and beneficial effect.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (8)

1. a method for data query collection, is characterized in that, comprising:
Obtain the SQL statement being used for data query collection;
Pre-service is carried out to described SQL statement, SQL statement after generation pre-service;
Legitimacy analysis is carried out to SQL statement after described pre-service, when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out;
When SQL statement is legal statement after described pre-service, SQL statement after described pre-service is split at least one SQL critical field;
The query manipulation corresponding with described SQL critical field is performed, to obtain Query Result in described data centralization;
Return described Query Result.
2. the method for data query collection according to claim 1, is characterized in that, when SQL statement is legal statement after described pre-service, SQL statement after described pre-service is split at least one SQL critical field, comprising:
After judging described pre-service, whether SQL statement is nested SQL statements;
When after described pre-service, SQL statement is nested SQL statements, SQL statement after described pre-service is split into corresponding SQL substatement from inside to outside successively according to the level of nesting, and described SQL substatement is successively split into SQL critical field successively according to key word;
When SQL statement is not nested SQL statements after described pre-service, SQL statement after described pre-service is successively split into SQL critical field successively according to key word.
3. the method for data query collection according to claim 2, is characterized in that, performs the query manipulation corresponding with described SQL critical field, to obtain Query Result, comprising in described data centralization:
When after described pre-service, SQL statement is nested SQL statements, according to level of nesting order from inside to outside and the sequencing of each SQL critical field that presets, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization;
When after described pre-service, SQL statement is not nested SQL statements, according to the sequencing of each SQL critical field preset, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization.
4. the method for data query collection according to claim 3, is characterized in that, SQL critical field comprises condition field;
Perform the query manipulation corresponding with described condition field in described data centralization, comprising:
Obtain the querying condition of SQL critical field conditional field, and according to described querying condition generated query condition syntax tree;
According to described querying condition syntax tree, perform the query manipulation corresponding with described condition field in described data centralization.
5. a device for data query collection, is characterized in that, comprising:
Acquiring unit, for obtaining the SQL statement for data query collection;
Pretreatment unit, for carrying out pre-service to described SQL statement, SQL statement after generation pre-service;
Analytic unit, for carrying out legitimacy analysis to SQL statement after described pre-service, and when after described pre-service, SQL statement is illegal statement, information unauthorized of dishing out;
Split cells, for when SQL statement is legal statement after described pre-service, splits at least one SQL critical field by SQL statement after described pre-service;
Query unit, for performing the query manipulation corresponding with described SQL critical field, to obtain Query Result in described data centralization;
Return unit, for returning described Query Result.
6. the device of data query collection according to claim 5, is characterized in that, described split cells comprises:
Whether judgment sub-unit is nested SQL statements for SQL statement after judging described pre-service;
First splits subelement, for when after described pre-service, SQL statement is nested SQL statements, SQL statement after described pre-service is split into corresponding SQL substatement from inside to outside successively according to the level of nesting, and described SQL substatement is successively split into SQL critical field successively according to key word;
Second splits subelement, for when SQL statement is not nested SQL statements after described pre-service, SQL statement after described pre-service is successively split into SQL critical field successively according to key word.
7. the device of data query collection according to claim 6, is characterized in that, described query unit specifically for:
When after described pre-service, SQL statement is nested SQL statements, according to level of nesting order from inside to outside and the sequencing of each SQL critical field that presets, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization;
When after described pre-service, SQL statement is not nested SQL statements, according to the sequencing of each SQL critical field preset, the query manipulation corresponding with each SQL critical field in SQL statement after described pre-service is performed successively, to obtain Query Result in described data centralization.
8. the device of data query collection according to claim 7, is characterized in that, SQL critical field comprises condition field;
Described query unit comprises condition query subelement, for: the querying condition obtaining SQL critical field conditional field, and according to querying condition generated query condition syntax tree;
According to described querying condition syntax tree, perform the query manipulation corresponding with described condition field in described data centralization.
CN201410667802.8A 2014-11-20 2014-11-20 Data set query method and apparatus Pending CN104391923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410667802.8A CN104391923A (en) 2014-11-20 2014-11-20 Data set query method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410667802.8A CN104391923A (en) 2014-11-20 2014-11-20 Data set query method and apparatus

Publications (1)

Publication Number Publication Date
CN104391923A true CN104391923A (en) 2015-03-04

Family

ID=52609827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410667802.8A Pending CN104391923A (en) 2014-11-20 2014-11-20 Data set query method and apparatus

Country Status (1)

Country Link
CN (1) CN104391923A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798026A (en) * 2016-09-05 2018-03-13 北京京东尚科信息技术有限公司 Data query method and apparatus
CN108256080A (en) * 2018-01-19 2018-07-06 深圳市富途网络科技有限公司 A kind of method and system using python grammatical and semantics structure complexity sql sentences
CN110222071A (en) * 2019-06-06 2019-09-10 上海达梦数据库有限公司 A kind of data query method, apparatus, server and storage medium
CN110413642A (en) * 2019-08-02 2019-11-05 北京快立方科技有限公司 A kind of parsing of fragment data library and optimization method using unaware
CN110795101A (en) * 2019-09-18 2020-02-14 平安科技(深圳)有限公司 SQL code information display method and device, computer device and storage medium
CN111090671A (en) * 2019-12-19 2020-05-01 山大地纬软件股份有限公司 Method and device for eliminating difference between hollow character string and invalid character string in database
CN112052255A (en) * 2020-09-02 2020-12-08 福建天晴在线互动科技有限公司 SQL (structured query language) interpretation method and device for splitting multi-table slow query from top to bottom

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464434A (en) * 2002-06-26 2003-12-31 联想(北京)有限公司 Method for realizing modular query language interpreter in the flush type data base system
CN101021874A (en) * 2007-03-21 2007-08-22 金蝶软件(中国)有限公司 Method and apparatus for optimizing request to poll SQL
CN101271473A (en) * 2008-04-29 2008-09-24 华为技术有限公司 Data query method, device and system
CN101404027A (en) * 2008-10-30 2009-04-08 宇龙计算机通信科技(深圳)有限公司 File management method, system and equipment
CN102402615A (en) * 2011-12-22 2012-04-04 哈尔滨工程大学 Method for tracking source information based on structured query language (SQL) sentences
CN102521254A (en) * 2011-11-17 2012-06-27 广东电网公司电力科学研究院 Uniform access method of isomeric database
CN103310011A (en) * 2013-07-02 2013-09-18 曙光信息产业(北京)有限公司 Analytical method for data query under cluster database system environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464434A (en) * 2002-06-26 2003-12-31 联想(北京)有限公司 Method for realizing modular query language interpreter in the flush type data base system
CN101021874A (en) * 2007-03-21 2007-08-22 金蝶软件(中国)有限公司 Method and apparatus for optimizing request to poll SQL
CN101271473A (en) * 2008-04-29 2008-09-24 华为技术有限公司 Data query method, device and system
CN101404027A (en) * 2008-10-30 2009-04-08 宇龙计算机通信科技(深圳)有限公司 File management method, system and equipment
CN102521254A (en) * 2011-11-17 2012-06-27 广东电网公司电力科学研究院 Uniform access method of isomeric database
CN102402615A (en) * 2011-12-22 2012-04-04 哈尔滨工程大学 Method for tracking source information based on structured query language (SQL) sentences
CN103310011A (en) * 2013-07-02 2013-09-18 曙光信息产业(北京)有限公司 Analytical method for data query under cluster database system environment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798026A (en) * 2016-09-05 2018-03-13 北京京东尚科信息技术有限公司 Data query method and apparatus
CN108256080A (en) * 2018-01-19 2018-07-06 深圳市富途网络科技有限公司 A kind of method and system using python grammatical and semantics structure complexity sql sentences
CN110222071A (en) * 2019-06-06 2019-09-10 上海达梦数据库有限公司 A kind of data query method, apparatus, server and storage medium
CN110413642A (en) * 2019-08-02 2019-11-05 北京快立方科技有限公司 A kind of parsing of fragment data library and optimization method using unaware
CN110413642B (en) * 2019-08-02 2022-05-27 北京快立方科技有限公司 Application-unaware fragmentation database parsing and optimizing method
CN110795101A (en) * 2019-09-18 2020-02-14 平安科技(深圳)有限公司 SQL code information display method and device, computer device and storage medium
CN110795101B (en) * 2019-09-18 2024-01-30 平安科技(深圳)有限公司 SQL code information display method, device, computer device and storage medium
CN111090671A (en) * 2019-12-19 2020-05-01 山大地纬软件股份有限公司 Method and device for eliminating difference between hollow character string and invalid character string in database
CN112052255A (en) * 2020-09-02 2020-12-08 福建天晴在线互动科技有限公司 SQL (structured query language) interpretation method and device for splitting multi-table slow query from top to bottom

Similar Documents

Publication Publication Date Title
CN104391923A (en) Data set query method and apparatus
CN107451214B (en) Non-primary key query method and distributed NewSQL database system
US8965918B2 (en) Decomposed query conditions
US20220365957A1 (en) Log parsing method and device, server and storage medium
CN105320679B (en) A kind of tables of data indexed set symphysis is at method and device
US9342553B1 (en) Identifying distinct combinations of values for entities based on information in an index
US8874547B2 (en) Parameter-sensitive plans
EP3285178A1 (en) Data query method in crossing-partition database, and crossing-partition query device
US9639767B2 (en) Context-aware handwriting recognition for application input fields
US9524318B2 (en) Minimizing result set size when converting from asymmetric to symmetric requests
CN107783985B (en) Distributed database query method, device and management system
CN103064875A (en) Distributed query method of spatial service data
CN102184222A (en) Quick searching method in large data volume storage
KR102368775B1 (en) Method, apparatus, device and storage medium for managing index
CN106777343A (en) increment distributed index system and method
CN110362593B (en) Data query method, device, equipment and storage medium
US20220358178A1 (en) Data query method, electronic device, and storage medium
CN104636502A (en) Accelerated data query method of query system
CN101000608A (en) Key word dynamic matching generating based on search engine technology
US9053207B2 (en) Adaptive query expression builder for an on-demand data service
CN110069523A (en) A kind of data query method, apparatus and inquiry system
US20110302220A1 (en) Sql processing for data conversion
CN105302909B (en) Network security log system big data search method based on subregion calculations of offset
Zhang et al. A hot spot clustering method based on improved kmeans algorithm
CN104123354A (en) Query optimization method based on MySOL database

Legal Events

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

Application publication date: 20150304