The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a detailed flow in the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of the method for querying database data in the embodiment of the present invention includes:
101. and acquiring a target operation instruction for accessing a target data source through a query interface, wherein the query interface is a uniform interface for querying different types of data sources by a client, and the target operation instruction is an instruction described by a Structured Query Language (SQL).
The server obtains a target operation instruction for accessing a target data source through a query interface, the query interface is a uniform interface for querying different types of data sources by a client, and the target operation instruction is an instruction described by a Structured Query Language (SQL). In a large data processing system, because the types of data are various and the data amount is complicated, different types of data are stored in different databases, great convenience is provided for a client to query and call the data, but different query interfaces are required for the client to access different databases. For example: the Druid utilizes the REST interface to perform data query, is an efficient data query system and mainly solves the problem of performing aggregation query on a large amount of data based on time sequence; HBase utilizes a JavaAPI interface to perform data query, HBase is an open-source non-relational distributed database, and the programming language for realizing the HBase is Java. Therefore, the server obtains the operation instructions for different types of data sources, so as to facilitate data query, and the type of the target data source is not limited, so as to facilitate data query in multiple data sources. The uniform query interface for the client to access the database is a query interface of a preset data warehouse tool Hive, and because the access interfaces of different types of databases are different, the query interfaces are uniform. Hive has three main query interfaces: command-line interface (CLI), Client, and web product interface (WUI). The most common of them is the CLI, and the server will start a Hive copy at the same time when starting the CLI. The Client is the Client of the Hive, and when the Server starts the Client mode, the Client is connected to the node where the Hive Server is located, and the Hive Server is started at the node. WUI is the access to data by browser access Hive. In the embodiment of the present invention, the query interface of Hive is not limited.
It should be noted that the preset data warehouse tool in the embodiment of the present invention is Hive, and Hive is a data warehouse processing tool with Hadoop packaged at the bottom, and data query is implemented by using SQL-like language, where all Hive data is stored in a Hadoop-compatible file system. Hive does not modify data in the process of loading data, but moves the data to a directory set by Hive in a distributed file system (HDFS). The Hive comprises an interpreter, a compiler and an optimizer, and can complete lexical analysis, syntactic analysis, compilation and optimization of the query statement. The feature of Hive supports the analysis of the query commands of other different databases, so the data query is carried out on the basis of Hive in the invention.
It is further explained that, since SQL is widely used in data warehouses, the server uses the SQL language as the target operation instruction.
SQL is divided into two parts, a data operation language and a data definition language, and is syntax for executing queries, and also contains syntax for updating, inserting and deleting records enough for compilation of query programs. The following is a commonly used compilation statement for SQL:
for example, a database is created using SQL:
hive>create database financials;
hive>create database ifnot exists financials;
and querying the data in the table by using SQL:
hive>select*from student;
102. and acquiring a target grammar identifier of the target data source according to the target operation instruction, wherein the target grammar identifier is used for indicating the instruction grammar of the target data source.
And the server acquires a target grammar identifier of the target data source according to the target operation instruction, wherein the target grammar identifier is used for indicating the instruction grammar of the target data source. Specifically, the server reads a target language rule of a target operation instruction; the server converts the target language rule into a grammar tree; the server generates a parser of the target language rule; and the server analyzes the target operation instruction based on the syntax tree and the analyzer to obtain a target syntax identifier of the target data source, wherein the target syntax identifier is used for indicating the instruction syntax of the target data source.
When the client accesses different types of databases, different access languages are needed, the server converts and translates the target operation instruction to obtain a target grammar identifier of the target data source, the target grammar identifier is an instruction grammar used for indicating the target data source, and the server can access the corresponding database by using the converted target operation instruction. When extracting the target grammar identifier of the target data source, the server needs to analyze the target operation instruction, and the server acquires the target grammar identifier corresponding to the target data source by analyzing the target operation instruction.
It is further explained that, because the query language of Hive is SQL language, the server here obtains the language rules of SQL.
Taking access to the HBase database as an example: java is an instruction syntax for indicating the HBase database, so that the server accesses a target operation instruction of the HBase according to the description of the SQL language and obtains a target syntax identifier which needs to be converted into Java. In this process: the server reads the target language rule of SQL; the server converts the target language rule of the SQL into a syntax tree; the server generates a parser of the target language rule of the SQL, and the server parses the target operation instruction by using the syntax tree and the parser; and the server extracts a target grammar identifier of the HBase from the analyzed target operation instruction, wherein the target grammar identifier is the identifier of the Java.
103. And converting the target operation instruction into a target hook handle according to the preset data warehouse tool Hive and the target grammar identifier.
And the server converts the target operation instruction into a target hook handle according to the preset data warehouse tool Hive and the target grammar identifier. And the server converts the target operation instruction accessing the target data source into a target handle by using the preset Hive and the extracted target grammar identifier. Specifically, the server reads a grammar rule of a target grammar identifier in a preset data warehouse tool; the server analyzes the grammar rule to obtain an abstract grammar tree; the server converts the abstract syntax tree to obtain a query block; the server translates the query block to obtain an execution operation tree; and the server recompiles the target operation instruction by using the execution operation tree to obtain the target handle.
It is further described that, after the server extracts the target syntax identifier, in order to perform data query, the server needs to convert the target operation instruction into a query instruction of the target data source, that is, convert the target operation instruction into a target handle.
104. And inquiring the target data in the corresponding target data source according to the target handle.
And the server queries the target data in a target data source corresponding to the target handle according to the target handle.
All data in Hive is stored in the HDFS, and no special data storage format is provided, such as text format, sequence file format and parquetfile format are supported. Wherein Hive comprises the following data models: database (DB) appears in HDFS as $ { live. metastore. ware house. dir } directory next folder; an internal Table (Table) represents the next folder of the DB directory in the HDFS; an External Table (External Table) is similar to a Table, and the data storage location thereof can be in any specified path; partitions (partitions) appear as subdirectories under Table directories in the HDFS; buckets (buckets) appear in HDFS as multiple files under the same table entry after hash.
It is further understood that the data source can be abstracted into the External Table of Hive, and the server queries the External Table by using the target handle, i.e. can execute the instruction for accessing the database.
105. And feeding back a query result, wherein the query result is used for indicating whether the target data is queried or not.
And the server feeds back a query result, wherein the query result is used for indicating whether the target data is queried or not. And the server feeds back the query result according to whether the target data is queried or not, and if the target data is queried, the query result fed back by the server is the target data.
According to the embodiment of the invention, the query instruction matched with each database is converted into the target handle by using Hive, and the data of different data sources is queried in a data query mode of a structured query language, so that the generation of a middle table is avoided, the data transmission quantity and transmission time are reduced, and the data query efficiency is improved.
Referring to fig. 2, another embodiment of the method for querying database data according to the embodiment of the present invention includes:
201. and acquiring a target operation instruction for accessing a target data source through a query interface, wherein the query interface is a uniform interface for querying different types of data sources by a client, and the target operation instruction is an instruction described by a Structured Query Language (SQL).
The server obtains a target operation instruction for accessing a target data source through a query interface, the query interface is a uniform interface for querying different types of data sources by a client, and the target operation instruction is an instruction described by a Structured Query Language (SQL). In a large data processing system, because the types of data are various and the data amount is complicated, different types of data are stored in different databases, great convenience is provided for a client to query and call the data, but different query interfaces are required for the client to access different databases. For example: the Druid utilizes the REST interface to perform data query, is an efficient data query system and mainly solves the problem of performing aggregation query on a large amount of data based on time sequence; HBase utilizes a JavaAPI interface to perform data query, HBase is an open-source non-relational distributed database, and the programming language for realizing the HBase is Java. Therefore, the server obtains the operation instructions for different types of data sources, so as to facilitate data query, and the type of the target data source is not limited, so as to facilitate data query in multiple data sources. The uniform query interface for the client to access the database is a query interface of a preset data warehouse tool Hive, and because the access interfaces of different types of databases are different, the query interfaces are uniform. Hive has three main query interfaces: command-line interface (CLI), Client, and web product interface (WUI). The most common of them is the CLI, and the server will start a Hive copy at the same time when starting the CLI. The Client is the Client of the Hive, and when the Server starts the Client mode, the Client is connected to the node where the Hive Server is located, and the Hive Server is started at the node. WUI is the access to data by browser access Hive. In the embodiment of the present invention, the query interface of Hive is not limited.
It should be noted that the preset data warehouse tool in the embodiment of the present invention is Hive, and Hive is a data warehouse processing tool with Hadoop packaged at the bottom, and data query is implemented by using SQL-like language, where all Hive data is stored in a Hadoop-compatible file system. Hive does not modify data in the process of loading data, but moves the data to a directory set by Hive in a distributed file system (HDFS). The Hive comprises an interpreter, a compiler and an optimizer, and can complete lexical analysis, syntactic analysis, compilation and optimization of the query statement. The feature of Hive supports the analysis of the query commands of other different databases, so the data query is carried out on the basis of Hive in the invention.
It is further explained that, since SQL is widely used in data warehouses, the server uses the SQL language as the target operation instruction.
SQL is divided into two parts, a data operation language and a data definition language, and is syntax for executing queries, and also contains syntax for updating, inserting and deleting records enough for compilation of query programs. The following is a commonly used compilation statement for SQL:
for example, a database is created using SQL:
hive>create database financials;
hive>create database ifnot exists financials;
and querying the data in the table by using SQL:
hive>select*from student;
202. and acquiring a target grammar identifier of the target data source according to the target operation instruction, wherein the target grammar identifier is used for indicating the instruction grammar of the target data source.
And the server acquires a target grammar identifier of the target data source according to the target operation instruction, wherein the target grammar identifier is used for indicating the instruction grammar of the target data source. Specifically, the server reads a target language rule of a target operation instruction; the server converts the target language rule into a grammar tree; the server generates a parser of the target language rule; and the server analyzes the target operation instruction based on the syntax tree and the analyzer to obtain a target syntax identifier of the target data source, wherein the target syntax identifier is used for indicating the instruction syntax of the target data source.
When the client accesses different types of databases, different access languages are needed, the server converts and translates the target operation instruction to obtain a target grammar identifier of the target data source, the target grammar identifier is an instruction grammar used for indicating the target data source, and the server can access the corresponding database by using the converted target operation instruction. When extracting the target grammar identifier of the target data source, the server needs to analyze the target operation instruction, and the server acquires the target grammar identifier corresponding to the target data source by analyzing the target operation instruction.
It is further explained that, because the query language of Hive is SQL language, the server here obtains the language rules of SQL.
Taking access to the HBase database as an example: java is an instruction syntax for indicating the HBase database, so that the server accesses a target operation instruction of the HBase according to the description of the SQL language and obtains a target syntax identifier which needs to be converted into Java. In this process: the server reads the target language rule of SQL; the server converts the target language rule of the SQL into a syntax tree; the server generates a parser of the target language rule of the SQL, and the server parses the target operation instruction by using the syntax tree and the parser; and the server extracts a target grammar identifier of the HBase from the analyzed target operation instruction, wherein the target grammar identifier is Java.
203. Reading the grammar rules of the target grammar identifications in a preset data warehouse tool.
And the server reads the grammar rules of the target grammar identifications in the preset data warehouse tool. And after the server acquires the target grammar identification of the target data source, reading the grammar rule of the target grammar identification in a preset data warehouse tool.
The language rules are divided into lexical rules and grammatical rules, and the lexical rules define a mode of converting the code character string sequence into the mark sequence; the grammar rules define the way in which the sequence of tokens is converted into a grammar tree. Typically, the rule names of lexical rules are named in upper case letters, while the rule names of grammatical rules start in lower case letters.
For example, taking access to the HBase database as an example: and after the server acquires the target grammar identification Java of the HBase, reading a grammar rule of the Java in Hive.
204. And analyzing the grammar rule to obtain an abstract grammar tree.
And the server analyzes the grammar rule to obtain an abstract grammar tree. After the server analyzes the morphology and the grammar, if the expression needs to be further processed, the server converts the input sentence into a grammar tree while analyzing the grammar by using the abstract grammar tree grammar, and then completes the further processing when traversing the grammar tree.
205. And converting the abstract syntax tree to obtain a query block.
And the server converts the abstract syntax tree to obtain a query block. And traversing the abstract syntax tree by the server, and converting the abstract syntax tree into a query block. The query block is the most basic unit in an instruction, namely a sub-query, and comprises three parts: input sources, computing processes, and outputs.
The server generates a parser for the target language rules during the translation, the parser providing two mechanisms to traverse the generated syntax tree: listener and Visitor, when a server traverses a syntax tree using Listener mode, the inside of the server encounters different nodes in the process of traversing the nodes of the syntax tree, so the server calls different methods for providing Listener; when the server utilizes the Visitor mode, the server needs to manually designate access to a specific type of node. The server employs these two mechanisms to traverse the abstract syntax tree.
206. And translating the query block to obtain an execution operation tree.
And the server translates the query block to obtain an execution operation tree. And traversing the query block by the server, and recursively calling the sub-queries to obtain an execution operation tree.
The server translates the query block into instructions compiled using the grammar rules identified by the target grammar through the translated grammar tree and the generated parser, in which the server accesses the abstract grammar tree using Lister or Visitor.
207. And recompiling the target operation instruction by utilizing the execution operation tree to obtain the target handle.
And the server recompiles the target operation instruction by using the execution operation tree to obtain the target handle. And traversing the execution operation tree by the server, and recompiling the target operation instruction, wherein the compiled instruction is a target handle, and the target handle is an instruction for accessing the target data source.
For example, taking the case that a server accesses data in the HBase as an example, the server describes an operation of accessing the HBase database by using SQL, and in Hive, the server reads syntax rules of Java accessing the HBase; the server analyzes the grammar rule by using the interpreter and converts the grammar rule into an abstract grammar tree; the server converts the abstract syntax tree into query blocks using a logical plan generator (including an optimizer); the server translates the query block to obtain an execution operation tree; and the server recompiles the target operation instruction by using the execution operation tree to obtain an instruction for accessing HBase compiled by Java, wherein the instruction compiled by Java is the target handle.
208. And inquiring the target data in the corresponding target data source according to the target handle.
And the server queries the target data in a target data source corresponding to the target handle according to the target handle.
All data in Hive is stored in the HDFS, and no special data storage format is provided, such as text format, sequence file format and parquetfile format are supported. Wherein Hive comprises the following data models: database (DB) appears in HDFS as $ { live. metastore. ware house. dir } directory next folder; an internal Table (Table) represents the next folder of the DB directory in the HDFS; an External Table (External Table) is similar to a Table, and the data storage location thereof can be in any specified path; partitions (partitions) appear as subdirectories under Table directories in the HDFS; buckets (buckets) appear in HDFS as multiple files under the same table entry after hash.
It is further understood that the data source can be abstracted into the External Table of Hive, and the server queries the External Table by using the target handle, i.e. can execute the instruction for accessing the database.
209. And acquiring an execution log of the target handle, and generating alarm information in the execution log.
And the server acquires an execution log of the target handle and generates alarm information in the execution log. Specifically, the server acquires an execution log of the target handle and extracts a target keyword, wherein the target keyword is a sensitive word in the execution process of the target handle, and a preset log sensitive table is arranged in the execution log; the server judges whether the target keyword is matched with a preset log sensitive table or not; and if the target keyword is matched with the preset log sensitive table, the server generates alarm information in the execution log.
It is understood that the server extracts a target keyword, where the target keyword is a sensitive word generated during the process of executing the query by the handle, and where the target keyword is generated during the process of executing the query by the server. And when the server normally executes the query task and no error occurs, the target keyword is not matched with the preset log sensitive table, and no alarm information is generated in the execution log. And after judging whether the target keyword is matched with the preset log sensitive table or not, whether alarm information is generated in the execution log or not can be known, and if the alarm information is generated in the execution log, the error exists in the process of executing the query task.
The preset log sensitive table set by the server is abnormal information occurring in the process of executing the query by the handle, and the abnormal information causes that the server cannot continuously execute the query task. The setting of the log sensitive table is preset, so that the server can timely find out errors or non-compliant operations in execution, and timely feed back alarm information, thereby ensuring the accuracy and safety of server data transmission.
210. And feeding back a query result, wherein the query result is used for indicating whether the target data is queried or not.
And the server feeds back a query result, wherein the query result is used for indicating whether the target data is queried or not. The server judges whether the target data is inquired or not, if the target data is not inquired and the alarm information is generated, the server feeds back the alarm information through the inquiry interface, and the alarm information is used for indicating that the target data is not inquired; and if the target data is inquired, the server feeds back the target data through the inquiry interface.
If the server generates alarm information in the execution log, the server directly feeds back the alarm information through the query interface; if no alarm information is generated in the execution log, the server directly feeds back the inquired target data through the inquiry interface, which indicates that no error occurs in the execution process of the inquiry task. By the operation, the server further guarantees a good operating environment under the condition of conveniently monitoring, inquiring and auditing the execution logs.
In the process of executing the query task, the server can also add an audit log, wherein the audit log is an annotation in the process of querying data.
It should be noted that the server may add an audit log, which is an annotation during the process of executing the query task by the server. The server adds the audit log in the process of executing the query task, so that the user can conveniently examine the information in the executing process.
According to the embodiment of the invention, the query instruction matched with each database is converted into the target handle by using Hive, and the data of different data sources is queried in a data query mode of a structured query language, so that the generation of a middle table is avoided, the data transmission quantity and transmission time are reduced, and the data query efficiency is improved.
The above describes the method for querying database data in the embodiment of the present invention, and the following describes the apparatus for querying database data in the embodiment of the present invention, referring to fig. 3, the apparatus for querying database data in the embodiment of the present invention includes:
referring to fig. 3, an embodiment of the apparatus for querying database data according to the embodiment of the present invention includes:
a first obtaining module 301, configured to obtain a target operation instruction for accessing a target data source through a query interface, where the query interface is a unified interface for querying different types of data sources by a client, and the target operation instruction is an instruction described by structured query language SQL;
a second obtaining module 302, configured to obtain, according to the target operation instruction, a target syntax identifier of the target data source, where the target syntax identifier is used to indicate instruction syntax of the target data source;
the conversion module 303 is configured to convert the target operation instruction into a target hook handle according to a preset data warehouse tool Hive and the target syntax identifier;
the query module 304 is configured to query, according to the target handle, the corresponding target data in the target data source;
a feedback module 305, configured to feed back a query result, where the query result is used to indicate whether the target data is queried.
In the embodiment of the present invention, a first obtaining module 301 obtains a target operation instruction for accessing a target data source through a query interface, where the query interface is a unified interface for a client to query different types of data sources, and the target operation instruction is an instruction described by structured query language SQL; the second obtaining module 302 obtains a target syntax identifier of the target data source according to the target operation instruction, where the target syntax identifier is used to indicate instruction syntax of the target data source; the conversion module 303 converts the target operation instruction into a target hook handle according to a preset data warehouse tool Hive and the target grammar identifier; the query module 304 queries the corresponding target data in the target data source according to the target handle; the feedback module 305 feeds back a query result indicating whether the target data is queried.
According to the embodiment of the invention, the query instruction matched with each database is converted into the target handle by using Hive, and the data of different data sources is queried in a data query mode of a structured query language, so that the generation of a middle table is avoided, the data transmission quantity and transmission time are reduced, and the data query efficiency is improved.
Referring to fig. 4, another embodiment of the apparatus for querying database data according to the embodiment of the present invention includes:
a first obtaining module 301, configured to obtain a target operation instruction for accessing a target data source through a query interface, where the query interface is a unified interface for querying different types of data sources by a client, and the target operation instruction is an instruction described by structured query language SQL;
a second obtaining module 302, configured to obtain, according to the target operation instruction, a target syntax identifier of the target data source, where the target syntax identifier is used to indicate instruction syntax of the target data source;
the conversion module 303 is configured to convert the target operation instruction into a target hook handle according to a preset data warehouse tool Hive and the target syntax identifier;
the query module 304 is configured to query, according to the target handle, the corresponding target data in the target data source;
a feedback module 305, configured to feed back a query result, where the query result is used to indicate whether the target data is queried.
Optionally, the second obtaining module 302 is specifically configured to:
reading a target language rule of the target operation instruction;
converting the target language rule into a grammar tree;
a parser to generate the target language rules;
and analyzing the target operation instruction based on the syntax tree and the analyzer to obtain the target syntax identifier of the target data source, wherein the target syntax identifier is used for indicating the instruction syntax of the target data source.
Optionally, the conversion module 303 is specifically configured to:
reading the grammar rule of the target grammar identifier in the preset data warehouse tool;
analyzing the grammar rule to obtain an abstract grammar tree;
converting the abstract syntax tree to obtain a query block;
translating the query block to obtain an execution operation tree;
and recompiling the target operation instruction by using the execution operation tree to obtain the target handle.
Optionally, the apparatus for querying database data further includes:
the generating module 306 is configured to obtain an execution log of the target handle, and generate alarm information in the execution log.
Optionally, the generating module 306 is specifically configured to:
acquiring an execution log of the target handle, and extracting a target keyword, wherein the target keyword is a sensitive word in the execution process of the target handle, and a preset log sensitive table is arranged in the execution log;
judging whether the target keyword is matched with the preset log sensitive table or not;
and if the target keyword is matched with the preset log sensitive table, generating alarm information in the execution log.
Optionally, the feedback module 305 is specifically configured to:
if the target data is not inquired and the alarm information is generated, feeding back the alarm information through the inquiry interface, wherein the alarm information is used for indicating that the target data is not inquired;
and if the target data is inquired, feeding back the target data through the inquiry interface.
Optionally, the apparatus for querying database data further includes:
and an adding module 307, configured to add an audit log, where the audit log is an annotation in the data query process.
In the embodiment of the present invention, a first obtaining module 301 obtains a target operation instruction for accessing a target data source through a query interface, where the query interface is a unified interface for a client to query different types of data sources, and the target operation instruction is an instruction described by structured query language SQL; the second obtaining module 302 obtains a target syntax identifier of the target data source according to the target operation instruction, where the target syntax identifier is used to indicate instruction syntax of the target data source; the conversion module 303 converts the target operation instruction into a target hook handle according to a preset data warehouse tool Hive and the target grammar identifier; the query module 304 queries the corresponding target data in the target data source according to the target handle; a generating module 306, configured to obtain an execution log of the target handle, and generate alarm information in the execution log; the feedback module 305 feeds back a query result, wherein the query result is used for indicating whether the target data is queried or not; and an adding module 307, configured to add an audit log, where the audit log is an annotation in the data query process.
According to the embodiment of the invention, the query instruction matched with each database is converted into the target handle by using Hive, and the data of different data sources is queried in a data query mode of a structured query language, so that the generation of a middle table is avoided, the data transmission quantity and transmission time are reduced, and the data query efficiency is improved.
Fig. 3 to fig. 4 describe the database query apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the database query apparatus in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of an apparatus for querying database data according to an embodiment of the present invention, where the apparatus 500 for querying database data may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 501 (e.g., one or more processors) and a memory 509, and one or more storage media 508 (e.g., one or more mass storage devices) for storing applications 507 or data 506. Memory 509 and storage medium 508 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 508 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a query database data device. Still further, the processor 501 may be configured to communicate with the storage medium 508 to execute a series of instruction operations in the storage medium 508 on the device 500 for querying database data.
The apparatus 500 for querying database data may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input-output interfaces 504, and/or one or more operating systems 505, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the configuration of the apparatus for querying database data shown in FIG. 5 does not constitute a limitation of the apparatus for querying database data, and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the apparatus for querying database data in detail with reference to fig. 5:
the processor 501 is a control center of an apparatus for querying database data, and may perform processing according to a method for querying database data. The processor 501 is connected to various parts of the whole device for querying database data through various interfaces and lines, and by running or executing the data stored in the memory 509, the problem of different query modes when querying database data is solved, and the data query efficiency is improved. The storage medium 508 and the memory 509 are carriers for storing data, in the embodiment of the present invention, the storage medium 508 may be an internal memory with a small storage capacity but a high speed, and the memory 509 may be an external memory with a large storage capacity but a low storage speed.
The memory 509 may be used to store software programs and modules, and the processor 501 executes various functional applications and data processing of the apparatus 500 for querying database data by operating the software programs and modules stored in the memory 509. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from use of the query database data device, and the like. Further, the memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. The program for querying database data and the received data stream provided in the embodiment of the present invention are stored in the memory, and when they are needed to be used, the processor 501 calls from the memory 509.
When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, optical fiber, twisted pair) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., compact disk), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.