WO2024060956A1 - Hybrid database management method and apparatus, hybrid database, and electronic device - Google Patents

Hybrid database management method and apparatus, hybrid database, and electronic device Download PDF

Info

Publication number
WO2024060956A1
WO2024060956A1 PCT/CN2023/116095 CN2023116095W WO2024060956A1 WO 2024060956 A1 WO2024060956 A1 WO 2024060956A1 CN 2023116095 W CN2023116095 W CN 2023116095W WO 2024060956 A1 WO2024060956 A1 WO 2024060956A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
interface
hybrid
preset
access
Prior art date
Application number
PCT/CN2023/116095
Other languages
French (fr)
Chinese (zh)
Inventor
高昆仑
乔贵邠
赵保华
陈国宝
张亮
周飞
林剑超
Original Assignee
国网智能电网研究院有限公司
方图数据(北京)软件股份有限公司
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 国网智能电网研究院有限公司, 方图数据(北京)软件股份有限公司 filed Critical 国网智能电网研究院有限公司
Publication of WO2024060956A1 publication Critical patent/WO2024060956A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • 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
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Definitions

  • the present invention is based on a Chinese patent application with application number 202211148362.6 and a filing date of September 21, 2022, and claims the priority of the Chinese patent application.
  • the entire content of the Chinese patent application is hereby incorporated by reference into the present invention.
  • the present application relates to the technical field of database management, and in particular to a hybrid database management method, device, hybrid database and electronic device.
  • hybrid database products As users' requirements for the intelligence of current data management systems increase, hybrid database products have been widely used, such as hybrid databases composed of graph databases and relational databases.
  • Hybrid databases in the prior art usually perform mode isolation according to database type at the interface level. Users need to access the corresponding type of database in the specified mode. When the user needs to access other types of databases next, they need to change the database connection and switch to the corresponding mode. The operation process is relatively cumbersome, which reduces the application efficiency of the hybrid database.
  • This application provides a hybrid database management method, device, hybrid database and electronic equipment to solve the shortcomings of the existing technology, such as reducing the application efficiency of the hybrid database.
  • the first aspect of this application provides a hybrid database management method, including:
  • hybrid database server Based on the shared connection of the hybrid database server, establish communication with each database included in the hybrid database to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database;
  • the preset second database connection interface is called at the interface layer of the first database to connect and access the second database.
  • calling the preset second database connection interface at the interface layer of the first database includes:
  • the method further includes:
  • the context data includes at least session context data, user security authority context data and database transaction context data.
  • the method further includes:
  • the second database service is processed based on the second database data processing engine.
  • the method further includes:
  • the first database service is processed based on the first database data processing engine.
  • the first database is a graph database
  • the second database is a relational database
  • the first database access environment is a data query environment using Gremlin graph query language
  • the second database access environment is a data query environment using JDBC relational query language
  • the first database business interface is a Gremlin business interface
  • the The second database connection interface is a JDBC connection interface.
  • the second aspect of this application provides a hybrid database management device, including:
  • the first management part is configured to establish communication with each database included in the hybrid database based on the shared connection of the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database;
  • the second management part is configured to call the preset second database connection interface at the interface layer of the first database when it is necessary to access the second database in the first database access environment of the hybrid database to connect and Access the second database.
  • the second management part is further configured to:
  • a preset second database connection interface calling instruction is sent to the first database service interface to convert the currently called first database service interface into a preset second database connection interface.
  • the device further includes:
  • a third management part configured to uniformly manage all context data generated when accessing the first database and the second database to share all context data
  • the context data includes at least session context data, user security authority context data and database transaction context data.
  • the third management part is further configured to:
  • the second database service is processed based on the second database data processing engine.
  • the third management part is further configured to:
  • the first database service is processed based on the first database data processing engine.
  • the first database is a graph database
  • the second database is a relational database
  • the first database access environment is a data query environment using Gremlin graph query language
  • the second database access environment is a data query environment using JDBC relational query language
  • the first database business interface is a Gremlin business interface
  • the The second database connection interface is a JDBC connection interface.
  • the third aspect of this application provides a hybrid database, a first database, a second database and a hybrid database management device as described in the second aspect and various possible designs of the second aspect;
  • the interface layer of the first database has a preset second database connection interface
  • the interface layer of the second database has a preset first database connection interface
  • the hybrid database management adopts the hybrid database management method described in the first aspect and various possible designs of the first aspect to manage the first database and the second database.
  • a fourth aspect of the present application provides an electronic device, including: at least one processor and a memory;
  • the memory stores computer execution instructions
  • the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method described in the above first aspect and various possible designs of the first aspect.
  • a fifth aspect of the present application provides a computer-readable storage medium.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • a processor executes the computer-executable instructions, Methods as described in the first aspect and various possible designs of the first aspect.
  • the present application provides a hybrid database management method, device, hybrid database and electronic device, the method comprising: establishing communication with each database included in the hybrid database based on a shared connection of the hybrid database server to enter a first database access environment or a second database access environment; wherein the hybrid database comprises a first database and a second database; when the second database needs to be accessed in the first database access environment of the hybrid database, calling a preset second database connection interface at the interface layer of the first database to connect to and access the second database.
  • the method provided by the above scheme improves the application efficiency of the hybrid database by implementing the call of the second database connection interface in the first database access environment to quickly switch to access the second database.
  • FIG1 is a schematic diagram of a flow chart of a hybrid database management method provided in an embodiment of the present application.
  • Figure 2 is a schematic structural diagram of a hybrid database management device provided by an embodiment of the present application.
  • Figure 3 is a schematic structural diagram of a hybrid database provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Gremlin is based on Groovy, but has many language variants, allowing developers to write queries natively in programming languages such as Java and Python. It contains both imperative and declarative semantics, and can easily express the logic of graph traversal, so it is adopted by many graph database systems.
  • a relational database is based on the relational data model and uses mathematical concepts and methods such as set algebra to process data.
  • Various entities in the real world and various connections between entities can be represented by relational models.
  • the query language of relational database is SQL language, which is Structured Query Language (Structured Query Language), which is an advanced non-procedural programming language.
  • Java Database Connectivity is an application programming interface in the Java language that is used to standardize how client programs access databases. It provides methods such as querying and updating data in relational databases.
  • the hybrid database management method, device, hybrid database and electronic equipment establish communication with each database included in the hybrid database through a shared connection based on the hybrid database server to enter the first database access environment.
  • a second database access environment wherein the hybrid database includes a first database and a second database; when it is necessary to access the second database in the first database access environment of the hybrid database, the preset third database is called at the interface layer of the first database.
  • the second database connection interface is used to connect and access the second database.
  • the embodiment of the present application provides a hybrid database management method, which is used to manage the user's access to the hybrid database, so as to improve the application efficiency of the hybrid database.
  • the execution subject of the embodiment of this application is an electronic device that can be used as a hybrid database client, such as a server, a desktop computer, a notebook computer, Tablets and other electronic devices.
  • FIG. 1 it is a schematic flow chart of a hybrid database management method provided by an embodiment of the present application.
  • the method includes:
  • Step 101 Based on the shared connection of the hybrid database server, establish communication with each database included in the hybrid database to enter the first database access environment or the second database access environment.
  • the hybrid database includes a first database and a second database.
  • the first database may be a graph database
  • the second database may be a relational database.
  • the shared connection of the hybrid database server can be the IP address of the preset intermediate server, and the preset intermediate server is connected to the first database server and the third database server respectively.
  • the two database servers establish a communication connection.
  • the shared connection of the hybrid database server is the IP address of the server.
  • the client of the hybrid database can simultaneously establish communication connections with the first database and the second database based on the shared connection of the hybrid database server, so that the client can enter the first database access environment based on the shared connection or Second database access environment.
  • the first database access environment may be a data query environment using the Gremlin graph query language
  • the second database access environment may be a JDBC relational database
  • the first database business interface may be a Gremlin business interface
  • the second database connection interface may be a JDBC connection interface
  • the hybrid database management method provided by the embodiment of the present application realizes the connection and sharing of the running environment of the first database and the second database.
  • the first database instance and the second database instance are different from the perspective of user-side applications.
  • the physical connection is shared and reused, and the physical connection is the shared connection of the hybrid database server.
  • Step 102 When it is necessary to access the second database in the first database access environment of the hybrid database, call the preset second database connection interface in the interface layer of the first database to connect to and access the second database.
  • the user can call the preset second database connection interface in the interface layer of the first database based on instructions written in the Gremlin language in the first database access environment.
  • the interface layer of the first database may include several business interfaces (transaction interface), and at the same time be expanded with a second database connection interface (JDBC Connection interface) suitable for the second database.
  • transaction interface business interface
  • JDBC Connection interface second database connection interface
  • calling the preset second database connection interface in the interface layer of the first database includes:
  • Step 1021 Call the first database business interface at the interface layer of the first database
  • Step 1022 Send a preset second database connection interface call instruction to the first database business interface to convert the currently called first database business interface into the preset second database connection interface.
  • the first database service interface can be obtained first, the first database service interface instance of the first database instance can be obtained based on the first database service interface, and then the preset third database service interface instance can be introduced into the first database service interface instance.
  • the second database connection interface calls instructions to convert the currently called first database business interface into a preset second database connection interface.
  • the preset second database connection interface obtained through interface conversion in the embodiment of this application conforms to the connection interface specification of the second database, such as the Connection interface specification of JDBC.
  • JDBC Statement or PreparedStatement can be created, and these Statements can be used.
  • the interface performs query or update operations, or obtains the ResultSet of query results.
  • the Statement/PreparedStatement/ResultSet here all comply with the JDBC interface specification.
  • the user can obtain the database transaction on the graph data side through the aforementioned graph.tx() to control the database transaction;
  • the operation interface (such as Traversal, Computing, etc.) on the graph data side is obtained for operation.
  • the client can obtain the transaction control operation interface on the relational data side through the aforementioned Connection interface, and the operation interface executed in SQL language to perform relational data operations.
  • all context data generated when accessing the first database and the second database can also be managed uniformly to share all context data.
  • the context data includes at least session context data, user security permission context data and database transaction context data.
  • the first database and the second database realize the sharing of database transaction context data, whether the first database operation interface or the second database operation interface starts a database transaction (either automatically or manually),
  • the method further includes:
  • Step 301 Based on the preset second database connection interface, send the second database service to the second database to obtain the corresponding second database service processing result.
  • the second database service is processed based on the second database data processing engine.
  • the hybrid database can support OLAP+OLTP transaction management at the same time with a unified transaction management mechanism in the data processing core.
  • Data of different database types can be processed separately by different data processing engines. Processing, in order to achieve a hybrid operating environment of different engines that share the data operating environment.
  • the server of the first database or the second database requests the context from the same user and the same Session.
  • the first database and the second database will be in the same context running environment such as Session, database transactions, user permissions, etc., so their data processing core can support OLTP+OLAP transaction management at the same time with a unified transaction management mechanism.
  • the preset first database business interface can be called at the interface layer of the first database; based on the preset third database A database service interface sends the first database service to the first database to obtain the corresponding first database service processing result.
  • the first database service is processed based on the first database data processing engine.
  • graph data operations are performed by a graph data processing engine, that is, there is a language processing based on Gremlin language parsing and execution to drive a
  • a graph data processing engine characterized by point and edge data to implement graph database business processing and obtain corresponding graph database business processing results.
  • Relational data operations are performed by a relational processing engine, that is, there is a language processing based on SQL language parsing and execution to drive a relationship characterized by row tables and associated data between tables (that is, entities and a collection of relationships between entities).
  • a data processing engine to implement relational database business processing and obtain corresponding relational database business processing results.
  • the hybrid database management method establishes communication with each database included in the hybrid database through a shared connection based on the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes The first database and the second database; when it is necessary to access the second database in the first database access environment of the mixed database, The preset second database connection interface is called at the interface layer of the first database to connect to and access the second database.
  • the method provided by the above solution realizes the invocation of the second database connection interface in the first database access environment to quickly switch to access the second database, thereby improving the application efficiency of the hybrid database. Moreover, by introducing the data processing engine of each database to process the business of each database in parallel, the business processing efficiency of the hybrid database is improved.
  • the embodiment of the present application provides a hybrid database management device, used to execute the hybrid database management method provided in the above embodiment.
  • the hybrid database management device 20 includes: a first management part 201 and a second management part 202.
  • the first management part 201 is configured to establish communication with each database included in the hybrid database based on the shared connection of the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes a first database and a second database; the second management part 202 is configured to call a preset second database connection interface at the interface layer of the first database to connect to and access the second database when the second database needs to be accessed under the first database access environment of the hybrid database.
  • the second management part 202 is also configured to:
  • the device 20 further includes:
  • the third management part is configured to uniformly manage all context data generated when accessing the first database and the second database to share all context data;
  • the context data includes at least session context data, user security permission context data and database transaction context data.
  • the third management part is further configured to:
  • the second database service is processed based on the second database data processing engine.
  • the third management part is further configured to:
  • the preset first database business interface is called at the interface layer of the first database
  • the first database service is processed based on the first database data processing engine.
  • the first database is a graph database
  • the second database is a relational database
  • the first database access environment is a data query environment using the Gremlin graph query language
  • the second database access environment is a data query environment using the JDBC relational query language.
  • the first database business interface is the Gremlin business interface
  • the second database connection interface is the JDBC connection interface.
  • the hybrid database management device provided by the embodiment of the present application is used to execute the hybrid database management method provided by the above embodiment. Its implementation method is the same as the principle, and will not be described again.
  • the embodiment of the present application provides a hybrid database for applying the hybrid database management method provided in the above embodiment.
  • the hybrid database 30 includes: a first database 301, a second database 302, and the hybrid database management device 20 provided in the above embodiment.
  • the interface layer of the first database has a preset second database connection interface
  • the interface layer of the second database has a preset first database connection interface
  • the hybrid database management adopts the hybrid database management method provided in the above embodiment. The management method manages the first database and the second database.
  • the hybrid database provided by the embodiment of the present application is used to apply the hybrid database management method provided by the above embodiment. Its implementation method is the same as the principle, and will not be described again.
  • the embodiment of the present application provides an electronic device for executing the hybrid database management method provided in the above embodiment.
  • the electronic device 40 includes: at least one processor 41 and a memory 42 .
  • the memory stores computer-executed instructions; at least one processor executes the computer-executed instructions stored in the memory, so that at least one processor executes the hybrid database management method provided by the above embodiment.
  • An electronic device provided by an embodiment of the present application is used to execute the hybrid database management method provided by the above embodiment. Its implementation method is the same as the principle, and will not be described again.
  • Embodiments of the present application provide a computer-readable storage medium.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • the processor executes the computer-executed instructions, the hybrid database management method provided in any of the above embodiments is implemented.
  • the storage medium containing computer-executable instructions in the embodiment of the present application can be used to store the computer-executable instructions of the hybrid database management method provided in the previous embodiment.
  • the implementation method and principle are the same and will not be described again.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium and includes a number of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute the methods described in various embodiments of this application. Some steps.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code. .
  • the embodiment of the present application discloses a hybrid database management method, device, hybrid database and electronic device, including: based on the shared connection of the hybrid database server, establishing communication with each database included in the hybrid database to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database; when the second database needs to be accessed in the first database access environment of the hybrid database, calling the preset second database connection interface at the interface layer of the first database to connect and access the second database.
  • the second database can be quickly switched to access the second database, thereby improving the application efficiency of the hybrid database.

Abstract

The present application provides a hybrid database management method and apparatus, a hybrid database, and an electronic device. The method comprises: on the basis of a shared connection to a hybrid database server, establishing communications with databases comprised in a hybrid database, so as to enter a first database access environment or a second database access environment, the hybrid database comprising a first database and a second database; and when the second database needs to be accessed in the first database access environment of the hybrid database, calling a preset second database connection interface in an interface layer of the first database, so as to connect to and access the second database. According to the method provided by the solution, the second database connection interface is called in the first database access environment so as to quickly switch to access the second database, thereby improving the application efficiency of the hybrid database.

Description

一种混合数据库管理方法、装置、混合数据库及电子设备A hybrid database management method, device, hybrid database and electronic equipment
相关申请的交叉引用Cross-references to related applications
本发明基于申请号为202211148362.6、申请日为2022年9月21日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本发明作为参考。The present invention is based on a Chinese patent application with application number 202211148362.6 and a filing date of September 21, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into the present invention.
技术领域Technical field
本申请涉及数据库管理技术领域,尤其涉及一种混合数据库管理方法、装置、混合数据库及电子设备。The present application relates to the technical field of database management, and in particular to a hybrid database management method, device, hybrid database and electronic device.
背景技术Background technique
随着用户对目前数据管理系统智能化要求的提高,混合数据库产品得到了广泛的应用,例如图数据库和关系型数据库组成的混合数据库。As users' requirements for the intelligence of current data management systems increase, hybrid database products have been widely used, such as hybrid databases composed of graph databases and relational databases.
现有技术中的混合数据库通常在接口层面按照数据库类型进行模式隔离,用户需要在指定模式访问对应类型的数据库,当用户接下来需要访问其他类型的数据库时,需要通过改变数据库连接,切换到相应的模式,操作流程较为繁琐,降低了混合数据库的应用效率。Hybrid databases in the prior art usually perform mode isolation according to database type at the interface level. Users need to access the corresponding type of database in the specified mode. When the user needs to access other types of databases next, they need to change the database connection and switch to the corresponding mode. The operation process is relatively cumbersome, which reduces the application efficiency of the hybrid database.
发明内容Summary of the invention
本申请提供一种混合数据库管理方法、装置、混合数据库及电子设备,以解决现有技术降低了混合数据库的应用效率等缺陷。This application provides a hybrid database management method, device, hybrid database and electronic equipment to solve the shortcomings of the existing technology, such as reducing the application efficiency of the hybrid database.
本申请第一个方面提供一种混合数据库管理方法,包括:The first aspect of this application provides a hybrid database management method, including:
基于混合数据库服务端的共享连接,与所述混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,所述混合数据库包括第一数据库和第二数据库;Based on the shared connection of the hybrid database server, establish communication with each database included in the hybrid database to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database;
当在所述混合数据库的第一数据库访问环境下需要访问第二数据库时,在所述第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问所述第二数据库。When it is necessary to access the second database in the first database access environment of the hybrid database, the preset second database connection interface is called at the interface layer of the first database to connect and access the second database.
在一实施例中,所述在所述第一数据库的接口层调用预设的第二数据库连接接口,包括:In one embodiment, calling the preset second database connection interface at the interface layer of the first database includes:
在所述第一数据库的接口层调用第一数据库业务接口; Call the first database business interface at the interface layer of the first database;
向所述第一数据库业务接口发送预设的第二数据库连接接口调用指令,以将当前调用的所述第一数据库业务接口转换为预设的第二数据库连接接口。Send a preset second database connection interface calling instruction to the first database business interface to convert the currently called first database business interface into a preset second database connection interface.
在一实施例中,所述方法还包括:In one embodiment, the method further includes:
对访问所述第一数据库和第二数据库时产生的所有上下文数据进行统一管理,以共享所述所有上下文数据;Unified management of all context data generated when accessing the first database and the second database to share all context data;
其中,所述上下文数据至少包括会话上下文数据、用户安全权限上下文数据和数据库事务上下文数据。Wherein, the context data includes at least session context data, user security authority context data and database transaction context data.
在一实施例中,所述方法还包括:In one embodiment, the method further includes:
基于所述预设的第二数据库连接接口,向所述第二数据库发送第二数据库业务,以得到对应的第二数据库业务处理结果;Based on the preset second database connection interface, send a second database service to the second database to obtain the corresponding second database service processing result;
其中,所述第二数据库业务基于第二数据库数据处理引擎处理。Wherein, the second database service is processed based on the second database data processing engine.
在一实施例中,所述方法还包括:In one embodiment, the method further includes:
当在所述混合数据库的第一数据库访问环境下需要访问第一数据库时,在所述第一数据库的接口层调用预设的第一数据库业务接口;When it is necessary to access the first database in the first database access environment of the hybrid database, calling the preset first database business interface in the interface layer of the first database;
基于所述预设的第一数据库业务接口,向所述第一数据库发送第一数据库业务,以得到对应的第一数据库业务处理结果;Based on the preset first database service interface, sending the first database service to the first database to obtain the corresponding first database service processing result;
其中,所述第一数据库业务基于第一数据库数据处理引擎处理。Wherein, the first database service is processed based on the first database data processing engine.
在一实施例中,所述第一数据库为图数据库,所述第二数据库为关系型数据库;In one embodiment, the first database is a graph database, and the second database is a relational database;
所述第一数据库访问环境为使用Gremlin图查询语言的数据查询环境,所述第二数据库访问环境为使用JDBC关系查询语言的数据查询环境,所述第一数据库业务接口为Gremlin业务接口,所述第二数据库连接接口为JDBC连接接口。The first database access environment is a data query environment using Gremlin graph query language, the second database access environment is a data query environment using JDBC relational query language, the first database business interface is a Gremlin business interface, and the The second database connection interface is a JDBC connection interface.
本申请第二个方面提供一种混合数据库管理装置,包括:The second aspect of this application provides a hybrid database management device, including:
第一管理部分,被配置为基于混合数据库服务端的共享连接,与所述混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,所述混合数据库包括第一数据库和第二数据库;The first management part is configured to establish communication with each database included in the hybrid database based on the shared connection of the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database;
第二管理部分,被配置为当在所述混合数据库的第一数据库访问环境下需要访问第二数据库时,在所述第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问所述第二数据库。The second management part is configured to call the preset second database connection interface at the interface layer of the first database when it is necessary to access the second database in the first database access environment of the hybrid database to connect and Access the second database.
在一实施例中,所述第二管理部分,还被配置为:In one embodiment, the second management part is further configured to:
在所述第一数据库的接口层调用第一数据库业务接口;Call the first database business interface at the interface layer of the first database;
向所述第一数据库业务接口发送预设的第二数据库连接接口调用指令,以将当前调用的所述第一数据库业务接口转换为预设的第二数据库连接接口。 A preset second database connection interface calling instruction is sent to the first database service interface to convert the currently called first database service interface into a preset second database connection interface.
在一实施例中,所述装置还包括:In one embodiment, the device further includes:
第三管理部分,被配置为对访问所述第一数据库和第二数据库时产生的所有上下文数据进行统一管理,以共享所述所有上下文数据;A third management part configured to uniformly manage all context data generated when accessing the first database and the second database to share all context data;
其中,所述上下文数据至少包括会话上下文数据、用户安全权限上下文数据和数据库事务上下文数据。Wherein, the context data includes at least session context data, user security authority context data and database transaction context data.
在一实施例中,所述第三管理部分,还被配置为:In one embodiment, the third management part is further configured to:
基于所述预设的第二数据库连接接口,向所述第二数据库发送第二数据库业务,以得到对应的第二数据库业务处理结果;Based on the preset second database connection interface, send a second database service to the second database to obtain the corresponding second database service processing result;
其中,所述第二数据库业务基于第二数据库数据处理引擎处理。Wherein, the second database service is processed based on the second database data processing engine.
在一实施例中,所述第三管理部分,还被配置为:In one embodiment, the third management part is further configured to:
当在所述混合数据库的第一数据库访问环境下需要访问第一数据库时,在所述第一数据库的接口层调用预设的第一数据库业务接口;When it is necessary to access the first database in the first database access environment of the hybrid database, calling the preset first database business interface in the interface layer of the first database;
基于所述预设的第一数据库业务接口,向所述第一数据库发送第一数据库业务,以得到对应的第一数据库业务处理结果;Based on the preset first database service interface, send a first database service to the first database to obtain the corresponding first database service processing result;
其中,所述第一数据库业务基于第一数据库数据处理引擎处理。Wherein, the first database service is processed based on the first database data processing engine.
在一实施例中,所述第一数据库为图数据库,所述第二数据库为关系型数据库;In one embodiment, the first database is a graph database, and the second database is a relational database;
所述第一数据库访问环境为使用Gremlin图查询语言的数据查询环境,所述第二数据库访问环境为使用JDBC关系查询语言的数据查询环境,所述第一数据库业务接口为Gremlin业务接口,所述第二数据库连接接口为JDBC连接接口。The first database access environment is a data query environment using Gremlin graph query language, the second database access environment is a data query environment using JDBC relational query language, the first database business interface is a Gremlin business interface, and the The second database connection interface is a JDBC connection interface.
本申请第三方面提供一种混合数据库,第一数据库、第二数据库及如上第二个方面以及第二个方面各种可能的设计所述的混合数据库管理装置;The third aspect of this application provides a hybrid database, a first database, a second database and a hybrid database management device as described in the second aspect and various possible designs of the second aspect;
所述第一数据库的接口层有预设的第二数据库连接接口;The interface layer of the first database has a preset second database connection interface;
所述第二数据库的接口层有预设的第一数据库连接接口;The interface layer of the second database has a preset first database connection interface;
所述混合数据库管理采用如上第一个方面以及第一个方面各种可能的设计所述的混合数据库管理方法管理所述第一数据库和第二数据库。The hybrid database management adopts the hybrid database management method described in the first aspect and various possible designs of the first aspect to manage the first database and the second database.
本申请第四个方面提供一种电子设备,包括:至少一个处理器和存储器;A fourth aspect of the present application provides an electronic device, including: at least one processor and a memory;
所述存储器存储计算机执行指令;The memory stores computer execution instructions;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一个方面以及第一个方面各种可能的设计所述的方法。The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method described in the above first aspect and various possible designs of the first aspect.
本申请第五个方面提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现 如上第一个方面以及第一个方面各种可能的设计所述的方法。A fifth aspect of the present application provides a computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When a processor executes the computer-executable instructions, Methods as described in the first aspect and various possible designs of the first aspect.
本申请技术方案,具有如下优点:The technical solution of this application has the following advantages:
本申请提供一种混合数据库管理方法、装置、混合数据库及电子设备,该方法包括:基于混合数据库服务端的共享连接,与混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,混合数据库包括第一数据库和第二数据库;当在混合数据库的第一数据库访问环境下需要访问第二数据库时,在第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问第二数据库。上述方案提供的方法,通过在第一数据库访问环境下实现第二数据库连接接口的调用,以快速切换为访问第二数据库,提高了混合数据库的应用效率。The present application provides a hybrid database management method, device, hybrid database and electronic device, the method comprising: establishing communication with each database included in the hybrid database based on a shared connection of the hybrid database server to enter a first database access environment or a second database access environment; wherein the hybrid database comprises a first database and a second database; when the second database needs to be accessed in the first database access environment of the hybrid database, calling a preset second database connection interface at the interface layer of the first database to connect to and access the second database. The method provided by the above scheme improves the application efficiency of the hybrid database by implementing the call of the second database connection interface in the first database access environment to quickly switch to access the second database.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
图1为本申请实施例提供的混合数据库管理方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a hybrid database management method provided in an embodiment of the present application;
图2为本申请实施例提供的混合数据库管理装置的结构示意图;Figure 2 is a schematic structural diagram of a hybrid database management device provided by an embodiment of the present application;
图3为本申请实施例提供的混合数据库的结构示意图;Figure 3 is a schematic structural diagram of a hybrid database provided by an embodiment of the present application;
图4为本申请实施例提供的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本公开构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。Through the above-mentioned drawings, clear embodiments of the present application have been shown, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the present application to those skilled in the art with reference to specific embodiments.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments These are part of the embodiments of this application, but not all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
此外,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。在以下各实施例的描述中,“多个”的含义是两个以上,除非另有明确具体的限定。 Furthermore, the terms “first”, “second”, etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. In the description of the following embodiments, "plurality" means two or more, unless otherwise explicitly and specifically limited.
现有的图查询语言还没有一个统一的、标准化的查询语言,使用最为广泛的最典型的主流语言包括Gremlin和Cypher。Gremlin基于Groovy,但有许多语言变体,允许开发者以Java、Python等编程语言原生编写查询。它既包含命令式也包含声明式的语义,能方便表达图遍历的逻辑,所以被众多图数据库系统采用。There is no unified and standardized query language among the existing graph query languages. The most widely used and typical mainstream languages include Gremlin and Cypher. Gremlin is based on Groovy, but has many language variants, allowing developers to write queries natively in programming languages such as Java and Python. It contains both imperative and declarative semantics, and can easily express the logic of graph traversal, so it is adopted by many graph database systems.
关系型数据库建立在关系型数据模型的基础上,是借助于集合代数等数学概念和方法来处理数据的数据库。现实世界中的各种实体以及实体之间的各种联系均可用关系模型来表示。A relational database is based on the relational data model and uses mathematical concepts and methods such as set algebra to process data. Various entities in the real world and various connections between entities can be represented by relational models.
关系型数据库的查询语言是SQL语言,即结构化查询语言(Structured Query Language),是一种高级的非过程化编程语言。The query language of relational database is SQL language, which is Structured Query Language (Structured Query Language), which is an advanced non-procedural programming language.
Java数据库连接(Java Database Connectivity,简称:JDBC)是Java语言中用来规范客户端程序如何来访问数据库的应用程序接口,提供了诸如查询和更新关系型数据库中数据的方法。Java Database Connectivity (JDBC for short) is an application programming interface in the Java language that is used to standardize how client programs access databases. It provides methods such as querying and updating data in relational databases.
现有的智能应用,在图数据库的应用过程中,对于其它模式的数据为混合应用要求也越来越多,即在同一个应用系统中,使用图数据库的时候也使用到其它数据库类型,如文档数据库、关系数据库等,呈现“混合”模式的特性。In the application process of graph databases, existing intelligent applications have more and more requirements for hybrid applications of data in other modes. That is, in the same application system, when using graph databases, other database types, such as document databases, relational databases, etc., are also used, showing the characteristics of a "hybrid" mode.
但是,目前的混合数据库通常在接口层面按照数据库类型进行模式隔离,用户需要在指定模式访问对应类型的数据库,当用户接下来需要访问其他类型的数据库时,需要切换到相应的模式,操作流程较为繁琐,降低了混合数据库的应用效率。However, current hybrid databases usually implement mode isolation according to database types at the interface level. Users need to access the corresponding type of database in the specified mode. When the user needs to access other types of databases, they need to switch to the corresponding mode. The operation process is relatively complicated. It is cumbersome and reduces the application efficiency of hybrid databases.
针对上述问题,本申请实施例提供的混合数据库管理方法、装置、混合数据库及电子设备,通过基于混合数据库服务端的共享连接,与混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,混合数据库包括第一数据库和第二数据库;当在混合数据库的第一数据库访问环境下需要访问第二数据库时,在第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问第二数据库。上述方案提供的方法,通过在第一数据库访问环境下实现第二数据库连接接口的调用,以快速切换为访问第二数据库,提高了混合数据库的应用效率。In response to the above problems, the hybrid database management method, device, hybrid database and electronic equipment provided by the embodiments of the present application establish communication with each database included in the hybrid database through a shared connection based on the hybrid database server to enter the first database access environment. Or a second database access environment; wherein the hybrid database includes a first database and a second database; when it is necessary to access the second database in the first database access environment of the hybrid database, the preset third database is called at the interface layer of the first database. The second database connection interface is used to connect and access the second database. The method provided by the above solution realizes the invocation of the second database connection interface in the first database access environment to quickly switch to access the second database, thereby improving the application efficiency of the hybrid database.
下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本发明实施例进行描述。The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will be described below with reference to the accompanying drawings.
本申请实施例提供了一种混合数据库管理方法,用于管理用户端对混合数据库的访问,以提高混合数据库的应用效率。本申请实施例的执行主体为可作为混合数据库用户端的电子设备,比如服务器、台式电脑、笔记本电脑、 平板电脑及其他电子设备。The embodiment of the present application provides a hybrid database management method, which is used to manage the user's access to the hybrid database, so as to improve the application efficiency of the hybrid database. The execution subject of the embodiment of this application is an electronic device that can be used as a hybrid database client, such as a server, a desktop computer, a notebook computer, Tablets and other electronic devices.
如图1所示,为本申请实施例提供的混合数据库管理方法的流程示意图,该方法包括:As shown in Figure 1, it is a schematic flow chart of a hybrid database management method provided by an embodiment of the present application. The method includes:
步骤101,基于混合数据库服务端的共享连接,与混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境。Step 101: Based on the shared connection of the hybrid database server, establish communication with each database included in the hybrid database to enter the first database access environment or the second database access environment.
其中,混合数据库包括第一数据库和第二数据库,第一数据库具体可以为图数据库,第二数据库具体可以为关系型数据库。The hybrid database includes a first database and a second database. The first database may be a graph database, and the second database may be a relational database.
需要说明的是,当第一数据库和第二数据库部署在不同的服务器上时,混合数据库服务端的共享连接可以为预设的中间服务器的IP地址,预设中间服务器分别与第一数据库服务器和第二数据库服务器建立通信连接。当第一数据库和第二数据库部署在同一服务器上时,混合数据库服务端的共享连接即为该服务器的IP地址。It should be noted that when the first database and the second database are deployed on different servers, the shared connection of the hybrid database server can be the IP address of the preset intermediate server, and the preset intermediate server is connected to the first database server and the third database server respectively. The two database servers establish a communication connection. When the first database and the second database are deployed on the same server, the shared connection of the hybrid database server is the IP address of the server.
在一实施例中,混合数据库的用户端可以基于混合数据库服务端的共享连接,同时与第一数据库和第二数据库建立通信连接,以使该用户端能够基于该共享连接进入第一数据库访问环境或第二数据库访问环境。In one embodiment, the client of the hybrid database can simultaneously establish communication connections with the first database and the second database based on the shared connection of the hybrid database server, so that the client can enter the first database access environment based on the shared connection or Second database access environment.
示例性的,当第一数据库为图数据库,第二数据库为关系型数据库时,第一数据库访问环境具体可以为使用Gremlin图查询语言的数据查询环境,第二数据库访问环境具体可以为使用JDBC关系查询语言的数据查询环境,第一数据库业务接口具体可以为Gremlin业务接口,第二数据库连接接口具体可以为JDBC连接接口。For example, when the first database is a graph database and the second database is a relational database, the first database access environment may be a data query environment using the Gremlin graph query language, and the second database access environment may be a JDBC relational database. In the data query environment of the query language, the first database business interface may be a Gremlin business interface, and the second database connection interface may be a JDBC connection interface.
需要进一步说明的是,基于本申请实施例提供的混合数据库管理方法实现了第一数据库和第二数据库的连接和运行环境的共享,第一数据库实例和第二数据库实例从用户端应用的角度而言共享及复用了物理连接,该物理连接即为混合数据库服务端的共享连接。It should be further explained that the hybrid database management method provided by the embodiment of the present application realizes the connection and sharing of the running environment of the first database and the second database. The first database instance and the second database instance are different from the perspective of user-side applications. The physical connection is shared and reused, and the physical connection is the shared connection of the hybrid database server.
步骤102,当在混合数据库的第一数据库访问环境下需要访问第二数据库时,在第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问第二数据库。Step 102: When it is necessary to access the second database in the first database access environment of the hybrid database, call the preset second database connection interface in the interface layer of the first database to connect to and access the second database.
在一实施例中,用户可以在第一数据库访问环境下,基于Gremlin语言编写的指令,在第一数据库的接口层调用预设的第二数据库连接接口。In one embodiment, the user can call the preset second database connection interface in the interface layer of the first database based on instructions written in the Gremlin language in the first database access environment.
其中,第一数据库的接口层可以在包括若干个业务接口(transaction接口),同时扩充有适用于第二数据库的第二数据库连接接口(JDBC Connection接口)。Among them, the interface layer of the first database may include several business interfaces (transaction interface), and at the same time be expanded with a second database connection interface (JDBC Connection interface) suitable for the second database.
在上述实施例的基础上,作为一种可实施的方式,在一实施例中,在第一数据库的接口层调用预设的第二数据库连接接口,包括: Based on the above embodiments, as an implementable method, in one embodiment, calling the preset second database connection interface in the interface layer of the first database includes:
步骤1021,在第一数据库的接口层调用第一数据库业务接口;Step 1021: Call the first database business interface at the interface layer of the first database;
步骤1022,向第一数据库业务接口发送预设的第二数据库连接接口调用指令,以将当前调用的第一数据库业务接口转换为预设的第二数据库连接接口。Step 1022: Send a preset second database connection interface call instruction to the first database business interface to convert the currently called first database business interface into the preset second database connection interface.
示例性的,在第一数据库为图数据库,第二数据库为关系型数据库的情况下,预设的第二数据库连接接口调用指令可以为Connection conn=graph.tx().getRdbConnection()。For example, when the first database is a graph database and the second database is a relational database, the preset second database connection interface calling instruction may be Connection conn=graph.tx().getRdbConnection().
在一实施例中,可以通过先得到第一数据库业务接口,基于第一数据库业务接口获得第一数据库实例的第一数据库业务接口实例,然后在该第一数据库业务接口实例中引入预设的第二数据库连接接口调用指令,以将当前调用的第一数据库业务接口转换为预设的第二数据库连接接口。In one embodiment, the first database service interface can be obtained first, the first database service interface instance of the first database instance can be obtained based on the first database service interface, and then the preset third database service interface instance can be introduced into the first database service interface instance. The second database connection interface calls instructions to convert the currently called first database business interface into a preset second database connection interface.
其中,本申请实施例通过接口转换得到的预设的第二数据库连接接口,符合第二数据库的连接接口规范,如符合JDBC的Connection接口规范,可以创建JDBC的Statement或PreparedStatement,并可以通过这些Statement接口执行查询或更新操作,或获取查询结果的ResultSet。此处的Statement/PreparedStatement/ResultSet均符合JDBC接口规范。Among them, the preset second database connection interface obtained through interface conversion in the embodiment of this application conforms to the connection interface specification of the second database, such as the Connection interface specification of JDBC. JDBC Statement or PreparedStatement can be created, and these Statements can be used. The interface performs query or update operations, or obtains the ResultSet of query results. The Statement/PreparedStatement/ResultSet here all comply with the JDBC interface specification.
在一实施例中,在第一数据库为图数据库,第二数据库为关系型数据库的情况下,用户端可以通过前述的graph.tx()获取图数据侧的数据库事务,进行数据库事务的控制;通过得到graph实例(图数据库实例),获取图数据侧的操作接口(如Traversal、Computing等)进行操作。客户端可以通过前述的Connection接口获取关系型数据侧的事务控制操作接口,及SQL语言执行的操作接口以进行关系型数据的操作。In one embodiment, when the first database is a graph database and the second database is a relational database, the user can obtain the database transaction on the graph data side through the aforementioned graph.tx() to control the database transaction; By obtaining the graph instance (graph database instance), the operation interface (such as Traversal, Computing, etc.) on the graph data side is obtained for operation. The client can obtain the transaction control operation interface on the relational data side through the aforementioned Connection interface, and the operation interface executed in SQL language to perform relational data operations.
在一实施例中,还可以对访问第一数据库和第二数据库时产生的所有上下文数据进行统一管理,以共享所有上下文数据。In one embodiment, all context data generated when accessing the first database and the second database can also be managed uniformly to share all context data.
其中,上下文数据至少包括会话上下文数据、用户安全权限上下文数据和数据库事务上下文数据。The context data includes at least session context data, user security permission context data and database transaction context data.
在一实施例中,由于第一数据库和第二数据库实现了数据库事务上下文数据的共享,不管是第一数据库操作接口或者第二数据库操作接口在开始一个数据库事务时(或自动或手动),所开始的数据库事务共享;不管是第一数据库操作接口或者第二数据库操作接口提交事务操作时,共享数据库事务的第一数据库及第二数据库的数据库事务操作都将操作;不管是第一数据库操作接口或者第二数据库操作接口回滚事务操作时,共享数据库事务的第一数据库及第二数据库的数据库事务操作都将回滚;第一数据库和第二数据库的数据库事务的相关特性如隔离级别、事务ID等也将得到共享。 In one embodiment, since the first database and the second database realize the sharing of database transaction context data, whether the first database operation interface or the second database operation interface starts a database transaction (either automatically or manually), The initial database transaction sharing; whether it is the first database operation interface or the second database operation interface, when the transaction operation is submitted, the database transaction operations of the first database and the second database that share the database transaction will be operated; regardless of the first database operation interface Or when the second database operation interface rolls back the transaction operation, the database transaction operations of the first database and the second database that share the database transaction will be rolled back; the relevant characteristics of the database transactions of the first database and the second database such as isolation level, transaction IDs etc. will also be shared.
在上述实施例的基础上,作为一种可实施的方式,在一实施例中,该方法还包括:Based on the above embodiment, as an implementable manner, in one embodiment, the method further includes:
步骤301,基于预设的第二数据库连接接口,向第二数据库发送第二数据库业务,以得到对应的第二数据库业务处理结果。Step 301: Based on the preset second database connection interface, send the second database service to the second database to obtain the corresponding second database service processing result.
其中,第二数据库业务基于第二数据库数据处理引擎处理。Wherein, the second database service is processed based on the second database data processing engine.
需要说明的是,为了提高混合数据库的数据处理效率,可以让混合数据库在数据处理内核以统一的事务管理机制同时支持OLAP+OLTP事务管理,不同数据库类型的数据可以由不同的数据处理引擎分别进行处理,以此实现一种共享数据运行环境的不同引擎混合运行环境。It should be noted that in order to improve the data processing efficiency of the hybrid database, the hybrid database can support OLAP+OLTP transaction management at the same time with a unified transaction management mechanism in the data processing core. Data of different database types can be processed separately by different data processing engines. Processing, in order to achieve a hybrid operating environment of different engines that share the data operating environment.
在一实施例中,客户端在基于上述实施例提供的混合数据库管理方法访问第一数据库或第二数据库时,第一数据库或第二数据库的服务端对来自同一用户请求上下文、同一Session,第一数据库和第二数据库将处于相同的Session、数据库事务、用户权限等上下文运行环境中,因而在其数据处理内核可以以统一的事务管理机制来同时支持OLTP+OLAP事务管理。In one embodiment, when the client accesses the first database or the second database based on the hybrid database management method provided in the above embodiment, the server of the first database or the second database requests the context from the same user and the same Session. The first database and the second database will be in the same context running environment such as Session, database transactions, user permissions, etc., so their data processing core can support OLTP+OLAP transaction management at the same time with a unified transaction management mechanism.
相应地,在一实施例中,当在混合数据库的第一数据库访问环境下需要访问第一数据库时,可以在第一数据库的接口层调用预设的第一数据库业务接口;基于预设的第一数据库业务接口,向第一数据库发送第一数据库业务,以得到对应的第一数据库业务处理结果。Correspondingly, in one embodiment, when it is necessary to access the first database in the first database access environment of the hybrid database, the preset first database business interface can be called at the interface layer of the first database; based on the preset third database A database service interface sends the first database service to the first database to obtain the corresponding first database service processing result.
其中,第一数据库业务基于第一数据库数据处理引擎处理。Wherein, the first database service is processed based on the first database data processing engine.
在一实施例中,在第一数据库为图数据库,第二数据库为关系型数据库的情况下,图数据操作由图数据处理引擎进行,即存在一个基于Gremlin语言解析、执行的语言处理来驱动一个以点、边数据为特性的图数据处理引擎,以实现图数据库业务的处理,得到对应的图数据库业务处理结果。关系型数据操作由关系处理引擎进行,即存在一个基于SQL语言解析、执行的语言处理来驱动一个以行表及表之间关联数据(即以实体及实体之间联系的集合)为特性的关系型数据的处理引擎,以实现关系型数据库业务的处理,得到对应的关系型数据库业务处理结果。In one embodiment, when the first database is a graph database and the second database is a relational database, graph data operations are performed by a graph data processing engine, that is, there is a language processing based on Gremlin language parsing and execution to drive a A graph data processing engine characterized by point and edge data to implement graph database business processing and obtain corresponding graph database business processing results. Relational data operations are performed by a relational processing engine, that is, there is a language processing based on SQL language parsing and execution to drive a relationship characterized by row tables and associated data between tables (that is, entities and a collection of relationships between entities). A data processing engine to implement relational database business processing and obtain corresponding relational database business processing results.
其中,通过引入各数据库的数据处理引擎,并行处理各自数据库的业务,提高了混合数据库的业务处理效率。并且,不同的处理引擎可以分别提供符合不同类型数据(如图及关系型数据)查询语言规范的特性。Among them, by introducing the data processing engine of each database to process the business of each database in parallel, the business processing efficiency of the hybrid database is improved. Moreover, different processing engines can provide features that comply with query language specifications for different types of data (such as graphs and relational data).
本申请实施例提供的混合数据库管理方法,通过基于混合数据库服务端的共享连接,与混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,混合数据库包括第一数据库和第二数据库;当在混合数据库的第一数据库访问环境下需要访问第二数据库时, 在第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问第二数据库。上述方案提供的方法,通过在第一数据库访问环境下实现第二数据库连接接口的调用,以快速切换为访问第二数据库,提高了混合数据库的应用效率。并且,通过引入各数据库的数据处理引擎,并行处理各自数据库的业务,提高了混合数据库的业务处理效率。The hybrid database management method provided by the embodiment of the present application establishes communication with each database included in the hybrid database through a shared connection based on the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes The first database and the second database; when it is necessary to access the second database in the first database access environment of the mixed database, The preset second database connection interface is called at the interface layer of the first database to connect to and access the second database. The method provided by the above solution realizes the invocation of the second database connection interface in the first database access environment to quickly switch to access the second database, thereby improving the application efficiency of the hybrid database. Moreover, by introducing the data processing engine of each database to process the business of each database in parallel, the business processing efficiency of the hybrid database is improved.
本申请实施例提供了一种混合数据库管理装置,用于执行上述实施例提供的混合数据库管理方法。The embodiment of the present application provides a hybrid database management device, used to execute the hybrid database management method provided in the above embodiment.
如图2所示,为本申请实施例提供的混合数据库管理装置的结构示意图。该混合数据库管理装置20包括:第一管理部分201和第二管理部分202。As shown in Figure 2, it is a schematic structural diagram of a hybrid database management device provided by an embodiment of the present application. The hybrid database management device 20 includes: a first management part 201 and a second management part 202.
其中,第一管理部分201,被配置为基于混合数据库服务端的共享连接,与混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,混合数据库包括第一数据库和第二数据库;第二管理部分202,被配置为当在混合数据库的第一数据库访问环境下需要访问第二数据库时,在第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问第二数据库。Among them, the first management part 201 is configured to establish communication with each database included in the hybrid database based on the shared connection of the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes a first database and a second database; the second management part 202 is configured to call a preset second database connection interface at the interface layer of the first database to connect to and access the second database when the second database needs to be accessed under the first database access environment of the hybrid database.
在一实施例中,第二管理部分202,还被配置为:In an embodiment, the second management part 202 is also configured to:
在第一数据库的接口层调用第一数据库业务接口;Calling the first database business interface at the interface layer of the first database;
向第一数据库业务接口发送预设的第二数据库连接接口调用指令,以将当前调用的第一数据库业务接口转换为预设的第二数据库连接接口。Send a preset second database connection interface calling instruction to the first database business interface to convert the currently called first database business interface into the preset second database connection interface.
在一实施例中,该装置20还包括:In one embodiment, the device 20 further includes:
第三管理部分,被配置为对访问第一数据库和第二数据库时产生的所有上下文数据进行统一管理,以共享所有上下文数据;The third management part is configured to uniformly manage all context data generated when accessing the first database and the second database to share all context data;
其中,上下文数据至少包括会话上下文数据、用户安全权限上下文数据和数据库事务上下文数据。The context data includes at least session context data, user security permission context data and database transaction context data.
在一实施例中,第三管理部分,还被配置为:In one embodiment, the third management part is further configured to:
基于预设的第二数据库连接接口,向第二数据库发送第二数据库业务,以得到对应的第二数据库业务处理结果;Based on the preset second database connection interface, send the second database service to the second database to obtain the corresponding second database service processing result;
其中,第二数据库业务基于第二数据库数据处理引擎处理。Wherein, the second database service is processed based on the second database data processing engine.
在一实施例中,第三管理部分,还被配置为:In one embodiment, the third management part is further configured to:
当在混合数据库的第一数据库访问环境下需要访问第一数据库时,在第一数据库的接口层调用预设的第一数据库业务接口;When it is necessary to access the first database in the first database access environment of the hybrid database, the preset first database business interface is called at the interface layer of the first database;
基于预设的第一数据库业务接口,向第一数据库发送第一数据库业务,以得到对应的第一数据库业务处理结果;Based on the preset first database service interface, send the first database service to the first database to obtain the corresponding first database service processing result;
其中,第一数据库业务基于第一数据库数据处理引擎处理。 Wherein, the first database service is processed based on the first database data processing engine.
在一实施例中,第一数据库为图数据库,第二数据库为关系型数据库;第一数据库访问环境为使用Gremlin图查询语言的数据查询环境,第二数据库访问环境为使用JDBC关系查询语言的数据查询环境,第一数据库业务接口为Gremlin业务接口,第二数据库连接接口为JDBC连接接口。In one embodiment, the first database is a graph database, and the second database is a relational database; the first database access environment is a data query environment using the Gremlin graph query language, and the second database access environment is a data query environment using the JDBC relational query language. In the query environment, the first database business interface is the Gremlin business interface, and the second database connection interface is the JDBC connection interface.
关于本实施例中的混合数据库管理装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the hybrid database management device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本申请实施例提供的混合数据库管理装置,用于执行上述实施例提供的混合数据库管理方法,其实现方式与原理相同,不再赘述。The hybrid database management device provided by the embodiment of the present application is used to execute the hybrid database management method provided by the above embodiment. Its implementation method is the same as the principle, and will not be described again.
本申请实施例提供了一种混合数据库,用于应用上述实施例提供的混合数据库管理方法。The embodiment of the present application provides a hybrid database for applying the hybrid database management method provided in the above embodiment.
如图3所示,为本申请实施例提供的混合数据库的结构示意图。该混合数据库30包括:第一数据库301、第二数据库302及上述实施例提供的混合数据库管理装置20。As shown in Figure 3, it is a schematic structural diagram of a hybrid database provided by an embodiment of the present application. The hybrid database 30 includes: a first database 301, a second database 302, and the hybrid database management device 20 provided in the above embodiment.
其中,第一数据库的接口层有预设的第二数据库连接接口;第二数据库的接口层有预设的第一数据库连接接口;混合数据库管理采用如上实施例提供的混合数据库管理方法的混合数据库管理方法管理第一数据库和第二数据库。Among them, the interface layer of the first database has a preset second database connection interface; the interface layer of the second database has a preset first database connection interface; the hybrid database management adopts the hybrid database management method provided in the above embodiment. The management method manages the first database and the second database.
本申请实施例提供的一种混合数据库,用于应用上述实施例提供的混合数据库管理方法,其实现方式与原理相同,不再赘述。The hybrid database provided by the embodiment of the present application is used to apply the hybrid database management method provided by the above embodiment. Its implementation method is the same as the principle, and will not be described again.
本申请实施例提供了一种电子设备,用于执行上述实施例提供的混合数据库管理方法。The embodiment of the present application provides an electronic device for executing the hybrid database management method provided in the above embodiment.
如图4所示,为本申请实施例提供的电子设备的结构示意图。该电子设备40包括:至少一个处理器41和存储器42。As shown in Figure 4, it is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 40 includes: at least one processor 41 and a memory 42 .
存储器存储计算机执行指令;至少一个处理器执行存储器存储的计算机执行指令,使得至少一个处理器执行如上实施例提供的混合数据库管理方法。The memory stores computer-executed instructions; at least one processor executes the computer-executed instructions stored in the memory, so that at least one processor executes the hybrid database management method provided by the above embodiment.
本申请实施例提供的一种电子设备,用于执行上述实施例提供的混合数据库管理方法,其实现方式与原理相同,不再赘述。An electronic device provided by an embodiment of the present application is used to execute the hybrid database management method provided by the above embodiment. Its implementation method is the same as the principle, and will not be described again.
本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当处理器执行计算机执行指令时,实现如上任一实施例提供的混合数据库管理方法。Embodiments of the present application provide a computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When the processor executes the computer-executed instructions, the hybrid database management method provided in any of the above embodiments is implemented.
本申请实施例的包含计算机可执行指令的存储介质,可用于存储前述实施例中提供的混合数据库管理方法的计算机执行指令,其实现方式与原理相同,不再赘述。 The storage medium containing computer-executable instructions in the embodiment of the present application can be used to store the computer-executable instructions of the hybrid database management method provided in the previous embodiment. The implementation method and principle are the same and will not be described again.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute the methods described in various embodiments of this application. Some steps. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code. .
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the device The internal structure is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the device described above, reference can be made to the corresponding process in the foregoing method embodiment, which will not be described again here.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features can be equivalently replaced; and these modifications or substitutions do not deviate from the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present application. scope.
工业实用性Industrial applicability
本申请实施例公开了一种混合数据库管理方法、装置、混合数据库及电子设备,包括:基于混合数据库服务端的共享连接,与混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,混合数据库包括第一数据库和第二数据库;当在混合数据库的第一数据库访问环境下需要访问第二数据库时,在第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问第二数据库。这样,通过在第一数据库访问环境下实现第二数据库连接接口的调用,以快速切换为访问第二数据库,提高了混合数据库的应用效率。 The embodiment of the present application discloses a hybrid database management method, device, hybrid database and electronic device, including: based on the shared connection of the hybrid database server, establishing communication with each database included in the hybrid database to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database; when the second database needs to be accessed in the first database access environment of the hybrid database, calling the preset second database connection interface at the interface layer of the first database to connect and access the second database. In this way, by implementing the call of the second database connection interface in the first database access environment, the second database can be quickly switched to access the second database, thereby improving the application efficiency of the hybrid database.

Claims (15)

  1. 一种混合数据库管理方法,包括:A hybrid database management approach that includes:
    基于混合数据库服务端的共享连接,与所述混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,所述混合数据库包括第一数据库和第二数据库;Based on the shared connection of the hybrid database server, establish communication with each database included in the hybrid database to enter the first database access environment or the second database access environment; wherein the hybrid database includes a first database and a second database;
    当在所述混合数据库的第一数据库访问环境下需要访问第二数据库时,在所述第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问所述第二数据库。When it is necessary to access the second database in the first database access environment of the hybrid database, the preset second database connection interface is called at the interface layer of the first database to connect and access the second database.
  2. 根据权利要求1所述的方法,其中,所述在所述第一数据库的接口层调用预设的第二数据库连接接口,包括:The method according to claim 1, wherein calling the preset second database connection interface at the interface layer of the first database includes:
    在所述第一数据库的接口层调用第一数据库业务接口;Call the first database business interface at the interface layer of the first database;
    向所述第一数据库业务接口发送预设的第二数据库连接接口调用指令,以将当前调用的所述第一数据库业务接口转换为预设的第二数据库连接接口。A preset second database connection interface calling instruction is sent to the first database service interface to convert the currently called first database service interface into a preset second database connection interface.
  3. 根据权利要求1所述的方法,其中,还包括:The method of claim 1, further comprising:
    对访问所述第一数据库和第二数据库时产生的所有上下文数据进行统一管理,以共享所述所有上下文数据;Unified management of all context data generated when accessing the first database and the second database to share all context data;
    其中,所述上下文数据至少包括会话上下文数据、用户安全权限上下文数据和数据库事务上下文数据。Wherein, the context data includes at least session context data, user security authority context data and database transaction context data.
  4. 根据权利要求1所述的方法,其中,还包括:The method of claim 1, further comprising:
    基于所述预设的第二数据库连接接口,向所述第二数据库发送第二数据库业务,以得到对应的第二数据库业务处理结果;Based on the preset second database connection interface, send a second database service to the second database to obtain the corresponding second database service processing result;
    其中,所述第二数据库业务基于第二数据库数据处理引擎处理。Wherein, the second database service is processed based on the second database data processing engine.
  5. 根据权利要求4所述的方法,其中,还包括:The method of claim 4, further comprising:
    当在所述混合数据库的第一数据库访问环境下需要访问第一数据库时,在所述第一数据库的接口层调用预设的第一数据库业务接口;When it is necessary to access the first database in the first database access environment of the hybrid database, calling the preset first database business interface in the interface layer of the first database;
    基于所述预设的第一数据库业务接口,向所述第一数据库发送第一数据库业务,以得到对应的第一数据库业务处理结果;Based on the preset first database service interface, send a first database service to the first database to obtain the corresponding first database service processing result;
    其中,所述第一数据库业务基于第一数据库数据处理引擎处理。Wherein, the first database service is processed based on the first database data processing engine.
  6. 根据权利要求2所述的方法,其中,所述第一数据库为图数据库,所述第二数据库为关系型数据库;The method according to claim 2, wherein the first database is a graph database and the second database is a relational database;
    所述第一数据库访问环境为使用Gremlin图查询语言的数据查询环境,所述第二数据库访问环境为使用JDBC关系查询语言的数据查询环境,所述第一数据库业务接口为Gremlin业务接口,所述第二数据库连接接口为JDBC连 接接口。The first database access environment is a data query environment using Gremlin graph query language, the second database access environment is a data query environment using JDBC relational query language, the first database business interface is a Gremlin business interface, and the The second database connection interface is JDBC connection interface.
  7. 一种混合数据库管理装置,包括:A hybrid database management device, including:
    第一管理部分,被配置为基于混合数据库服务端的共享连接,与所述混合数据库包含的每个数据库建立通信,以进入第一数据库访问环境或第二数据库访问环境;其中,所述混合数据库包括第一数据库和第二数据库;The first management part is configured to establish communication with each database included in the hybrid database based on the shared connection of the hybrid database server to enter the first database access environment or the second database access environment; wherein the hybrid database includes the first database and the second database;
    第二管理部分,被配置为当在所述混合数据库的第一数据库访问环境下需要访问第二数据库时,在所述第一数据库的接口层调用预设的第二数据库连接接口,以连接并访问所述第二数据库。The second management part is configured to call the preset second database connection interface at the interface layer of the first database when it is necessary to access the second database in the first database access environment of the hybrid database to connect and Access the second database.
  8. 根据权利要求7所述的装置,其中,所述第二管理部分,还被配置为在所述第一数据库的接口层调用第一数据库业务接口;向所述第一数据库业务接口发送预设的第二数据库连接接口调用指令,以将当前调用的所述第一数据库业务接口转换为预设的第二数据库连接接口。The device according to claim 7, wherein the second management part is further configured to call a first database business interface at the interface layer of the first database; send a preset value to the first database business interface. The second database connection interface calls instructions to convert the currently called first database business interface into a preset second database connection interface.
  9. 根据权利要求7所述的装置,其中,所述装置还包括:The device according to claim 7, wherein the device further comprises:
    第三管理部分,被配置为对访问所述第一数据库和第二数据库时产生的所有上下文数据进行统一管理,以共享所述所有上下文数据;A third management part configured to uniformly manage all context data generated when accessing the first database and the second database to share all context data;
    其中,所述上下文数据至少包括会话上下文数据、用户安全权限上下文数据和数据库事务上下文数据。Wherein, the context data includes at least session context data, user security authority context data and database transaction context data.
  10. 根据权利要求7所述的装置,其中,第三管理部分,还被配置为基于所述预设的第二数据库连接接口,向所述第二数据库发送第二数据库业务,以得到对应的第二数据库业务处理结果;The device according to claim 7, wherein the third management part is further configured to send a second database service to the second database based on the preset second database connection interface to obtain the corresponding second database service. Database business processing results;
    其中,所述第二数据库业务基于第二数据库数据处理引擎处理。Wherein, the second database service is processed based on the second database data processing engine.
  11. 根据权利要求10所述的装置,其中,所述第三管理部分,还被配置为当在所述混合数据库的第一数据库访问环境下需要访问第一数据库时,在所述第一数据库的接口层调用预设的第一数据库业务接口;基于所述预设的第一数据库业务接口,向所述第一数据库发送第一数据库业务,以得到对应的第一数据库业务处理结果;The device according to claim 10, wherein the third management part is further configured to: when accessing the first database is required in the first database access environment of the hybrid database, the interface of the first database The layer calls the preset first database service interface; based on the preset first database service interface, sends the first database service to the first database to obtain the corresponding first database service processing result;
    其中,所述第一数据库业务基于第一数据库数据处理引擎处理。Wherein, the first database service is processed based on the first database data processing engine.
  12. 根据权利要求8所述的装置,其中,所述第一数据库为图数据库,所述第二数据库为关系型数据库;The device according to claim 8, wherein the first database is a graph database and the second database is a relational database;
    所述第一数据库访问环境为使用Gremlin图查询语言的数据查询环境,所述第二数据库访问环境为使用JDBC关系查询语言的数据查询环境,所述第一数据库业务接口为Gremlin业务接口,所述第二数据库连接接口为JDBC连接接口。The first database access environment is a data query environment using the Gremlin graph query language, the second database access environment is a data query environment using the JDBC relational query language, the first database business interface is a Gremlin business interface, and the second database connection interface is a JDBC connection interface.
  13. 一种混合数据库,包括:第一数据库、第二数据库及如权利要求7 所述的混合数据库管理装置;A hybrid database, including: a first database, a second database and as claimed in claim 7 The hybrid database management device;
    所述第一数据库的接口层有预设的第二数据库连接接口;The interface layer of the first database has a preset second database connection interface;
    所述第二数据库的接口层有预设的第一数据库连接接口;The interface layer of the second database has a preset first database connection interface;
    所述混合数据库管理采用如权利要求1-6任一项所述的混合数据库管理方法管理所述第一数据库和第二数据库。The hybrid database management uses the hybrid database management method according to any one of claims 1 to 6 to manage the first database and the second database.
  14. 一种电子设备,包括:至少一个处理器和存储器;An electronic device including: at least one processor and memory;
    所述存储器存储计算机执行指令;The memory stores computer execution instructions;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如权利要求1至6任一项所述的方法。The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method according to any one of claims 1 to 6.
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1至6任一项所述的方法。 A computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When a processor executes the computer-executable instructions, the method according to any one of claims 1 to 6 is implemented.
PCT/CN2023/116095 2022-09-21 2023-08-31 Hybrid database management method and apparatus, hybrid database, and electronic device WO2024060956A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211148362.6 2022-09-21
CN202211148362.6A CN115269561B (en) 2022-09-21 2022-09-21 Hybrid database management method and device, hybrid database and electronic equipment

Publications (1)

Publication Number Publication Date
WO2024060956A1 true WO2024060956A1 (en) 2024-03-28

Family

ID=83757102

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/116095 WO2024060956A1 (en) 2022-09-21 2023-08-31 Hybrid database management method and apparatus, hybrid database, and electronic device

Country Status (2)

Country Link
CN (1) CN115269561B (en)
WO (1) WO2024060956A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115269561B (en) * 2022-09-21 2023-01-24 国网智能电网研究院有限公司 Hybrid database management method and device, hybrid database and electronic equipment
CN116126865B (en) * 2023-02-17 2023-09-08 安芯网盾(北京)科技有限公司 Proxy method and device for mixed use of multiple databases

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140214784A1 (en) * 2013-01-28 2014-07-31 Altibase Corp. Apparatus for providing transaction sharing hybrid interface of session
CN105224566A (en) * 2014-06-25 2016-01-06 国际商业机器公司 Relational database is supported the method and system of injunctive graphical query
CN109241054A (en) * 2018-08-02 2019-01-18 成都松米科技有限公司 A kind of multimodal data library system, implementation method and server
CN111881223A (en) * 2020-08-06 2020-11-03 网易(杭州)网络有限公司 Data management method, device, system and storage medium
CN111949650A (en) * 2019-05-15 2020-11-17 华为技术有限公司 Multi-language fusion query method and multi-mode database system
CN113268500A (en) * 2021-06-08 2021-08-17 中国联合网络通信集团有限公司 Service processing method and device and electronic equipment
CN115269561A (en) * 2022-09-21 2022-11-01 国网智能电网研究院有限公司 Hybrid database management method and device, hybrid database and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818127A (en) * 2017-09-09 2018-03-20 国网浙江省电力公司 A kind of querying method and system for multi-source data
US11216455B2 (en) * 2019-08-24 2022-01-04 International Business Machines Corporation Supporting synergistic and retrofittable graph queries inside a relational database
CN112416962A (en) * 2020-11-06 2021-02-26 北京偶数科技有限公司 Data query method, device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140214784A1 (en) * 2013-01-28 2014-07-31 Altibase Corp. Apparatus for providing transaction sharing hybrid interface of session
CN105224566A (en) * 2014-06-25 2016-01-06 国际商业机器公司 Relational database is supported the method and system of injunctive graphical query
CN109241054A (en) * 2018-08-02 2019-01-18 成都松米科技有限公司 A kind of multimodal data library system, implementation method and server
CN111949650A (en) * 2019-05-15 2020-11-17 华为技术有限公司 Multi-language fusion query method and multi-mode database system
CN111881223A (en) * 2020-08-06 2020-11-03 网易(杭州)网络有限公司 Data management method, device, system and storage medium
CN113268500A (en) * 2021-06-08 2021-08-17 中国联合网络通信集团有限公司 Service processing method and device and electronic equipment
CN115269561A (en) * 2022-09-21 2022-11-01 国网智能电网研究院有限公司 Hybrid database management method and device, hybrid database and electronic equipment

Also Published As

Publication number Publication date
CN115269561A (en) 2022-11-01
CN115269561B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
US11392586B2 (en) Data protection method and device and storage medium
WO2024060956A1 (en) Hybrid database management method and apparatus, hybrid database, and electronic device
US11386221B2 (en) Fine-grained access control for data manipulation language (DML) operations on relational data
WO2020228801A1 (en) Multi-language fusion query method and multi-model database system
US10635675B2 (en) Supporting pluggable databases with heterogeneous database character sets in a container database
US10776381B2 (en) Integrated application server and data server processes with matching data formats
US9881170B2 (en) DBFS permissions using user, role, and permissions flags
EP3285178B1 (en) Data query method in crossing-partition database, and crossing-partition query device
US10061808B2 (en) Cached views
US8756217B2 (en) Speculative switch database
US8914390B2 (en) Repetitive query recognition and processing
EP2590090B1 (en) Dynamic interface to read database through remote procedure call
WO2020220717A1 (en) Decoupling elastic data warehouse architecture
US20190325039A1 (en) Efficiently deleting data from objects in a multi-tenant database system
US9672231B2 (en) Concurrent access for hierarchical data storage
CN114969441A (en) Knowledge mining engine system based on graph database
US9619508B2 (en) Speculative begin transaction
US10606833B2 (en) Context sensitive indexes
US11782953B2 (en) Metadata access for distributed data lake users
CN110019113B (en) Database service processing method and database server
CN112163029A (en) Virtual database system and query method
US7320006B2 (en) Hierarchical database management
US20230244661A1 (en) Intelligent parity service with database query optimization
CN115481190A (en) Data access method and device