CN110990425B - JDBC driving method and device of hardware database - Google Patents

JDBC driving method and device of hardware database Download PDF

Info

Publication number
CN110990425B
CN110990425B CN201911190816.4A CN201911190816A CN110990425B CN 110990425 B CN110990425 B CN 110990425B CN 201911190816 A CN201911190816 A CN 201911190816A CN 110990425 B CN110990425 B CN 110990425B
Authority
CN
China
Prior art keywords
jdbc
java
hardware database
hierarchy
set language
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.)
Active
Application number
CN201911190816.4A
Other languages
Chinese (zh)
Other versions
CN110990425A (en
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.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN201911190816.4A priority Critical patent/CN110990425B/en
Publication of CN110990425A publication Critical patent/CN110990425A/en
Application granted granted Critical
Publication of CN110990425B publication Critical patent/CN110990425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/24569Query processing with adaptation to specific hardware, e.g. adapted for using GPUs or SSDs
    • 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/25Integrating or interfacing systems involving database management systems

Landscapes

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

Abstract

The invention provides a JDBC driving method and a JDBC driving device of a hardware database, wherein the method comprises the following steps: calling a corresponding execution method of a State element class in a JDBC interface according to the execution type of the SQL Statement of the Java code level, and transmitting the SQL Statement to a method allowing the Java code to interact with a set language code; converting SQL sentences into SQL sentences of a set language code hierarchy by a method of allowing Java codes to interact with the set language codes and transmitting the SQL sentences into a parser of the set language code hierarchy so as to identify the syntax types of the SQL sentences and return a syntax tree of a format which can be adapted by a hardware database; distributing the syntax tree to a hardware database so as to execute corresponding operation according to the syntax tree and return execution result information of a set language code level; and returning the Java code level execution result information to the JDBC interface according to the execution result information so as to output the execution result information. The hardware database can serve users of the application program of the Java code hierarchy through the scheme.

Description

JDBC driving method and device of hardware database
Technical Field
The invention relates to the technical field of databases, in particular to a JDBC driving method and device of a hardware database.
Background
At present, access to a database (e.g., ordinary databases such as MySQL, Oracle, etc.) mainly depends on a Central Processing Unit (CPU), and when the data access amount is too large, it will take a lot of time to read a data table of the database only by calculation of the CPU.
The hardware database can be independently calculated based on hardware, and the access task of the data table in the common database is undertaken and completed by the hardware without excessive participation of a host CPU, so that the dependence on the host CPU when the database is accessed can be greatly reduced by utilizing the hardware database. However, since Java has various frameworks, can implement rich business logic, and has a good ecological environment, the current scenario that the database is mainly used is mostly at the Java code level, that is, the JDBC standard interface is used to implement the addition, deletion, check and modification of the database.
However, the current JDBC standard interface cannot implement adaptation of Java code level user applications to hardware databases.
Disclosure of Invention
In view of this, embodiments of the present invention provide a JDBC driving method and apparatus for a hardware database, so that the hardware database can serve users of Java code level applications.
In order to achieve the purpose, the invention is realized by adopting the following scheme:
according to an aspect of an embodiment of the present invention, a JDBC driving method for a hardware database is provided, where a hardware database with a set language code hierarchy is connected to a JDBC interface, the method including:
calling a corresponding execution method of a State element class in a JDBC interface according to the execution type of the received SQL Statement of the Java code level, and transmitting the SQL Statement of the Java code level to a method for allowing the Java code to interact with a set language code; wherein the set language is different from the Java language;
converting the SQL sentences of the Java code hierarchy into SQL sentences of the set language code hierarchy by the method for allowing the Java code to interact with the set language code and transmitting the SQL sentences into a parser of the set language code hierarchy so as to identify the grammar types of the SQL sentences and return a grammar tree of a format which can be adapted to a hardware database according to the identified grammar types;
distributing the syntax tree to the hardware database so as to execute corresponding operation according to the syntax tree and return execution result information of a set language code level;
and returning the execution result information of the Java code layer to the JDBC interface according to the execution result information of the set language code layer so as to output the execution result information of the Java code layer.
In some embodiments, the hardware database is connected with a common database based on a set language code hierarchy through ODBC; before distributing the syntax tree to the hardware database to execute corresponding operations according to the syntax tree and return execution result information of a set language code hierarchy, the JDBC driving method for the hardware database further comprises:
instantiating a Connection class by a getConnection method of a DriveManager class in the JDBC interface to obtain a Connection class instance;
calling the method allowing the Java code to interact with the set language code through a Connection class instance and establishing Connection between the hardware database and an access interface of the common database based on an ODBC method;
and loading the data table in the common database to the hardware database based on the established connection between the access interfaces of the hardware database and the common database.
In some embodiments, the method for allowing Java code to interact with the set language code is JNI.
In some embodiments, the programming language is the C + + language.
According to another aspect of the embodiments of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the above embodiments when executing the program.
According to a further aspect of embodiments of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method of the above embodiments.
The JDBC driving method, the electronic device and the computer-readable storage medium of the hardware database of the embodiment of the invention can call the method supported by the set language by modifying the implementation layer of the JDBC interface, and interact with the hardware database at the set language code level. And obtaining a query result of the hardware database from the SQL query requested by the JDBC interface, and returning the query result set for the JDBC interface to obtain. By calling the JDBC driving method of the hardware database in the embodiment of the invention and accessing the content of the hardware database according to the standard interface of the JDBC, the application program of the user can enable the hardware database to serve the user of the application program at the Java code level, efficiently finish query and execution operations and play a role in accelerating database access.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flow chart of a JDBC driving method for a hardware database according to an embodiment of the present invention;
FIG. 2 is a flow chart of a JDBC driving method for a hardware database according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a JDBC driver for a hardware database according to an embodiment of the present invention;
FIG. 4 is a flow diagram illustrating the creation and closing of a connection in an exemplary embodiment of the invention;
FIG. 5 is a flow chart illustrating the SQL statement delivery according to an embodiment of the invention;
FIG. 6 is a diagram of a result set decoding process in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
JDBC (Java Data Base Connectivity) is a Java API (Java application program interface) that can provide unified access to multiple relational databases, allowing Java applications to interact with common databases to perform operations such as SQL queries. The code level for accessing the hardware database is generally not Java, for example, C + +, and software level adaptation is required for accessing the hardware database if Java application of the user can access the hardware database.
In order to solve the above problem, an embodiment of the present invention provides a JDBC driving method for a hardware database, where a Java application program accesses the hardware database by driving the hardware database through a modified JDBC interface.
It should be noted that the hardware database is a hardware-based database, and may be a database calculated, managed and stored by dedicated hardware, such as an FPGA (Field-Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), a GPU (Graphics Processing Unit), and the like, and may obtain a data source from a general database, so as to complete at least part of tasks in SQL statements submitted by a user Application program. One end of the JDBC interface can be directly or indirectly connected with a hardware database, and the other end of the JDBC interface can be connected with an application program of a user. In addition, the common database may refer to a CPU-based mainstream database, e.g., Oracle, MySQL, or the like.
Fig. 1 is a flowchart illustrating a JDBC driving method for a hardware database according to an embodiment of the present invention. Referring to fig. 1, in a case where a hardware database of a set language code hierarchy is connected to a JDBC interface, a JDBC driving method of the hardware database of some embodiments may include the following steps S110 to S140. The hardware database of the set language code hierarchy may be a hardware database that can be accessed at the set language code hierarchy. The set language is a language other than Java, and may be, for example, C + +, C, or the like.
Specific embodiments of steps S110 to S140 will be described in detail below.
Step S110: calling a corresponding execution method of a State element class in a JDBC interface according to the execution type of the received SQL Statement of the Java code level, and transmitting the SQL Statement of the Java code level to a method for allowing the Java code to interact with a set language code; wherein the set language is different from the Java language.
In step S110, the execution type of the SQL statement may be a modification type or a query type. In practice, the modification types may more specifically include one or more of insert row, delete row, update row, add table, and delete table modifications. Therefore, in other embodiments, the execution type of the SQL Statement may be divided into more specific types, and specifically, may be determined according to a specific execution method in the state class in the JDBC interface.
For example, in a case that the execution type of the SQL Statement is a modified type, the syntax type of the SQL Statement may include one or more of operations of inserting a row, deleting a row, updating a row, adding a table, and deleting a table, at this time, the step S110 calls a corresponding execution method of a state class in the JDBC interface according to the execution type of the received SQL Statement of the Java code hierarchy, and transfers the SQL Statement of the Java code hierarchy to a method that allows the Java code to interact with the set language code, and more specifically, the step S may include: s1111, according to the execution type of the received SQL Statement of the Java code level, calling an executeUpdate method of a State element class in the JDBC interface, and transmitting the SQL Statement of the Java code level to a method allowing the Java code to interact with a set language code.
In step S1111, the SQL Statement related to modifying the database can be transferred to the method for allowing the Java code to interact with the set language code through the executeUpdate method of the state class, and at this time, the execution result information in the later-described steps (e.g., step S130, step S140) may include an execution status flag, which may be success or failure.
For another example, in a case that the execution type of the SQL Statement is a query type, the syntax type of the SQL Statement in step S120 described later may include a selection operation, and in this case, in step S110, the corresponding execution method of the state class in the JDBC interface is called according to the execution type of the received SQL Statement in the Java code hierarchy, and the SQL Statement in the Java code hierarchy is transferred to a method that allows the Java code to interact with the set language code, and more specifically, the method may include the steps of: s1121, according to the execution type of the received SQL Statement of the Java code hierarchy, calling an executeQuery method of a State element class in a JDBC interface, and transmitting the SQL Statement of the Java code hierarchy to a method allowing the Java code to interact with a set language code;
for SQL statements that do not involve modifying the database, such as query statements, the execution type of the SQL statements in step S1121 may be a query type, and the syntax type of the SQL statements in step S120, which will be described later, may be identified as a selection operation. The syntax type of the SQL statement and the execution type of the SQL statement differ mainly in that the partitioning may be different.
In step S1121, the SQL Statement that does not relate to modifying the database can be transferred to the method that allows the Java code to interact with the set language code through the executeQuery method of the state class, and at this time, the execution result information in the following steps (e.g., step S130, step S140) may include a query result set, where the query result set may include data of the application program that needs to be returned to the user.
In the above step S110, the method for allowing the Java code to interact with the set language code may be various methods capable of realizing the interaction between the Java code and another language, and may realize the conversion of the language code layer. The method for allowing the Java code to interact with the set language code may be an existing method or a method implemented by writing a code by itself, and may be, for example, an existing JNI (Java Native Interface) method or an improved JNI method, where the JNI method may provide a standard mechanism for allowing the Java code to interact with the C/C + + code, and the interaction between the Java code and the C/C + + code may be implemented by the JNI method.
SQL statements of the Java code hierarchy may refer to SQL statements from Java applications. The JDBC interface may refer to an existing JDBC standard interface. The user can submit the SQL statement request to the JDBC interface through the Java application program, but the existing JDBC interface connects the database at the Java code level, so the method of connecting the database directly using the existing JDBC interface cannot connect the hardware database. Therefore, in step S110, after the JDBC interface receives the Java code level SQL statement, the Java code level SQL statement is not directly transferred to the hardware database, but is transferred to a method that allows the Java code to interact with the set language code, so that the conversion from the Java code level to the set language code level can be implemented.
Step S120: and converting the SQL statement of the Java code hierarchy into the SQL statement of the set language code hierarchy by the method for allowing the Java code to interact with the set language code, transmitting the SQL statement of the Java code hierarchy into an analyzer of the set language code hierarchy, identifying the syntax type of the SQL statement, and returning a syntax tree of a format which can be adapted to a hardware database according to the identified syntax type.
In step S120, the parser for setting the language code hierarchy may be implemented by writing a code in a setting language outside the hardware database, and the main function of the parser is to recognize a syntax type of the SQL statement and return to a syntax tree according to the recognized syntax type. The syntax type may be a modification type or a query type, and may be more specifically recognized as an operation of inserting a line, deleting a line, updating a line, adding a table, or deleting a table for the modification type, and may be recognized as a selection operation for the query type. The syntax tree can be configured in advance according to various syntax types (a query executor, the format of the configured syntax tree should have a format that can be adapted by a hardware database), and then the parser can find the required syntax tree in the configured syntax tree according to the identified syntax type and return the syntax tree. The syntax tree can play a role of a query executor, can be realized by writing codes by adopting set language codes, and can contain operation nodes and connection relations among the nodes. In addition, the format that the hardware database can be adapted to may include a data storage format and the like, and may be specific to the specific hardware database. In addition, the parser and syntax tree described above may be executed in memory.
In order to access the application programming interface of the hardware database of the set language code level to the JDBC interface of the Java code level, the interaction between the Java code level and the set language code level needs to be considered. And allows the Java code level to call the interface of the set language code function by a method that allows the Java code to interact with the set language code. Therefore, in step S110, the corresponding execution method of the state class in the JDBC interface is called, the SQL Statement of the Java code level is transferred to the method for allowing the Java code to interact with the set language code, in this step S120, by converting the SQL statement of the Java code hierarchy into the SQL statement of the set language code hierarchy by the method for allowing Java code to interact with the set language code and transmitting it into the parser of the set language code hierarchy, a function declaration can be given in the Java code hierarchy, then the function declarations can be realized at the set language code level, and the set language code can be compiled into a dynamic link library for Java code level calling, therefore, the operation of calling the set language code level by the Java code level can be completed, and the communication and the adaptation of the Java level application program and the set language code level hardware database are realized.
In step S120, the method for allowing the Java code to interact with the set language code may be connected between the JDBC interface and the hardware database, so as to perform the function of transmitting the SQL statement. For example, the method for allowing Java code to interact with the set language code may be JNI, and in this case, the JNI may be connected between a JDBC interface and a hardware database, in other words, the JDBC interface may be connected with the hardware database through the JNI.
The specific implementation of converting the SQL statement of the Java code hierarchy into the SQL statement of the set language code hierarchy by a method of allowing Java code to interact with the set language code may be implemented using the prior art, such as a parse method in JNI, or may be implemented by writing the code by itself.
This step S120, which is to convert the SQL statement of the Java code hierarchy into the SQL statement of the set language code hierarchy by the method for allowing Java code to interact with the set language code and transmit the SQL statement into the parser of the set language code hierarchy, so as to recognize the syntax type of the SQL statement and return a syntax tree of a format that can be adapted to the hardware database according to the recognized syntax type, may include the following steps: s121, converting the SQL sentences of the Java code levels into SQL sentences of the set language code levels by a parse method in JNI, transmitting the SQL sentences into a parser of the set language code levels to identify the grammar types of the SQL sentences, and returning to a grammar tree of a format which can be adapted to the hardware database according to the identified grammar types.
If an application programming interface of a hardware database of the C + + code hierarchy is to be accessed to the Java code hierarchy, the interaction between the Java code hierarchy and the C + + code hierarchy needs to be considered. The existing JNI technology can provide a method for communication from Java to C + + and allows Java code to call an interface of a C + + function in a hierarchical mode. In step S110, the SQL Statement of the Java code hierarchy may be transferred to the JNI by calling a corresponding execution method of the state class in the JDBC interface; in step S121, the SQL statement is shifted from the Java code hierarchy to the C + + code hierarchy by the parse method in the JNI. Therefore, function declarations are given in the Java code level, then the function declarations can be realized in the C + + code level, and the C + + code can be compiled into a dynamic link library for Java code level calling, so that the C + + code level calling operation of the Java code level can be completed, and communication and adaptation of a Java level application program and a C + + code level hardware database are realized.
Step S130: and distributing the syntax tree to the hardware database so as to execute corresponding operation according to the syntax tree and return execution result information of a set language code hierarchy.
In step S130, the syntax tree is returned by the parser for setting language code hierarchy, and the format is able to adapt to the hardware database, and the syntax tree contains the content that the statement needs to execute, so the syntax tree can be transferred into the hardware database, so that the SQL statement can be executed.
In the case that the types of the SQL statements are different, the execution result information returned by the hardware database may be different. For example, in the case that the execution type of the SQL statement in step S120 is the modification type, the returned execution result information in step S130 may include an execution status identifier, and may identify whether the modification is successful. For another example, in the case that the execution type of the SQL statement in step S120 is the query type, the execution result information may be the data content obtained by the query.
Step S140: and returning the execution result information of the Java code layer to the JDBC interface according to the execution result information of the set language code layer so as to output the execution result information of the Java code layer.
In other words, the execution result information may only include the execution result state, for example, the execution success or failure is returned to the JDBC interface, so that the JDBC interface displays the execution result state to the client.
In a case where the execution type of the SQL statement is a query type, generally, the data of the query needs to be returned to the client, in this case, the step S140 returns the execution result information of the Java code hierarchy to the JDBC interface according to the execution result information of the set language code hierarchy, so as to output the execution result information of the Java code hierarchy, and specifically, the method may include the steps of: s1411, converting the query result set with the set language code level into a query result set with a Java code level, and returning the query result set with the Java code level to the JDBC interface to output execution result information with the Java code level.
Further, the step S1411, more specifically, may include the steps of: s14111, reading bytes in the query result set of the set language code hierarchy by moving a pointer pointing to a two-dimensional array of the query result set of the set language code hierarchy according to a set byte format, and extracting form information of the query result set according to the read bytes; the query result set of the set language code hierarchy is stored according to the set byte format; s14112, establishing a key-value pair dictionary having the type of the table cell data as a key and an array including the number of the table cell as a value, according to the table cell data having the type of the table cell data in the table frame information as the type of the same table cell data; s14113, copying table unit data of the same type of table unit data into a two-dimensional array of a Java code hierarchy for adjacent storage to obtain a query result set of the Java code hierarchy; s14114, filling the obtained data of the Java code level query result centralized table unit to the corresponding position of the ResultSet class instance in the JDBC interface according to the key value pair dictionary, so as to output the data of the Java code level query result centralized table unit in a traversing manner.
In step S14111, since the set language code level query result set is stored in the set byte format, by moving the pointer to the two-dimensional array of the set language code level query result set in the set byte format, a byte having one information unit, for example, table data of one row in a certain column can be read out at a time. In this step S14112, the array containing the numbers of the table cells may be an array or data composed of the numbers of the table cells, or may otherwise form values in key value pairs. One table element may correspond to a key-value pair consisting of one type and one number, and the key-value pairs of different table elements may be different, specifically, the types may be different or the same, and the numbers are different. In steps S14112 to S14114, the table frame information includes a type of table cell data, where a table cell may be a column or a row, and then the type of table cell data may be a column data type or a row data type accordingly. Specifically, for example, in the case where the table unit is a column, the table frame information may include one or more of the number of columns, the number of rows, the column name, and the maximum column width in addition to the table unit data type (i.e., column data type). For another example, in the case where the table cells are rows, the table frame information may include one or more of the number of columns, the number of rows, the row name, and the maximum row width in addition to the table cell data type (i.e., row data type). And analyzing the query result set on the byte level according to the table frame information.
In the above steps S14112 and S14113, the types of all the table unit data may be divided into several types, the table unit data of the same type is stored by type with the type as a key, and the array formed by the numbers of the table units as a value to form a key value dictionary pair, and the table unit data of the same type is copied to a two-dimensional array of the Java code hierarchy to be stored in close proximity (when the table unit is listed as a table unit, the table unit data of the same type may be stored side by side), so that the table unit data of the same type can be stored in the same storage space, which may facilitate simplifying storage management and facilitating uniform conversion of data types.
In step S14114, the ResultSet class instance in the JDBC interface may include an array for storing the query result, and the array may have an index, and the index may correspond to the number in the key-value pair dictionary, so that the table unit data may be read according to the key-value pair dictionary and filled into the corresponding position (index position) of the array in the ResultSet class instance. And after the position filling data used for storing the result in the ResultSet class instance in the JDBC interface is displayed to the client.
Further, before this step S14111, that is, before reading the bytes in the query result set of the set language code hierarchy by moving the pointer to the two-dimensional array of the query result set of the set language code hierarchy in the set byte format, the method of the embodiments may further include the steps of: s14115, checking whether the two-dimensional array of the query result set of the set language code hierarchy is empty by pointing the pointer to the head of the two-dimensional array of the query result set of the set language code hierarchy, if so, returning an empty query identifier, and if not, reading the bytes in the query result set of the set language code hierarchy by moving the pointer pointing to the two-dimensional array of the query result set of the set language code hierarchy according to the set byte format (step S14111).
In step S14115, before moving the pointer according to the set byte format and reading the data, the pointer may point to the data header, and if the header has no data, no data exists in other array positions, which indicates that the query result is empty, the pointer does not need to be moved continuously to try to read the query result. Therefore, when the query result is empty, the empty query result can be quickly returned.
In the JDBC driving method for a hardware database according to each embodiment, the JDBC interface is declared at the Java code level, and then the Java code is transferred to the set language code by using a method that allows the Java code to interact with the set language code, so that the JDBC driving method is implemented at the set language code level, and can be called by the Java code, thereby implementing the docking between the application program at the Java code level and the hardware database at the set language code level.
In addition, the data source of the hardware database can be from a common database, and table data required by estimation can be loaded to the hardware database from the common database in advance, or the required table data can be loaded to the hardware database in a JDBC interface-driven manner. For example, table data may be loaded to a hardware Database by JDBC driving and using ODBC (Open Database Connectivity).
Fig. 2 is a flowchart illustrating a JDBC driving method for a hardware database according to another embodiment of the present invention. Referring to fig. 2, the hardware database may be connected to a general database based on a set language code hierarchy through ODBC, in this case, the JDBC driving method for a hardware database of fig. 1 may further include, before step S130, that is, before distributing the syntax tree to the hardware database to perform corresponding operations according to the syntax tree and return the execution result information of the set language code hierarchy:
step S150: instantiating a Connection class by a getConnection method of a DriveManager class in the JDBC interface to obtain a Connection class instance;
step S160: calling the method allowing the Java code to interact with the set language code through a Connection class instance and establishing Connection between the hardware database and an access interface of the common database based on an ODBC method;
step S170: and loading the data table in the common database to the hardware database based on the established connection between the access interfaces of the hardware database and the common database.
In the step S160, the method for allowing the Java code to interact with the set language code may be JNI, and the JDBC interface may be connected to the hardware database through the JNI. The set language may be a C language or a C + + language.
In the case that the method for allowing the Java code to interact with the set language code is JNI, the step S160, namely, invoking the method for allowing the Java code to interact with the set language code through the Connection class instance and establishing the Connection between the access interfaces of the hardware database and the general database based on the ODBC method, may specifically include the steps of: s161, calling the buildConnection in the JNI through the Connection class instance and establishing the Connection between the access interfaces of the hardware database and the common database based on the ODBC method.
In step S161, the hardware database and the normal database are both on the set language code level, so that the connection between the hardware database and the normal database can be specifically established by using the buildConnection in the JNI and using the branch matching handle and the connection creation method in the ODBC.
In step S170, after the connection between the hardware database and the general database is established, the table data of the general database may be loaded into the hardware database to prepare the data.
Under the condition that the execution type of the SQL statement is the modification type, the table data in the database is not modified any more after the hardware database executes the corresponding operation of the statement, and at the moment, the modification of the table data can be synchronized to the common database based on the connection between the hardware database and the common database so as to keep the database consistent.
For example, when the execution type of the SQL statement is a modified type, that is, after the step S130, the syntax tree is distributed to the hardware database, so as to execute a corresponding operation according to the syntax tree and return execution result information of a set language code hierarchy, the JDBC driving method for the hardware database according to each embodiment may further include the steps of: s180, based on the established connection between the access interfaces of the hardware database and the common database, the modified content in the hardware database is synchronized to the common database. Therefore, the modification consistency of the hardware database and the common database can be maintained.
In other embodiments, the modified content in the hardware database may be synchronized to the generic database in other ways. In addition, if the execution type of the SQL statement is the query type and the table data in the database is not changed, the step S180 may not be executed.
In other embodiments, the JDBC driving method for hardware database shown in fig. 2 may further include the following steps: and S190, returning the number of the connection between the access interfaces of the hardware database and the common database. After the connection is established, a corresponding number may be generated for the connection, and then the JDBC interface may be made available to the number by this step S190 for subsequent deletion/release of the connection. For example, after step S140, that is, after returning the execution result information of the Java code hierarchy to the JDBC interface according to the execution result information of the set language code hierarchy, the JDBC driving method for a hardware database shown in fig. 2 may further include the steps of: and S1100, calling the method for allowing the Java code to interact with the set language code through a close method of a Connection class in the JDBC interface, and deleting the Connection according to the number of the Connection. In this step S1100, the connection-related content can be found from the number of the connection, and deletion/release of the connection can be performed.
Further, in the case that the method for allowing the Java code to interact with the set language code is JNI, the step S1100 is to call the method for allowing the Java code to interact with the set language code through a close method of a Connection class in the JDBC interface, and delete the Connection according to the number of the Connection, and more specifically, the method may include the steps of: s1101, calling a deleteConnection in JNI through a close method of a Connection class in the JDBC interface to delete the Connection according to the number of the Connection. In other embodiments, the connection may be deleted in other ways.
In the embodiments, the connection is created by using the ODBC technology for the JDBC interface to call, so that the connection between the hardware database and the common database can be realized under the drive of the JDBC, and the table data synchronization between the hardware database and the common database can be realized based on the connection.
In addition, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, where the processor implements the steps of the JDBC driving method for the hardware database according to the foregoing embodiments when executing the program. The electronic device may be a computer, a server, a chip, etc., and the present invention is not limited thereto.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the JDBC driving method for hardware databases according to the foregoing embodiments.
In order that those skilled in the art will better understand the present invention, embodiments of the present invention will be described below with reference to specific examples.
In order to make the application programming interface of the hardware database access to the Java code level, the details of the interaction between the Java code level and the C + + code level need to be considered. The existing JNI technology provides a method for communication from Java to C + + and allows Java code to call an interface of a C + + function in a hierarchical mode. Function declarations are given in a Java code level, then the function declarations are realized in a C + + code level, and then the C + + code is compiled into a dynamic link library for calling of the Java code level. Thereby completing the operation of calling the C + + code level method by the Java code level. JNI technology is used, and communication between a Java layer and a hardware database is possible.
Data of the hardware database is originated from a mainstream database system, and a method for communicating with the mainstream database system on a C + + level is also needed. The ODBC technology provides a uniform interface for accessing the heterogeneous database, and SQL statements are allowed to be executed on a C + + code level to obtain a query result. By using the ODBC technology, the data migration and synchronization from the main stream database to the hardware database can be realized.
Therefore, the embodiment proposes a JDBC driver for a database of a hardware database based on JDBC technology, JNI technology, ODBC technology, and the like.
Fig. 3 is a flowchart of a JDBC driver for a hardware database according to an embodiment of the present invention. Fig. 4 is a flow chart illustrating the creation and closing of a connection in an embodiment of the invention. Fig. 5 is a schematic diagram of SQL statement delivery flow in an embodiment of the invention. FIG. 6 is a diagram of a result set decoding process in accordance with an embodiment of the present invention.
The hardware database-oriented database JDBC driving method according to an embodiment may include a connection management process, an SQL statement transfer process, and a result set decoding process. The hardware database can be a database calculated, managed and stored based on special hardware such as an FPGA, an ASIC and the like. The mainstream database (generic database) may be a database of industry mainstream applications such as Oracle, MySql, etc. Referring to fig. 3, the driving method of this embodiment may include the following steps S1 to S3:
s1: when the application calls the JDBC driver to establish the connection with the database, the underlying codes for establishing the database connection by the native JDBC standard are not executed, and the C + + code level is switched to initialize the connection management module.
In step S1, the portion of JDBC standard related to the implementation of Connection class managed by the database is modified, the method of Java code hierarchy for connecting to the database is abandoned, the method of C + + code hierarchy is used instead for connecting to the database, and the read-write access to the database is managed inside the C + + code hierarchy. The Java code layer is responsible for recording the connection handle of the database, and the code implementation of creating and deleting the connection handle is completed in the C + + code layer. For database access, a connection to the mainstream database is created using ODBC (interface specification for connecting data sources to access the database), relevant connection handles are assigned, and parts related to hardware database management are initialized. The definition of the data type set is different for different databases, and different data types need to be converted into data formats supported by C + +. According to different types of SQL sentences, users can use different JDBC standard interface functions, but call the same local method of JNI (through JNI technology, the declaration in Java code level can be allowed, and the implementation in C + + code level) to transfer the SQL sentences, and then analyze the SQL sentences in the C + + code level and perform corresponding processing.
Referring to fig. 4, the connection management process may include the steps of:
(1) in Java code level, a user application program instantiates a Connection class through a getConnection method of a DriveManager class in a JDBC standard interface;
(2) the Connection class instance calls a JNI local method buildConnection and transfers to a C + + code level;
(3) in the implementation of the buildConnection method, according to the incoming connection parameters, establishing connection to a data source by using an ODBC technology, wherein the data source is an externally exposed access interface of a main stream database, and a data table of the main stream database can be accessed through the data source;
(4) initializing other modules related to managing the hardware database, and synchronizing the hardware database with the main stream database subsequently;
(5) after the two databases are synchronized, the application program can begin to access the data table in the hardware database;
(6) returning the serial number of the database connection, and using the serial number when the connection is subsequently released; and calling the deleteConnection of the JNI local method by the user application program through the close method of the Connection class in the JDBC standard interface, and deleting the database Connection by virtue of the serial number.
S2: and the user application program transmits SQL statements through the established database connection and delivers the SQL statements to a parser of the C + + code level for syntactic analysis.
In this step S2, the implementation part of the state class in JDBC, which is the class involved in executing the query, will be modified. The SQL sentence transfer module transfers the SQL sentences to a syntax parser of a C + + code hierarchy, judges the sentence types of the SQL sentences and distributes the sentence types to different query executors (syntax trees) according to the types.
Referring to fig. 5, the SQL statement delivery procedure may include the following steps:
(1) if the data user application program of the database needs to be added, deleted and modified, calling an executeUpdate method of a State element type in a JDBC standard interface; if the query Statement is to be executed, calling an executeQuery method of a State element class in a JDBC standard interface; both of them are used for transmitting SQL sentences to JNI local method parse and transferring to C + + code level;
(2) the parse method transmits the SQL sentence into a parser for syntax parsing, and judges the syntax type: for the grammar type of the modified database data, identifying operations such as inserting rows, deleting rows, updating rows, adding tables, deleting tables and the like; for the grammar type of the query database data, identifying as a select column operation;
(3) for different grammar types, distributing the grammar tree returned by the resolver to the input end of the hardware database; wherein, the syntax tree is a format which can be adapted by a hardware database;
(4) aiming at the column selection operation of the query database data, the hardware database is set to be in a read-only mode, and the hardware database returns the query result in a specific byte format. Aiming at other operations of changing the database content, the hardware database is in a writing mode, and the hardware database returns an execution state identifier.
S3: and after the specific byte format query result is obtained from the hardware database, the result set decoding module decodes the specific byte format query result.
This step S3 will involve querying the class of the result set, i.e., modifying the implementation portion of the ResultSet class in JDBC. This step S3 defines a format for storing result sets in bytes, and performs byte-level decoding on the query result sets returned by the hardware database. The method comprises the steps of obtaining frame information (information for describing the attribute of a data table) such as column number, row number, column name, column data type, maximum column width and the like of a query data table, and extracting unit data of various data types of the data table according to a column unit. And at the C + + code level, the column unit data of the same data type is placed in the storage space of the same data type side by side. And through the conversion of the unified data type, the storage address of C + + is changed into the storage address of Java. And then, at the Java code level, opening up space according to the line size and the column size, and putting back the column unit data in sequence according to the column index to obtain a query result set.
Referring to fig. 6, the execution of this step S3 (result set decoding) includes the following steps:
(1) in the C + + code level, for a result set in a specific byte format returned by a hardware database, a pointer points to the head of the result set to check whether the result set is empty, if the result set is empty, the process is directly finished, and an empty query identifier is returned; otherwise, the step (2) is carried out;
(2) moving a pointer according to a specific byte format, reading corresponding bytes, and extracting each attribute of the table frame information;
(3) for columns of the same column data type, establishing a key value pair dictionary, taking the column data type as a key, and taking an array formed by a plurality of column numbers as a value;
(4) copying table cell data (such as storage data in cells of a data table indexed according to rows and columns) of the same column data type into a two-dimensional array according to a first dimension and a second dimension, and sequentially storing each column of data in rows and columns;
(5) converting the two-dimensional array storage address of the C + + code level into a two-dimensional array storage address of a Java code level;
(6) at the Java code level, sequentially filling each line of data into a correct index (number) position according to a two-dimensional array of the same data type and a key value pair dictionary to form a query result set capable of being directly displayed;
(7) returning to the ResultSet class instance, and allowing the application program to call the next to acquire the query result set of the SQL statement according to methods such as row traversal and the like, or acquiring the execution condition of the SQL statement.
In this embodiment, a method supported by the C + + language is invoked by modifying an implementation layer of the JDBC interface, and the C + + code level interacts with the hardware database. And obtaining a query result of the hardware database from the SQL query requested by the JDBC interface, and returning the query result set for the JDBC interface to obtain. The application program of the user calls the JDBC driver package facing the hardware database of this embodiment, and accesses the content of the hardware database according to the standard interface of the JDBC, thereby completing efficient query and execution and playing a role in accelerating the database.
In summary, according to the JDBC driving method for a hardware database, the electronic device, and the computer-readable storage medium of the embodiments of the present invention, the corresponding execution method of the state class in the JDBC interface is called according to the execution type of the received Java code level SQL Statement, and the Java code level SQL Statement is transferred to a method that allows interaction between the Java code and the set language code; converting the SQL sentences of the Java code hierarchy into SQL sentences of the set language code hierarchy by the method for allowing the Java code to interact with the set language code and transmitting the SQL sentences into a parser of the set language code hierarchy so as to identify the grammar types of the SQL sentences and return a grammar tree of a format which can be adapted to a hardware database according to the identified grammar types; distributing the syntax tree to the hardware database so as to execute corresponding operation according to the syntax tree and return execution result information of a set language code level; and returning the execution result information of the Java code layer to the JDBC interface according to the execution result information of the set language code layer so as to output the execution result information of the Java code layer. Therefore, the method supported by the set language can be called by modifying the implementation layer of the JDBC interface, and the interaction with the hardware database is realized at the code level of the set language. And obtaining a query result of the hardware database from the SQL query requested by the JDBC interface, and returning the query result set for the JDBC interface to obtain. By calling the JDBC driving method of the hardware database in the embodiment of the invention and accessing the content of the hardware database according to the standard interface of the JDBC, the application program of the user can enable the hardware database to serve the user of the application program at the Java code level, efficiently finish query and execution operations and play a role in accelerating database access.
Moreover, the present invention is a result of inventive work because: although some methods for modifying the JDBC interface implementation exist, the main focus of the method is on optimization methods such as distributed processing, virtual database, task prioritization, and the like, and the implementation method of the method for connecting the databases stays at the Java code level. In addition, in methods of distributed processing, virtual databases, task priority ordering and the like, the main point of modifying JDBC interface is to distribute query requests to different hosts to realize load balancing. The access speed of different hosts to the own database still depends on the calculation of the CPU of the host. When the data amount is too large, the process of reading the data table will be time-consuming and huge only by the calculation of the host CPU. Therefore, the prior art does not teach the present invention.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the various embodiments is provided to schematically illustrate the practice of the invention, and the sequence of steps is not limited and can be suitably adjusted as desired.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. A JDBC driving method of hardware database is characterized in that the hardware database with set language code level is connected with JDBC interface, the method includes:
calling a corresponding execution method of a State element class in a JDBC interface according to the execution type of the received SQL Statement of the Java code level, and transmitting the SQL Statement of the Java code level to a method for allowing the Java code to interact with a set language code; wherein the set language is different from the Java language;
converting the SQL sentences of the Java code hierarchy into SQL sentences of the set language code hierarchy by the method for allowing the Java code to interact with the set language code and transmitting the SQL sentences into a parser of the set language code hierarchy so as to identify the grammar types of the SQL sentences and return a grammar tree of a format which can be adapted to a hardware database according to the identified grammar types;
distributing the syntax tree to the hardware database so as to execute corresponding operation according to the syntax tree and return execution result information of a set language code level;
and returning the execution result information of the Java code layer to the JDBC interface according to the execution result information of the set language code layer so as to output the execution result information of the Java code layer.
2. The JDBC driven method of a hardware database according to claim 1, wherein the execution type of the SQL statement is a modification type or a query type.
3. The JDBC driving method for a hardware database according to claim 2, wherein in a case that the execution type of the SQL statement is a modification type, the syntax type of the SQL statement includes one or more of operations of inserting a row, deleting a row, updating a row, adding a table, and deleting a table, and the execution result information includes an execution state identifier;
according to the execution type of the received SQL Statement of the Java code level, calling a corresponding execution method of a State element class in a JDBC interface, and transmitting the SQL Statement of the Java code level to a method for allowing Java codes to interact with set language codes, wherein the method comprises the following steps:
and calling an executeUpdate method of a State element class in the JDBC interface according to the execution type of the received SQL Statement of the Java code hierarchy, and transmitting the SQL Statement of the Java code hierarchy to a method for allowing the Java code to interact with a set language code.
4. The JDBC driving method for a hardware database according to claim 2, wherein in a case where the execution type of the SQL statement is a query type, the syntax type of the SQL statement includes a selection operation, and the execution result information includes a query result set;
according to the execution type of the received SQL Statement of the Java code level, calling a corresponding execution method of a State element class in a JDBC interface, and transmitting the SQL Statement of the Java code level to a method for allowing Java codes to interact with set language codes, wherein the method comprises the following steps:
calling an executive query method of a State element class in a JDBC interface according to the execution type of the received SQL Statement of the Java code level, and transmitting the SQL Statement of the Java code level to a method allowing the Java code to interact with a set language code;
returning the execution result information of the Java code layer to the JDBC interface according to the execution result information of the set language code layer so as to output the execution result information of the Java code layer, wherein the execution result information of the Java code layer comprises the following steps:
and converting the query result set of the set language code hierarchy into a query result set of a Java code hierarchy, and returning the query result set of the Java code hierarchy to the JDBC interface so as to output execution result information of the Java code hierarchy.
5. The JDBC driving method for a hardware database according to claim 4, wherein converting a set of query results of a set language code hierarchy into a set of query results of a Java code hierarchy and returning the set of query results of the Java code hierarchy to the JDBC interface to output execution result information of the Java code hierarchy, comprises:
reading bytes in the query result set of the set language code hierarchy by moving a pointer pointing to a two-dimensional array of the query result set of the set language code hierarchy according to a set byte format, and extracting table frame information of the query result set according to the read bytes; the query result set of the set language code hierarchy is stored according to the set byte format;
according to the table unit data of which the types are the same in the table frame information, establishing a key-value pair dictionary which takes the types of the table unit data as keys and takes an array comprising the numbers of the table units as values;
copying table unit data of the same type of table unit data into a two-dimensional array of a Java code hierarchy to be stored in an adjacent manner, so as to obtain a query result set of the Java code hierarchy;
and filling the obtained data of the table unit in the query result set of the Java code hierarchy to the corresponding position of the ResultSet class instance in the JDBC interface according to the key value pair dictionary so as to output the data in the table unit in the query result set of the Java code hierarchy in a traversing manner.
6. The JDBC driving method for a hardware database according to claim 5, wherein before reading bytes in the query result set of the set language code hierarchy by moving a pointer to a two-dimensional array of the query result set of the set language code hierarchy in a set byte format, further comprising:
and checking whether the two-dimensional array of the query result set of the set language code hierarchy is empty or not by pointing the pointer to the head of the two-dimensional array of the query result set of the set language code hierarchy, if so, returning an empty query identifier, and if not, reading bytes in the query result set of the set language code hierarchy by moving the pointer pointing to the two-dimensional array of the query result set of the set language code hierarchy according to a set byte format.
7. The JDBC driving method of a hardware database according to claim 5, wherein the table elements are columns or rows.
8. The JDBC driving method of a hardware database of claim 7, wherein in case of a column being a table cell, the table frame information includes a column data type, and further includes one or more of a column number, a row number, a column name, and a maximum column width.
9. The JDBC driving method for a hardware database according to any one of claims 1 to 8, wherein the hardware database is connected to a general database based on a set language code hierarchy through ODBC;
before distributing the syntax tree to the hardware database to execute corresponding operations according to the syntax tree and return execution result information of a set language code hierarchy, the method further comprises the following steps:
instantiating a Connection class by a getConnection method of a DriveManager class in the JDBC interface to obtain a Connection class instance;
calling the method allowing the Java code to interact with the set language code through a Connection class instance and establishing Connection between the hardware database and an access interface of the common database based on an ODBC method;
and loading the data table in the common database to the hardware database based on the established connection between the access interfaces of the hardware database and the common database.
10. The JDBC driving method of the hardware database of claim 9,
the method further comprises the following steps:
returning the number of the connection between the access interfaces of the hardware database and the common database;
after returning the execution result information of the Java code layer to the JDBC interface according to the execution result information of the set language code layer, the method further comprises the following steps:
and calling the method for allowing the Java code to interact with the set language code through a close method of a Connection class in the JDBC interface, and deleting the Connection according to the number of the Connection.
11. The JDBC driving method for a hardware database according to claim 9, wherein in a case that the execution type of the SQL statement is a modification type, the method further comprises, after distributing the syntax tree to the hardware database to perform a corresponding operation according to the syntax tree and return execution result information of a set language code hierarchy, the method further comprising:
and synchronizing the modified content in the hardware database to the common database based on the established connection between the access interfaces of the hardware database and the common database.
12. The JDBC driving method for a hardware database according to claim 9, wherein the method for allowing Java code to interact with set language code is JNI, and the JDBC interface is connected to the hardware database through JNI.
13. The JDBC driven method of claim 12, wherein the step of converting the SQL statements of the Java code hierarchy into SQL statements of the set language code hierarchy by the method for allowing Java code to interact with the set language code and passing them into a parser of the set language code hierarchy to identify syntax types of the SQL statements and return syntax trees of a format that can be adapted by the hardware database according to the identified syntax types comprises:
and converting the SQL sentences of the Java code hierarchy into SQL sentences of the set language code hierarchy by a parse method in the JNI, transmitting the SQL sentences into a parser of the set language code hierarchy to identify the grammar types of the SQL sentences, and returning to a grammar tree of a format which can be adapted to the hardware database according to the identified grammar types.
14. The JDBC driving method for a hardware database according to claim 12, wherein the method for allowing Java code to interact with set language code is called by a Connection class instance and a Connection between the access interfaces of the hardware database and the generic database is established based on an ODBC method, comprising:
and calling a buildConnection in the JNI through the Connection class instance and establishing Connection between the hardware database and the access interface of the common database based on an ODBC method.
15. The JDBC driving method for a hardware database according to claim 10, wherein in a case where the method for allowing Java code to interact with set language code is JNI, the method for allowing Java code to interact with set language code is called through a close method of a Connection class in the JDBC interface, and the Connection is deleted according to a number of the Connection, the method comprising:
and calling a deleteConnection in the JNI through a close method of a Connection class in the JDBC interface to delete the Connection according to the number of the Connection.
16. The JDBC driving method for a hardware database according to claim 12, wherein the setting language is C + + language.
17. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 16 are implemented when the processor executes the program.
18. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 16.
CN201911190816.4A 2019-11-28 2019-11-28 JDBC driving method and device of hardware database Active CN110990425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911190816.4A CN110990425B (en) 2019-11-28 2019-11-28 JDBC driving method and device of hardware database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911190816.4A CN110990425B (en) 2019-11-28 2019-11-28 JDBC driving method and device of hardware database

Publications (2)

Publication Number Publication Date
CN110990425A CN110990425A (en) 2020-04-10
CN110990425B true CN110990425B (en) 2020-12-25

Family

ID=70087823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911190816.4A Active CN110990425B (en) 2019-11-28 2019-11-28 JDBC driving method and device of hardware database

Country Status (1)

Country Link
CN (1) CN110990425B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111639118A (en) * 2020-05-29 2020-09-08 金现代信息产业股份有限公司 Dynamic generation method and system for test report of power equipment
CN111897522B (en) * 2020-06-16 2021-09-03 中科驭数(北京)科技有限公司 Development and display system and method for hardware database
CN112948478A (en) * 2021-04-07 2021-06-11 深圳市易博天下科技有限公司 Link-based code analysis method and device, electronic equipment and storage medium
CN113239102A (en) * 2021-05-17 2021-08-10 上海中通吉网络技术有限公司 Json-based method for querying database result
CN113468169B (en) * 2021-06-02 2022-09-09 中科驭数(北京)科技有限公司 Hardware database query method, database system query method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761265A (en) * 2014-01-02 2014-04-30 上海起维信息科技有限公司 NoSQL (not only SOL) based medical information system database implementation method
CN105279286A (en) * 2015-11-27 2016-01-27 陕西艾特信息化工程咨询有限责任公司 Interactive large data analysis query processing method
CN107301097A (en) * 2016-04-14 2017-10-27 阿里巴巴集团控股有限公司 It is a kind of to call java objects, the storage method of the reference address information of java objects and device
CN107423390A (en) * 2017-07-21 2017-12-01 上海德拓信息技术股份有限公司 A kind of real time data synchronization algorithm based on inside OLTP OLAP mixed relationship type Database Systems
CN109976746A (en) * 2018-11-28 2019-07-05 四川商通实业有限公司 A kind of visual configuration application interface method
CN110032575A (en) * 2019-04-15 2019-07-19 网易(杭州)网络有限公司 Data query method, apparatus, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9348870B2 (en) * 2014-02-06 2016-05-24 International Business Machines Corporation Searching content managed by a search engine using relational database type queries

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761265A (en) * 2014-01-02 2014-04-30 上海起维信息科技有限公司 NoSQL (not only SOL) based medical information system database implementation method
CN105279286A (en) * 2015-11-27 2016-01-27 陕西艾特信息化工程咨询有限责任公司 Interactive large data analysis query processing method
CN107301097A (en) * 2016-04-14 2017-10-27 阿里巴巴集团控股有限公司 It is a kind of to call java objects, the storage method of the reference address information of java objects and device
CN107423390A (en) * 2017-07-21 2017-12-01 上海德拓信息技术股份有限公司 A kind of real time data synchronization algorithm based on inside OLTP OLAP mixed relationship type Database Systems
CN109976746A (en) * 2018-11-28 2019-07-05 四川商通实业有限公司 A kind of visual configuration application interface method
CN110032575A (en) * 2019-04-15 2019-07-19 网易(杭州)网络有限公司 Data query method, apparatus, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Application of design pattern in the JDBC programming";Gui-lan He et al.;《International Conference on Computer Science & Education》;20130715;第1037-1040页 *
"JNI技术在嵌入式软件开发中的应用";高晶 等;《海尔滨师范大学自然科学学报》;20071231;第23卷(第6期);第62-65页 *
"基于JNI技术的组态软件数据库访问方法及应用";张淼淼 等;《工业控制计算机》;20111231;第24卷(第9期);第3-5页 *

Also Published As

Publication number Publication date
CN110990425A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110990425B (en) JDBC driving method and device of hardware database
WO2020233367A1 (en) Blockchain data storage and query method, apparatus and device, and storage medium
US20200320091A1 (en) Schemaless to relational representation conversion
US10534764B2 (en) Partial merge
US6279008B1 (en) Integrated graphical user interface method and apparatus for mapping between objects and databases
US8321838B2 (en) Techniques for debugging computer programs involving multiple computing machines
US9740715B2 (en) Deleting records in a multi-level storage architecture
US6374256B1 (en) Method and apparatus for creating indexes in a relational database corresponding to classes in an object-oriented application
US7107578B1 (en) Techniques for debugging computer programs involving multiple programming languages
US7761411B2 (en) Delta operations on a large object in a database
US6243709B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
US5802523A (en) Method and apparatus for reducing the memory required to store bind variable descriptors in a database
EP2660732B1 (en) Unified table query processing
US6477540B1 (en) Method and apparatus for using Java as a stored procedure language and as an embedded language on a client
US10452655B2 (en) In-memory cursor duration temp tables
CN107766526B (en) Database access method, device and system
KR20170024039A (en) Managing data with flexible schema
US20100235344A1 (en) Mechanism for utilizing partitioning pruning techniques for xml indexes
US10585871B2 (en) Database engine for mobile devices
US10558661B2 (en) Query plan generation based on table adapter
US11016973B2 (en) Query plan execution engine
CN117421302A (en) Data processing method and related equipment
WO1999033004A1 (en) An integrated graphical user interface method and apparatus for mapping between objects and databases
EP1040432B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
CN110647535A (en) Method, terminal and storage medium for updating service data to Hive

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
GR01 Patent grant
GR01 Patent grant