CN110019291A - A kind of SQL analytic method and SQL resolver - Google Patents

A kind of SQL analytic method and SQL resolver Download PDF

Info

Publication number
CN110019291A
CN110019291A CN201710787134.6A CN201710787134A CN110019291A CN 110019291 A CN110019291 A CN 110019291A CN 201710787134 A CN201710787134 A CN 201710787134A CN 110019291 A CN110019291 A CN 110019291A
Authority
CN
China
Prior art keywords
sql
stream
character data
data stream
rule
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
CN201710787134.6A
Other languages
Chinese (zh)
Inventor
郭岳
潘宇虹
唐小丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710787134.6A priority Critical patent/CN110019291A/en
Publication of CN110019291A publication Critical patent/CN110019291A/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/242Query formulation
    • G06F16/2433Query languages
    • 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/2453Query optimisation

Abstract

The embodiment of the present invention provides a kind of SQL analytic method and SQL resolver, which comprises according to source structure query language SQL statement to be resolved and its corresponding SQL type, generates the character data stream for having SQL type label;According to found based on the SQL type label with the matched morphological rule of the character data stream and syntax rule, the character data stream is parsed into corresponding syntax notation stream;According to the grammatical representation formula of each grammatical phrases in the syntax notation stream, corresponding abstract syntax tree is generated;The abstract syntax tree is converted into the output stream with the output type of the corresponding configuration of the source SQL statement, and is exported.Using scheme provided in an embodiment of the present invention, the parsing of the SQL statement of a variety of SQL types can be supported, expand the scope of application, improve flexibility and scalability.

Description

A kind of SQL analytic method and SQL resolver
Technical field
The present embodiments relate to database technical field more particularly to a kind of SQL analytic methods and SQL resolver.
Background technique
With information-based fast-developing, database using more and more common.SQL(Structured Query Language, structured query language) it is the operation commands set for aiming at database and establishing, it is a kind of multiple functional database Language.When using it, it is only necessary to issue the order of " what does ", " how doing " is not have to user to consider.SQL function is strong Greatly, easy to learn, easy to use, have become the basis of database manipulation, and almost all of database props up now Hold SQL.
Currently, the most of work executed on the database is all completed by SQL statement.In order to execute SQL statement, need into The parsing of row SQL statement, the generation of logic executive plan, a whole set of process such as generation of physics executive plan.
Existing SQL resolver is generally all high to be coupled in large-scale project, and is usually configured in large-scale project single The database general specification of type, therefore, existing SQL resolver are typically only capable to support the SQL solution of the database of single type Analysis, i.e. parsing function are for a certain certain types of SQL statement.Moreover, existing SQL resolver is usually by SQL statement Morphological rule library, syntax rule library needed for parsing, abstract syntax tree parsing relationship etc. are embedded in program code, and function is solid It is fixed, it can not be modified in application level.In this way, when facing the parsing demand of different types of SQL statement, existing SQL parsing Device is unable to satisfy the demand, and flexibility is poor, narrow application range.
Summary of the invention
In view of drawbacks described above in the prior art or deficiency, it is intended to provide a kind of SQL analytic method and SQL resolver, energy The parsing for enough supporting the SQL statement of various database types, expands the scope of application of SQL resolver, improves flexibility and can expand Malleability.
In a first aspect, the embodiment of the invention provides a kind of SQL analytic methods, comprising:
According to source structure query language SQL statement to be resolved and its corresponding SQL type, generates and have SQL type The character data stream of label;
According to the matched morphological rule of the character data stream and syntax rule, the character data stream is parsed into pair The syntax notation stream answered;
According to the grammatical representation formula of each grammatical phrases in the syntax notation stream, corresponding abstract syntax tree is generated;
The abstract syntax tree is converted into the output data with the output type of the corresponding configuration of the source SQL statement Stream, and export.
Second aspect, the embodiment of the invention also provides a kind of SQL resolvers, comprising:
Polymorphic type input interface module, for according to source structure query language SQL statement to be resolved and its corresponding SQL type generates the character data stream for having SQL type label;
SQL parsing module, for basis and the matched morphological rule of the character data stream and syntax rule, by the word Parsing of the data stream is accorded with into corresponding syntax notation stream;It is raw according to the grammatical representation formula of each grammatical phrases in the syntax notation stream At corresponding abstract syntax tree;
Polymorphic type output interface module, for the abstract syntax tree to be converted into, there is the source SQL statement correspondence to match The output stream for the output type set, and export.
The third aspect, the embodiment of the invention also provides a kind of electronic equipment, including processor, memory and bus, In:
The processor, the memory complete mutual communication by bus;
The processor can call the computer program in memory, to execute above-mentioned first aspect embodiment offer The step of SQL analytic method.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer The step of program, the SQL analytic method that realization such as above-mentioned first aspect embodiment provides when which is executed by processor.
In SQL analytic method and SQL resolver provided in an embodiment of the present invention, propose for it is received it is different types of to The source SQL statement of parsing can generate the character for having SQL type label according to source SQL statement and its corresponding SQL type Data flow;Then, according to the matched morphological rule of character data stream and syntax rule, character data stream is subjected to parsing generation Corresponding abstract syntax tree, to realize the parsing of different types of SQL statement;Furthermore, it is possible to which abstract syntax tree is converted into Output stream and output with the corresponding output type configured of source SQL statement are improved with meeting different output demands The flexibility and the scope of application of SQL resolver.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 shows the exemplary process diagram of SQL analytic method according to an embodiment of the invention;
Fig. 2 shows the exemplary process diagrams of SQL analytic method in accordance with another embodiment of the present invention;
Fig. 3 shows the exemplary process diagram of the SQL analytic method of another embodiment according to the present invention;
Fig. 4 shows the structural schematic diagram of SQL resolver according to an embodiment of the invention;
Fig. 5 shows the structural schematic diagram of SQL resolver in accordance with another embodiment of the present invention;
Fig. 6 shows the structural schematic diagram of SQL parsing module according to an embodiment of the invention;
Fig. 7 shows the entity structure schematic diagram of electronic equipment according to an embodiment of the invention.
Specific embodiment
Clear, complete description is carried out to technical solution of the present invention below with reference to attached drawing, it is clear that described implementation Example is only a part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is general Logical technical staff obtained all other embodiment without making creative work belongs to the present invention and is protected The range of shield.
The terms such as " module " used in this application, " device " be intended to include with computer-related entity, such as it is but unlimited In hardware, firmware, combination thereof, software or software in execution.For example, module can be, and it is not limited to: processing Process, processor, object, executable program, the thread of execution, program and/or the computer run on device.For example, it counts Calculating the application program run in equipment and this calculating equipment can be module.One or more modules can be located in execution In one process and/or thread, a module can also be located on a computer and/or be distributed in two or more calculating Between machine.
As mentioned in the background, existing SQL resolver can only support the SQL of single type to parse, Wu Faman The parsing demand of the different types of SQL statement of foot.Therefore, in view of the drawbacks described above of the prior art, the embodiment of the invention provides A kind of SQL resolver can preset polymorphic type input interface, polymorphic type output interface and based on distinct type data-base The corresponding morphological rule library of the different SQL types of SQL specification setting and syntax rule library.
In this way, different types of source SQL language to be resolved can be received by a polymorphic type input interface of setting Sentence generates the character data stream of unified format, that is, has SQL according to source SQL statement to be resolved and its corresponding SQL type The character data stream of type label;Then, according to SQL type label, from the corresponding word of pre-set difference SQL type The matched morphological rule of SQL type label and syntax rule with source SQL statement are found out in method rule base and syntax rule library, According to the morphological rule and syntax rule found out, character data stream is parsed into corresponding syntax notation stream;And according to grammer The grammatical representation formula of each grammatical phrases, generates corresponding abstract syntax tree in mark stream;It is connect finally, can be exported by polymorphic type Abstract syntax tree is converted into output type and the output of the corresponding configuration of source SQL statement by mouth.Compared to existing SQL resolver, originally The SQL parsing scheme that inventive embodiments provide can support the parsing of the SQL statement of polymorphic type, expand being applicable in for SQL resolver Range.
The technical solution that the invention will now be described in detail with reference to the accompanying drawings.
With reference to Fig. 1, it illustrates the exemplary process diagrams of SQL analytic method according to an embodiment of the invention.
The executing subject of SQL analytic method shown in Fig. 1 can be independently operated SQL resolver, be also possible to be coupled in SQL resolver in host program.
As shown in Figure 1, the SQL analytic method of one embodiment of the invention, may include steps of:
S110: according to source SQL statement to be resolved and its corresponding SQL type, the character for having SQL type label is generated Data flow.
In the embodiment of the present invention, SQL resolver can support the parsing of a plurality of types of SQL statements.SQL resolver can be with The source SQL statement to be resolved of user's input is received by a pre-set polymorphic type input interface, and determines source SQL The corresponding SQL type of sentence.
Wherein, the SQL type that SQL resolver is supported may include: Oracle, MySQL, SQL Server, PostgreSQL etc..
In practical application, the corresponding SQL type of source SQL statement can be according to the affiliated data of source SQL statement of user's input Library type determines, or can be according to the affiliated type of database of source SQL statement that is identified based on source SQL statement come really It is fixed.The identification of the affiliated type of database of source SQL statement can be executed by external equipment, or be executed by SQL resolver.
In the embodiment of the present invention, after receiving source SQL statement to be resolved and determining its corresponding SQL type, it is It is convenient for subsequent processing, can be turned source SQL statement to be resolved and its corresponding SQL type according to unified transformation rule Change the character data stream with unified format into.
Wherein, the character data stream being converted into has SQL type label, and SQL type label is used to indicate source SQL statement SQL type.Unified format can be preset by those skilled in the art, for example, can be set are as follows: source SQL statement adds SQL Type label;Alternatively, SQL type label adds source SQL statement.
S120: according to found based on SQL type label with the matched morphological rule of character data stream and syntax rule, Character data stream is parsed into corresponding syntax notation stream.
The formation of morphological analysis, syntactic analysis and abstract syntax tree need to be carried out in order to complete the parsing of SQL statement.This In inventive embodiments, can according to found based on SQL type label with character data stream matched morphological rule, by character Parsing of the data stream completes morphological analysis at corresponding morphology mark stream.Wherein, include in morphology mark stream the word that parses and The morphological type of word.
Then, remembered according to what is found based on SQL type label with the matched syntax rule of character data stream and morphology The morphological type of each word, is parsed into corresponding syntax notation stream for morphology mark stream, completes syntactic analysis in number stream.Wherein, It include the grammatical representation formula for several grammatical phrases being made of word in syntax notation stream.
In practical application, each database has its corresponding SQL basic norm library, and SQL basic norm includes in library For the type database SQL statement must strict implement basic norm, relate generally to keyword, function, data The regulation of the elements such as definition, linking format, data format, vocabulary sequence.
Sql like language includes DQL (Data Query Language, data query language), DML (Data Manipulation Language, data manipulation language), DDL (Data Definition Language, data definition language Speech), DCL (Data Control Language, data control language), TPL (Transaction Process Language, Transaction language), ((Cursor Control Language, pointer control language), respectively corresponds six class functions to CCL: number It is investigated that inquiry, data manipulation, data definition, data control, issued transaction, pointer control.
Based on different business demand and performance requirement, different types of database corresponding SQL basic norm library Often there is larger difference.For example, key of the SQL basic norm library of different types of database in above-mentioned six classes function The regulation of the elements such as word, function, data definition, linking format, data format, vocabulary sequence is different.Such as page turning Operation, MySQL mark starting position with LIMIT, and Oracle indicates the position of result set using ROWNUM field;For character string Fuzzy comparisons, use LIKE, Oracle that can also use INSTR function other than LIKE in MySQL.
Since the morphological rule library parsed for SQL statement and syntax rule library are in meeting SQL basic norm library Various specifications on the basis of construct.Therefore, in practical application, the different types of corresponding morphological rule library of database Difference, the different types of corresponding syntax rule library of database are also different.
In the embodiment of the present invention, different SQL types can be directed in SQL resolver in advance, stores corresponding morphology rule Then library and syntax rule library.
During carrying out morphological analysis, morphological rule corresponding with SQL type label library can be searched;According to character The character format of data flow matches character data stream with the morphological rule in the morphological rule library found out;If matching Success, it is determined that the morphological rule library is and the matched morphological rule library of character data stream;And according in the morphological rule library Character data stream is parsed into corresponding morphology mark stream by the morphological rule matched.Wherein, the morphological rule in morphological rule library can To be indicated using regular expression.
In practical application, if the character format of certain section of content meets a certain morphology rule in morphological rule library in character data stream Then defined character format can then determine that the morphological rule is and the matched morphological rule of character data stream;If character All there is matched morphological rule in all characters of data flow, then can determine character data stream and morphological rule storehouse matching at Function determines that the morphological rule library is and the matched morphological rule library of character data stream.
During carrying out syntactic analysis, can using the corresponding syntax rule library of SQL type label as with number of characters According to the matched syntax rule library of stream;Later, it according to the morphological type of each word in morphology mark stream, is matched from character data stream Syntax rule library in find out and the matched syntax rule of morphology mark stream;Then, according to matched syntax rule, morphology class Morphology mark stream is parsed into corresponding syntax notation stream by type.
Wherein, the priority of operations of every kind of morphological type of the grammar rule definitions in syntax rule library, every grammer rule Then it is related to a variety of morphological types.In practical application, if the morphological type of each word belongs in certain segment limit in morphology mark stream The syntax rule can then be determined as and the matched language of morphology mark stream by morphological type involved in a certain syntax rule Method rule.
In practical application, if can not finally find with the matched syntax rule of morphology mark stream, morphology can be terminated The parsing of mark stream carries out abnormality processing, such as shows exception information.
In the embodiment of the present invention, morphology mark stream, the syntax notation stream of generation can be saved.Such as it can be by word Method mark stream, syntax notation stream save in memory, for subsequent processing;Alternatively, can also be used as the intermediate result of SQL parsing Persistence is saved to disk, the intermediate result can easily be used for multiple times for subsequent, and prevent complete in final output Cause SQL parsing that need to rerun at system crash before.
S130: according to the grammatical representation formula of grammatical phrases each in syntax notation stream, corresponding abstract syntax tree is generated.
In the embodiment of the present invention, after parsing syntax notation stream by step S120, SQL resolver can be according to language The grammatical representation formula of each grammatical phrases, generates corresponding abstract syntax tree in method mark stream.
It, more preferably, can be preparatory in SQL resolver in the embodiment of the present invention in order to meet the different parsing demands of user For different SQL types, the abstract syntax tree of level or order of operation relationship that setting limits syntax parsing parses relationship;And it is right Relationship is parsed in different abstract syntax tree, can be correspondingly arranged abstract syntax tree shows form.For example, if abstract syntax tree Parsing relationship is mainly used for limiting the level of syntax parsing, then form that it was correspondingly arranged show can be logically to call and close What system was successively retracted shows form;If the order of operation that abstract syntax tree parsing relationship is mainly used for limiting syntax parsing is closed System, then form that it was correspondingly arranged show, which can be, shows form according to parsing order of operation.
SQL resolver can parse relationship, calculation syntax mark stream according to the matched abstract syntax tree of SQL type label In each grammatical phrases grammatical representation formula, generation meet the abstract syntax for showing form corresponding to abstract syntax tree parsing relationship Tree.
Wherein, form is showed corresponding to abstract syntax tree parsing relationship, and specially logically call relation is successively retracted Show form, or show form according to parsing sequence.
More preferably, in order to reduce subsequent algorithm dimension, in the embodiment of the present invention, meet abstract syntax tree parsing in generation and close It, can also be to the inessential grammer burl in the abstract syntax tree of generation after the corresponding abstract syntax tree for showing form of system Point is cut down.The nodes such as OPT_PARAM, OUTLINE_LDAF are rejected for example, can choose.
In the embodiment of the present invention, after generating abstract syntax tree, abstract syntax tree can be saved.Such as it can be with Abstract syntax tree is saved in memory, for subsequent processing;Alternatively, can also be used as the intermediate result persistence of SQL parsing It saves to disk, the intermediate result can easily be used for multiple times for subsequent, and prevent before final output is completed System crash and cause SQL parsing need to rerun.
More preferably, it generates after meeting the abstract syntax tree for showing form corresponding to abstract syntax tree parsing relationship, also Abstract syntax tree can printed out from the background, so that user checks the SQL intermediate result parsed;If abstract Syntax tree does not meet expection, then user can parse relationship to abstract syntax tree and be customized.In this way, SQL resolver can connect The abstract syntax tree for receiving customization parses relationship, and parses relationship according to the abstract syntax tree of customization, recalculates syntax notation stream In each grammatical phrases grammatical representation formula, generate and show the pumping of form corresponding to the abstract syntax tree parsing relationship for meeting customization As syntax tree.
S140: abstract syntax tree is converted into the output stream of the output type of the corresponding configuration of source SQL statement, and defeated Out.
In view of existing SQL resolver is confined in large-scale project, if need to check whether the crucial frame of SQL statement accords with Specification is closed, needs to undergo the generation of parsing, the logic executive plan of SQL statement, a whole set of stream such as generation of physics executive plan Journey, speculates whether SQL statement meets specification according to result.Wherein, it can intuitively show the abstract language of the crucial frame of SQL statement Method tree simply generates the intermediate result before logic executive plan, usually can't see and specifically shows.
Therefore, it is audited for the ease of the specification of SQL statement, in the embodiment of the present invention, SQL resolver can will be parsed The abstract syntax tree of source SQL statement is exported.
In the embodiment of the present invention, in order to meet different types of output demand, SQL resolver when receiving source SQL statement, The output type of corresponding configuration can also be received, so as to it is subsequent can be according to different types of output demand by the abstract syntax of generation Tree is converted into various types of output streams.Wherein, output type may include;Text type, web front-end show type, Host program interface type, subtype etc..
Specifically, SQL resolver by step S120, S130 complete source SQL statement parsing generate abstract syntax tree it Afterwards, abstract syntax tree can be converted into after the output stream of the output type of the corresponding configuration of source SQL statement, it is defeated by this kind The output stream of type is exported out.
From the description above as can be seen that in SQL analytic method provided in an embodiment of the present invention, parsed for existing SQL Device is unable to satisfy the problem of parsing demand of different types of SQL statement, proposes for received different types of to be resolved Source SQL statement can generate the character data stream for having SQL type label according to source SQL statement and its corresponding SQL type; Then, according to the matched morphological rule of character data stream and syntax rule, by character data stream carry out parsing generate it is corresponding Abstract syntax tree, to realize the parsing of different types of SQL statement;Furthermore, it is possible to be converted into abstract syntax tree with source SQL statement corresponds to the output stream of the output type of configuration and output, to meet different output demands, improves SQL parsing The flexibility and the scope of application of device.
With the continuous development of business, database development demand is maked rapid progress, and corresponding SQL statement is also increasingly crisscross multiple It is miscellaneous.Industry not very payes attention to database SQL development specifications at present, and database developer level it is also irregular, in addition after Continuous SQL maintenance is also not comprehensive enough.Therefore, with the continuous growth of portfolio, SQL statement inferior will be increasingly becoming influence number According to the important bottleneck of library overall performance.
Therefore, on the basis of the SQL analytic method that embodiment shown in Fig. 1 provides, the embodiment of the invention also provides one Kind SQL analytic method can carry out the superiority and inferiority audit of SQL statement based on the parsing result of SQL.
With reference to Fig. 2, it illustrates the exemplary process diagrams of SQL analytic method in accordance with another embodiment of the present invention.
As shown in Fig. 2, the SQL analytic method of another embodiment of the present invention, may include steps of:
S210: according to source SQL statement to be resolved and its corresponding SQL type, the character for having SQL type label is generated Data flow.
S220: according to found based on SQL type label with the matched morphological rule of character data stream and syntax rule, Character data stream is parsed into corresponding syntax notation stream.
S230: according to the grammatical representation formula of grammatical phrases each in syntax notation stream, corresponding abstract syntax tree is generated.
In the embodiment of the present invention, step S210-S230 can be with reference to the SQL analytic method provided in embodiment illustrated in fig. 1 In step S110-S130 specific implementation, details are not described herein again.
S240: according to the scoring of each SQL development specifications in SQL type label corresponding SQL development specifications library and Abstract syntax tree calculates the comprehensive score of source SQL statement;If comprehensive score marks source SQL statement lower than scoring threshold value For SQL inferior.
In the embodiment of the present invention, for different types of database, in addition to can store corresponding SQL in SQL resolver SQL development specifications library can also be further arranged according to the performance requirement of database in basic norm library.
Multiple SQL exploitation rule for distinguishing high-quality SQL statement and SQL statement inferior are set in SQL development specifications library Model, and each SQL development specifications has corresponding scoring.Wherein, SQL development specifications may include: avoid using SELECT* need to point out specifically to inquire field name;Forbid the screening of WHERE clause to arrange and uses function;Forbid implicit conversion; Avoid the SQL for surpassing 3 layers nested;It avoids carrying out same table repeatedly inquiry etc..
In this way, after obtaining abstract syntax tree by step 230, can by abstract syntax tree and SQL development specifications into Row compares, and according to comparison result and the scoring of each SQL development specifications, calculates the comprehensive score of source SQL statement.Then, The comprehensive score of source SQL statement is compared with preset scoring threshold value, it, can if comprehensive score is lower than scoring threshold value Source SQL statement is determined as SQL inferior, and it is marked by mark inferior.If comprehensive score is higher than scoring threshold value, can Source SQL statement is labeled as high-quality SQL, and it is marked by high-quality mark.
S250: abstract syntax tree is converted into the output stream of the output type of the corresponding configuration of source SQL statement, and defeated Out.
In the embodiment of the present invention, step S250 is with reference to the step in the SQL analytic method provided in embodiment illustrated in fig. 1 The specific implementation of S140, details are not described herein again.
More preferably, abstract syntax tree is converted into after the output stream of output type of the corresponding configuration of source SQL statement, Output stream can be exported together with the superiority and inferiority state that the source SQL statement marks.Wherein, SQL statement label is excellent Bad state specifically: high-quality mark or mark inferior.In this way, subsequent user can screen in time according to the superiority and inferiority state of output The SQL statement inferior for not meeting SQL development specifications out avoids influence of the SQL statement inferior to database overall performance.
More preferably, on the basis of the SQL analytic method that Fig. 1, embodiment illustrated in fig. 2 provide, the embodiment of the present invention is also mentioned A kind of SQL analytic method has been supplied, can be improved the scalability of SQL resolver, word can have been carried out according to the actual demand of user The customization of method rule base, syntax rule library and abstract syntax tree parsing relationship.
With reference to Fig. 3, it illustrates the exemplary process diagrams of the SQL analytic method of another embodiment according to the present invention.
As shown in figure 3, the SQL analytic method of another embodiment of the present invention, may include steps of:
S310: according to source SQL statement to be resolved and its corresponding SQL type, the character for having SQL type label is generated Data flow.
In the embodiment of the present invention, step S310 can be with reference to the step in the SQL analytic method provided in embodiment illustrated in fig. 1 The specific implementation of rapid S110, details are not described herein again.
S320: according to found based on SQL type label with character data stream matched morphological rule, by character data Stream is parsed into corresponding morphology mark stream.
It wherein, include the morphological type of the word and word that parse in morphology mark stream.
In the embodiment of the present invention, during carrying out morphological analysis, morphology corresponding with SQL type label can be searched Rule base;According to the character format of character data stream, by the morphological rule in character data stream and the morphological rule library found out It is matched;If successful match, it is determined that the morphological rule library is and the matched morphological rule library of character data stream;And according to this Character data stream is parsed into corresponding morphology mark stream by matched morphological rule in morphological rule library.Wherein, morphological rule library In morphological rule can using regular expression indicate.
In practical application, if the character format of certain section of content meets a certain morphology rule in morphological rule library in character data stream Then defined character format can then determine that the morphological rule is and the matched morphological rule of character data stream;If character All there is matched morphological rule in all characters of data flow, then can determine character data stream and morphological rule storehouse matching at Function determines that the morphological rule library is and the matched morphological rule library of character data stream.
In the embodiment of the present invention, if non-successful match, can according in character data stream can not matched content, calculate Mismatched degree between morphological rule corresponding with SQL type label library and character data stream.In practical application, and if morphology In character format after all morphological rules are matched in rule base in character data stream there are still can not matched content, then It can determine character data stream and the morphological rule library Incomplete matching, i.e., non-successful match.Wherein, morphological rule library and character Mismatched degree between data flow, can according in character data stream can not the accounting of matched content calculated.
Then, calculated mismatched degree is compared with preset first given threshold, if it is calculated not It is higher than the first given threshold with degree, then illustrates that the SQL type of the corresponding input of source SQL statement is likely to occur mistake, it is therefore desirable to It goes to search morphological rule library corresponding with the real SQL type of source SQL statement.
Specifically, the corresponding morphological rule library of all SQL types can be traversed, according to the character lattice of character data stream Formula is searched and the matched morphological rule library of character data stream.Wherein, the first given threshold by those skilled in the art rule of thumb It is preset.
If after traversing the corresponding morphological rule library of all SQL types, finding and the matched word of character data stream Character data stream can be then parsed into corresponding by method rule base according to matched morphological rule in matched morphological rule library Morphology mark stream.
If not found out matched with character data stream after traversing the corresponding morphological rule library of all SQL types Morphological rule library, then can according in character data stream can not matched content, calculate each morphological rule library and character data stream Between mismatched degree.
Then, it searches and is compared the mismatched degree in each morphological rule library with the second given threshold, if finding not Matching degree is lower than the morphological rule library of the second given threshold, then can for can not matched content the morphology that finds is advised After then library is customized, as with the matched morphological rule library of character data stream.Wherein, the customization in morphological rule library can wrap Include: the addition of morphological rule is deleted or is modified.Then, according to matched word in the matched morphological rule library of character data stream Method rule, is parsed into corresponding morphology mark stream for character data stream.
If not finding the morphological rule library that mismatched degree is lower than the second given threshold, character data stream can be directed to Carry out the customization of morphological rule library after, as with the matched morphological rule library of character data stream;Wherein, customization includes;Morphological rule Addition;According to matched morphological rule in the matched morphological rule library of character data stream, character data stream is parsed into pair The morphology mark stream answered.
Further, if between calculated morphological rule library corresponding with SQL type label and character data stream not Matching degree is lower than the second given threshold, then illustrates the most contents in the character data stream and the morphology in morphological rule library Rule is matched.
It therefore, can be for can not matched content pair and SQL type label in order to complete the complete parsing of SQL statement After corresponding morphological rule library is customized, as with the matched morphological rule library of character data stream.Wherein, to morphological rule library Customization may include: morphological rule addition, delete or modification.Finally, according to the matched morphological rule of character data stream Character data stream is parsed into corresponding morphology mark stream by matched morphological rule in library.
S330: remembered according to what is found based on SQL type label with the matched syntax rule of character data stream and morphology Number stream in each word morphological type, morphology mark stream is parsed into corresponding syntax notation stream.
In the embodiment of the present invention, it can be matched using the corresponding syntax rule library of SQL type label as with character data stream Syntax rule library;Then, it according to the morphological type of each word in morphology mark stream, is advised from the matched grammer of character data stream It is then found out in library and the matched syntax rule of morphology mark stream;And according to matched syntax rule, morphological type, morphology is remembered Number stream is parsed into corresponding syntax notation stream.
Wherein, the priority of operations of every kind of morphological type of the grammar rule definitions in syntax rule library, every grammer rule Then it is related to a variety of morphological types.In practical application, if the morphological type of each word belongs in certain segment limit in morphology mark stream The syntax rule can then be determined as and the matched language of morphology mark stream by morphological type involved in a certain syntax rule Method rule.
In practical application, can be potentially encountered syntax rule in resolving can not be matched in the morphology mark stream of parsing Hold, therefore, in the embodiment of the present invention, according to matched syntax rule and morphological type, morphology mark stream is parsed into corresponding Before syntax notation stream, it can be flowed by the syntax rule in the corresponding syntax rule library of SQL type label with morphology mark Row matching, determines in morphology mark stream with the presence or absence of can not matched content.
If exist in morphology mark stream can not matched content, for can not matched content carry out syntax rule library After customization, as with the matched syntax rule library of character data stream;Wherein, customization includes: the addition or modification of syntax rule; According to the morphological type of each word in morphology mark stream, found out from the matched syntax rule library of character data stream and morphology The matched syntax rule of mark stream.
In practical application, if in step S320 between the corresponding morphological rule library of SQL type label and character data stream Mismatched degree is higher than the first given threshold, finds after traversing other kinds of morphological rule library and matches with character data stream Morphological rule library after, determine the corresponding SQL type in the morphological rule library, and find out the SQL type corresponding grammer rule Then library, using the syntax rule library found out as with the matched syntax rule library of character data stream.
In the embodiment of the present invention, morphology mark stream, the syntax notation stream of generation can be saved.Such as it can be by word Method mark stream, syntax notation stream save in memory, for subsequent processing;Alternatively, can also be used as the intermediate result of SQL parsing Persistence is saved to disk, the intermediate result can easily be used for multiple times for subsequent, and prevent complete in final output Cause SQL parsing that need to rerun at system crash before.
S340: according to the grammatical representation formula of grammatical phrases each in syntax notation stream, corresponding abstract syntax tree is generated.
S350: abstract syntax tree is converted into the output stream of the output type of the corresponding configuration of source SQL statement, and defeated Out.
In the embodiment of the present invention, step S340, S350 can be with reference to the SQL analytic method provided in embodiment illustrated in fig. 1 In step S130, S140 specific implementation, details are not described herein again.
Based on the SQL analytic method that above-mentioned embodiment illustrated in fig. 1 provides, with reference to Fig. 4, it illustrates one according to the present invention The structural schematic diagram of the SQL resolver of embodiment.
As shown in figure 4, SQL resolver 400 provided in an embodiment of the present invention may include: polymorphic type input interface module 401, SQL parsing module 402 and polymorphic type output interface module 403.
Wherein, polymorphic type input interface module 401 be used for according to source structure query language SQL statement to be resolved and its Corresponding SQL type generates the character data stream for having SQL type label;
SQL parsing module 402 is used to be advised according to what is found based on SQL type label with the matched morphology of character data stream Then and syntax rule, character data stream is parsed into corresponding syntax notation stream;According to grammatical phrases each in syntax notation stream Grammatical representation formula generates corresponding abstract syntax tree;
Polymorphic type output interface module 403 is used to be converted into abstract syntax tree to have the defeated of the corresponding configuration of source SQL statement The output stream of type out, and export.
It should be appreciated that there are corresponding for the step in the method that all modules recorded in SQL resolver 400 are described with Fig. 1 Relationship.As a result, above with respect to method description operation and feature be equally applicable to SQL resolver 400 and it includes module, Details are not described herein.
More preferably, the SQL analytic method provided based on embodiment illustrated in fig. 2, with reference to Fig. 5, it illustrates according to the present invention The structural schematic diagram of the SQL resolver of another embodiment.
As shown in figure 5, SQL resolver 500 provided in an embodiment of the present invention may include: polymorphic type input interface module 501, SQL parsing module 502, polymorphic type output interface module 503 and SQL evaluate module 504.
In the embodiment of the present invention, polymorphic type input interface module 501, SQL parsing module 502, polymorphic type output interface mould The specific implementation of block 503 can with reference to polymorphic type input interface module 401 in the SQL resolver provided in embodiment illustrated in fig. 4, The specific implementation of SQL parsing module 402 and polymorphic type output interface module 403, details are not described herein again.
SQL evaluates module 504 and is used for according to each SQL development specifications in SQL type label corresponding SQL development specifications library Scoring and abstract syntax tree calculate the comprehensive score of source SQL statement;If comprehensive score, will lower than scoring threshold value Source SQL statement is labeled as poor quality SQL.
It should be appreciated that there are corresponding for the step in the method that all modules recorded in SQL resolver 500 are described with Fig. 2 Relationship.As a result, above with respect to method description operation and feature be equally applicable to SQL resolver 500 and it includes module, Details are not described herein.
With reference to Fig. 6, it illustrates the structural schematic diagrams of SQL parsing module according to an embodiment of the invention.
As shown in fig. 6, SQL parsing module 402 provided in an embodiment of the present invention or SQL parsing module 502 may include: word Method resolution unit 601, syntax parsing unit 602 and syntax tree generation unit 603.
Wherein, morphology resolution unit 601 is used for matched with character data stream according to being found based on SQL type label Character data stream is parsed into corresponding morphology mark stream by morphological rule;It include the word and list parsed in morphology mark stream The morphological type of word.
Specifically, morphology resolution unit 601 searches morphological rule corresponding with SQL type label library;According to character data The character format of stream matches character data stream with the morphological rule in the morphological rule library found out;If successful match, Then determine that the morphological rule library is and the matched morphological rule library of character data stream;And according to matched word in the morphological rule library Method rule, is parsed into corresponding morphology mark stream for character data stream.
Syntax parsing unit 602 is used for according to being found based on SQL type label and character data stream matched grammer The morphological type of each word, is parsed into corresponding syntax notation stream, grammer for morphology mark stream in rule and morphology mark stream It include the grammatical representation formula for several grammatical phrases being made of word in mark stream.
Specifically, syntax parsing unit 602 using the corresponding syntax rule library of SQL type label as with character data stream The syntax rule library matched;According to the morphological type of each word in morphology mark stream, from the matched syntax rule of character data stream It is found out in library and the matched syntax rule of morphology mark stream;According to matched syntax rule, morphological type, by morphology mark stream It is parsed into corresponding syntax notation stream.
Syntax tree generation unit 603 is used to parse relationship according to the matched abstract syntax tree of SQL type label, calculates language The grammatical representation formula of each grammatical phrases in method mark stream, generation, which meets, shows form corresponding to abstract syntax tree parsing relationship Abstract syntax tree.
Wherein, form is showed corresponding to abstract syntax tree parsing relationship, and specially logically call relation is successively retracted Show form, or show form according to parsing sequence.
With reference to Fig. 7, it illustrates the entity structure schematic diagrames of electronic equipment according to an embodiment of the invention.Such as Fig. 7 Shown, which may include: processor (processor) 701, memory (memory) 702 and bus 703, In, processor 701, memory 702 completes mutual communication by bus 703.Processor 701 can call memory 702 In computer program, to execute method provided by above-mentioned embodiment illustrated in fig. 1, for example,
According to source structure query language SQL statement to be resolved and its corresponding SQL type, generates and have SQL type The character data stream of label;According to the matched morphological rule of character data stream and syntax rule, character data stream is parsed into Corresponding syntax notation stream;According to the grammatical representation formula of grammatical phrases each in syntax notation stream, corresponding abstract syntax tree is generated; Abstract syntax tree is converted into the output stream with the output type of the corresponding configuration of source SQL statement, and is exported.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, non-transient computer readable storage medium Computer program is stored, computer program makes computer execute method provided by above-mentioned embodiment illustrated in fig. 1, for example,
According to source structure query language SQL statement to be resolved and its corresponding SQL type, generates and have SQL type The character data stream of label;According to the matched morphological rule of character data stream and syntax rule, character data stream is parsed into Corresponding syntax notation stream;According to the grammatical representation formula of grammatical phrases each in syntax notation stream, corresponding abstract syntax tree is generated; Abstract syntax tree is converted into the output stream with the output type of the corresponding configuration of source SQL statement, and is exported.
In addition, the logical order in above-mentioned memory can be realized and as independence by way of SFU software functional unit Product when selling or using, can store in a computer readable storage medium.Based on this understanding, of the invention Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words The form of product embodies, which is stored in a storage medium, including some instructions use so that One computer equipment (can be personal computer, server or the network equipment etc.) executes each embodiment side of the present invention The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The embodiment of base station described above is only schematical, wherein the unit as illustrated by the separation member It may or may not be physically separated, component shown as a unit may or may not be physics list Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of SQL analytic method characterized by comprising
According to source structure query language SQL statement to be resolved and its corresponding SQL type, generates and have SQL type label Character data stream;
According to found based on the SQL type label with the matched morphological rule of the character data stream and syntax rule, The character data stream is parsed into corresponding syntax notation stream;
According to the grammatical representation formula of each grammatical phrases in the syntax notation stream, corresponding abstract syntax tree is generated;
The abstract syntax tree is converted into the output stream with the output type of the corresponding configuration of the source SQL statement, and Output.
2. the method according to claim 1, wherein what the basis was found based on the SQL type label With the matched morphological rule of the character data stream and syntax rule, the character data stream is parsed into corresponding syntax notation Stream, comprising:
According to being found based on the SQL type label with the matched morphological rule of character data stream, by the character Parsing of the data stream is at corresponding morphology mark stream;It include the morphology class of the word and word that parse in the morphology mark stream Type;
According to being found based on the SQL type label and the matched syntax rule of the character data stream and institute's predicate The morphology mark stream is parsed into corresponding syntax notation stream, the grammer note by the morphological type of each word in method mark stream Number stream in include several grammatical phrases being made of the word grammatical representation formula.
3. according to the method described in claim 2, it is characterized in that, what the basis was found based on the SQL type label With the matched morphological rule of character data stream, the character data stream is parsed into corresponding morphology mark stream, comprising:
Search morphological rule library corresponding with the SQL type label;
According to the character format of the character data stream, by the morphology in the character data stream and the morphological rule library found out Rule is matched;
If successful match, it is determined that the morphological rule library is and the matched morphological rule library of the character data stream;And according to this The character data stream is parsed into corresponding morphology mark stream by matched morphological rule in morphological rule library.
4. according to the method described in claim 3, it is characterized in that, the character format and lookup by the character data stream After the morphological rule in morphological rule library out is matched, further includes:
If non-successful match, according in character data stream can not matched content, calculate it is corresponding with the SQL type label Mismatched degree between morphological rule library and the character data stream;
If calculated mismatched degree is higher than the first given threshold, all corresponding morphological rules of SQL type are traversed It is searched and the matched morphological rule library of the character data stream according to the character format of the character data stream in library;
According to matched morphological rule in matched morphological rule library, the character data stream is parsed into corresponding morphology mark Stream.
5. according to the method described in claim 2, it is characterized in that, what the basis was found based on the SQL type label With the morphological type of each word in the matched syntax rule of the character data stream and the morphology mark stream, by the morphology Mark stream is parsed into corresponding syntax notation stream, comprising:
Using the corresponding syntax rule library of the SQL type label as with the matched syntax rule library of the character data stream;
According to the morphological type of each word in the morphology mark stream, from the matched syntax rule library of the character data stream It finds out and the matched syntax rule of morphology mark stream;
According to matched syntax rule, the morphological type, the morphology mark stream is parsed into corresponding syntax notation stream.
6. -5 any method according to claim 1, which is characterized in that described according to each grammer in the syntax notation stream The grammatical representation formula of phrase, generates corresponding abstract syntax tree, comprising:
Relationship is parsed according to the matched abstract syntax tree of the SQL type label, calculates each grammer in the syntax notation stream The grammatical representation formula of phrase, generation meet the abstract syntax tree for showing form corresponding to the abstract syntax tree parsing relationship;
Wherein, form is showed corresponding to the abstract syntax tree parsing relationship, and specially logically call relation is successively retracted Show form, or show form according to parsing sequence.
7. -6 any method according to claim 1, which is characterized in that further include:
According to the scoring of each SQL development specifications in SQL type label corresponding SQL development specifications library and described Abstract syntax tree calculates the comprehensive score of the source SQL statement;
If the comprehensive score is labeled as poor quality SQL lower than scoring threshold value, by the source SQL statement.
8. a kind of SQL resolver characterized by comprising
Polymorphic type input interface module, for according to source structure query language SQL statement to be resolved and its corresponding SQL class Type generates the character data stream for having SQL type label;
SQL parsing module, for basis and the matched morphological rule of the character data stream and syntax rule, by the number of characters Corresponding syntax notation stream is parsed into according to stream;According to the grammatical representation formula of each grammatical phrases in the syntax notation stream, generation pair The abstract syntax tree answered;
Polymorphic type output interface module, for the abstract syntax tree to be converted into have the corresponding configuration of the source SQL statement The output stream of output type, and export.
9. a kind of electronic equipment, which is characterized in that including processor, memory and bus, in which:
The processor, the memory complete mutual communication by bus;
The processor can call the computer program in memory, to execute as described in claim 1-7 any one Method.
10. a kind of non-transient computer readable storage medium, is stored thereon with computer program, which is characterized in that the program quilt Such as claim 1-7 any one the method is realized when processor executes.
CN201710787134.6A 2017-09-04 2017-09-04 A kind of SQL analytic method and SQL resolver Pending CN110019291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710787134.6A CN110019291A (en) 2017-09-04 2017-09-04 A kind of SQL analytic method and SQL resolver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710787134.6A CN110019291A (en) 2017-09-04 2017-09-04 A kind of SQL analytic method and SQL resolver

Publications (1)

Publication Number Publication Date
CN110019291A true CN110019291A (en) 2019-07-16

Family

ID=67186199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710787134.6A Pending CN110019291A (en) 2017-09-04 2017-09-04 A kind of SQL analytic method and SQL resolver

Country Status (1)

Country Link
CN (1) CN110019291A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110716953A (en) * 2019-10-10 2020-01-21 深圳前海微众银行股份有限公司 SQL statement automatic generation method, device, equipment and readable storage medium
CN110866028A (en) * 2019-10-10 2020-03-06 微梦创科网络科技(中国)有限公司 SQL instruction generation method and system
CN111008021A (en) * 2019-12-24 2020-04-14 象辑知源(武汉)科技有限公司 Presto-based method and system for supporting mixed execution of SQL (structured query language) and python scripts of multiple data sources
CN111143403A (en) * 2019-12-10 2020-05-12 跬云(上海)信息科技有限公司 SQL conversion method and device and storage medium
CN111143399A (en) * 2019-12-19 2020-05-12 微民保险代理有限公司 Data processing method, data processing device, storage medium and computer equipment
CN111309757A (en) * 2020-05-14 2020-06-19 深圳市赢时胜信息技术股份有限公司 SQL interpreter and optimization method of HBase
CN111614651A (en) * 2020-05-14 2020-09-01 南京艾科朗克信息科技有限公司 Low-delay TDS protocol analysis method based on FPGA
CN111858280A (en) * 2020-07-16 2020-10-30 中国工商银行股份有限公司 SQL information processing method, device, equipment and system
CN111984266A (en) * 2020-08-24 2020-11-24 北京人大金仓信息技术股份有限公司 Structural operation statement analysis method and device
CN112069198A (en) * 2020-07-16 2020-12-11 中科驭数(北京)科技有限公司 SQL analysis optimization method and device
CN112100617A (en) * 2020-09-15 2020-12-18 全球能源互联网研究院有限公司 Abnormal SQL detection method and device
CN112948419A (en) * 2021-03-02 2021-06-11 广州海量数据库技术有限公司 Query statement processing method and device
CN112965995A (en) * 2021-04-19 2021-06-15 瀚高基础软件股份有限公司 Data interaction method and device based on PSQL of postgreSQL client
CN113051285A (en) * 2021-03-25 2021-06-29 未鲲(上海)科技服务有限公司 SQL statement conversion method, system, equipment and storage medium
CN113312373A (en) * 2021-05-12 2021-08-27 上海哲锦信息科技有限公司 Method and equipment for analyzing data structured query statement
WO2022052639A1 (en) * 2020-09-10 2022-03-17 北京达佳互联信息技术有限公司 Data query method and apparatus
CN114519582A (en) * 2022-02-21 2022-05-20 中国邮政储蓄银行股份有限公司 Service preheating method, preheating device and service system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778185A (en) * 2013-12-27 2014-05-07 北京天融信软件有限公司 SQL statement parsing method and system used for database auditing system
US20140172898A1 (en) * 2012-12-13 2014-06-19 Microsoft Corporation Distributed sql query processing using key-value storage system
CN105787044A (en) * 2016-02-26 2016-07-20 广州品唯软件有限公司 MySQL based SQL parser and parsing method thereof
CN106682147A (en) * 2016-12-22 2017-05-17 北京锐安科技有限公司 Mass data based query method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140172898A1 (en) * 2012-12-13 2014-06-19 Microsoft Corporation Distributed sql query processing using key-value storage system
CN103778185A (en) * 2013-12-27 2014-05-07 北京天融信软件有限公司 SQL statement parsing method and system used for database auditing system
CN105787044A (en) * 2016-02-26 2016-07-20 广州品唯软件有限公司 MySQL based SQL parser and parsing method thereof
CN106682147A (en) * 2016-12-22 2017-05-17 北京锐安科技有限公司 Mass data based query method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
珞石007: "Durid的SQL解析器浅释", 《CSDN博客》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110866028A (en) * 2019-10-10 2020-03-06 微梦创科网络科技(中国)有限公司 SQL instruction generation method and system
CN110716953B (en) * 2019-10-10 2023-08-22 深圳前海微众银行股份有限公司 SQL sentence automatic generation method, device, equipment and readable storage medium
CN110716953A (en) * 2019-10-10 2020-01-21 深圳前海微众银行股份有限公司 SQL statement automatic generation method, device, equipment and readable storage medium
CN111143403A (en) * 2019-12-10 2020-05-12 跬云(上海)信息科技有限公司 SQL conversion method and device and storage medium
CN111143399B (en) * 2019-12-19 2024-04-02 微民保险代理有限公司 Data processing method, device, storage medium and computer equipment
CN111143399A (en) * 2019-12-19 2020-05-12 微民保险代理有限公司 Data processing method, data processing device, storage medium and computer equipment
CN111008021A (en) * 2019-12-24 2020-04-14 象辑知源(武汉)科技有限公司 Presto-based method and system for supporting mixed execution of SQL (structured query language) and python scripts of multiple data sources
CN111614651A (en) * 2020-05-14 2020-09-01 南京艾科朗克信息科技有限公司 Low-delay TDS protocol analysis method based on FPGA
CN111309757A (en) * 2020-05-14 2020-06-19 深圳市赢时胜信息技术股份有限公司 SQL interpreter and optimization method of HBase
CN112069198A (en) * 2020-07-16 2020-12-11 中科驭数(北京)科技有限公司 SQL analysis optimization method and device
CN111858280A (en) * 2020-07-16 2020-10-30 中国工商银行股份有限公司 SQL information processing method, device, equipment and system
CN111858280B (en) * 2020-07-16 2024-02-27 中国工商银行股份有限公司 SQL information processing method, device, equipment and system
CN111984266A (en) * 2020-08-24 2020-11-24 北京人大金仓信息技术股份有限公司 Structural operation statement analysis method and device
WO2022052639A1 (en) * 2020-09-10 2022-03-17 北京达佳互联信息技术有限公司 Data query method and apparatus
CN112100617B (en) * 2020-09-15 2023-11-24 全球能源互联网研究院有限公司 Abnormal SQL detection method and device
CN112100617A (en) * 2020-09-15 2020-12-18 全球能源互联网研究院有限公司 Abnormal SQL detection method and device
CN112948419A (en) * 2021-03-02 2021-06-11 广州海量数据库技术有限公司 Query statement processing method and device
CN113051285A (en) * 2021-03-25 2021-06-29 未鲲(上海)科技服务有限公司 SQL statement conversion method, system, equipment and storage medium
CN113051285B (en) * 2021-03-25 2024-04-02 未鲲(上海)科技服务有限公司 SQL sentence conversion method, system, equipment and storage medium
CN112965995B (en) * 2021-04-19 2023-03-31 瀚高基础软件股份有限公司 Data interaction method and device based on PSQL of postgreSQL client
CN112965995A (en) * 2021-04-19 2021-06-15 瀚高基础软件股份有限公司 Data interaction method and device based on PSQL of postgreSQL client
CN113312373A (en) * 2021-05-12 2021-08-27 上海哲锦信息科技有限公司 Method and equipment for analyzing data structured query statement
CN114519582A (en) * 2022-02-21 2022-05-20 中国邮政储蓄银行股份有限公司 Service preheating method, preheating device and service system

Similar Documents

Publication Publication Date Title
CN110019291A (en) A kind of SQL analytic method and SQL resolver
US11055287B2 (en) Eigenvalue-based data query
CN110321432B (en) Text event information extraction method, electronic device and nonvolatile storage medium
US8745077B2 (en) Searching and matching of data
CN111177184A (en) Structured query language conversion method based on natural language and related equipment thereof
CN104657439A (en) Generation system and method for structured query sentence used for precise retrieval of natural language
US10614126B2 (en) Textual query editor for graph databases that performs semantic analysis using extracted information
CN110597844B (en) Unified access method for heterogeneous database data and related equipment
CN105868204A (en) Method and apparatus for converting script language SQL of Oracle
US20230129782A1 (en) System and Method for Efficient Transliteration of Machine Interpretable Languages
CN104657440A (en) Structured query statement generating system and method
JP4247135B2 (en) Structured document storage method, structured document storage device, structured document search method
US20210073257A1 (en) Logical document structure identification
Francia et al. Towards conversational OLAP
Liu et al. Transforming entity-relationship diagrams to relational schemas using a graph grammar formalism
US20220245377A1 (en) Automated text information extraction from electronic documents
CN113779062A (en) SQL statement generation method and device, storage medium and electronic equipment
US10956672B1 (en) High volume message classification and distribution
CN111831624A (en) Data table creating method and device, computer equipment and storage medium
CN113590650A (en) Feature expression based structured query statement discrimination method and device
CN113868312A (en) Multi-method fused mechanism matching method, device, equipment and storage medium
Rajbhoj et al. DocToModel: Automated Authoring of Models from Diverse Requirements Specification Documents
CN113032366A (en) SQL syntax tree analysis method based on Flex and Bison
Machado et al. A Text Similarity-based Process for Extracting JSON Conceptual Schemas.
CN111857688A (en) SQL code automatic completion method, system and storage medium

Legal Events

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

Application publication date: 20190716