WO2019128978A1 - 一种数据库系统以及查询数据库的方法和装置 - Google Patents
一种数据库系统以及查询数据库的方法和装置 Download PDFInfo
- Publication number
- WO2019128978A1 WO2019128978A1 PCT/CN2018/123437 CN2018123437W WO2019128978A1 WO 2019128978 A1 WO2019128978 A1 WO 2019128978A1 CN 2018123437 W CN2018123437 W CN 2018123437W WO 2019128978 A1 WO2019128978 A1 WO 2019128978A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- query
- database
- request
- result
- slave
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000001419 dependent effect Effects 0.000 claims description 47
- 230000010354 integration Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 10
- 230000008901 benefit Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002085 persistent effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/278—Data partitioning, e.g. horizontal or vertical partitioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
- G06F11/2069—Management of state, configuration or failover
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2097—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements maintaining the standby controller/processing unit updated
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
- G06F11/3433—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment for load management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
- G06F16/24534—Query rewriting; Transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/275—Synchronous replication
Definitions
- the present invention relates to databases, and in particular to a database system.
- the invention also relates to a method for querying a database and an apparatus for querying a database. It also relates to a method of assigning a query task and a device for assigning a query task. It also relates to a method of performing a database query and an apparatus for performing a database query. It also relates to a method of performing a database query and a device for performing a database query.
- Non-distributed databases generally use a master-slave architecture with a primary database plus a secondary database or a primary database plus multiple dependent databases.
- the primary database is externally writable. When the data on the primary database is updated, it is synchronized to the dependent database through the transaction log.
- a primary database will correspond to one or more subordinate databases, and each subordinate database has a complete data that is consistent with the primary database.
- each dependent database can be used as a standby database instead of the primary database, enhancing usability.
- Each subordinate database can execute a query request, which can separate the query burden of the main database.
- a SQL query operation can only be performed in one database, ie a SQL query can only be executed in the primary database or only in one dependent database. This can result in a slave database being busy performing a complex large SQL query operation with heavy load, slow response, and other slave databases being idle.
- the subordinate database in addition to the daily query database, the subordinate database generally performs complex operations such as generating reports and data collation at specific times of the day (such as the early morning). In this case, performing complex large SQL query operations may even result in an inability to provide query services due to overloaded operation.
- the present application provides a database system to solve the above-mentioned problems of the database of the existing master-slave architecture.
- the invention further provides a method for querying a database, a method for allocating a query operation, a method for executing a database query, a method for performing a database query, and a device corresponding to the foregoing method.
- the present application provides a database system, including: a primary database, at least one dependent database and a query processing unit, the primary database and the dependent database have a data connection, the slave database and the query processing unit Have a data connection;
- the query processing unit is configured to split the query request into query operation instructions with no intersection of the query scope, send the split query operation instruction to the same or different slave database to perform the query operation, and feed back the query result.
- the application also provides a method for querying a database, including:
- the result of the query request is provided to the requester of the query request.
- the present application also provides a method for allocating a query operation, including:
- the query request is split into query operations on the dependent database with no intersection of the query scope.
- the application also provides a method for performing a database query, including:
- the result of the query operation is provided to a recipient specified by the query task.
- the application also provides a method for performing a database query, including:
- the consolidated results are provided to the recipient specified by the query task.
- the application also provides an apparatus for querying a database, including:
- An obtaining unit configured to obtain a query request for querying a database
- a splitting unit configured to split the query request into a query operation instruction for a slave database having no intersection of the query scope
- An execution unit configured to execute the query operation instruction for the slave database
- a providing unit configured to provide a request result of the query request to the requester of the request.
- the application also provides an apparatus for allocating a query operation, including:
- An obtaining unit configured to obtain a query request for a database
- a splitting unit configured to split the query request into a query operation on a dependent database whose query scope does not intersect.
- the application also provides an apparatus for performing a database query, including:
- An execution unit configured to execute a query operation instruction specified by the query task
- a providing unit for providing a result of the query operation to a recipient specified by the query task.
- the application also provides an apparatus for performing database query, including:
- a second obtaining unit configured to obtain a query result of another query operation specified by the query task
- one aspect of the database system provided by the present application has the following advantages: by querying the processing unit, splitting the query request into query operation instructions with no intersection of the query scope, and splitting the query operation instruction
- the query operation is sent to the same or different subordinate databases, so that the dependent database resources can be effectively utilized, and the query pressure of one or a single subordinate database is avoided, and the query efficiency can be improved.
- one aspect of the method for querying a database has the following advantages: splitting the query request into a query operation on a dependent database whose query scope has no intersection, thereby distributing the query to The subordinate database plays the role of effectively utilizing the subordinate database resources to achieve the effect of improving query efficiency.
- one aspect of the method for allocating a query operation has the following advantages: splitting the query request into a query operation on a dependent database with no intersection of query scopes, thereby dispersing the query To the subordinate database, the role of the subordinate database resources can be effectively utilized to achieve the effect of improving query efficiency.
- one aspect of the method for performing database query provided by the present application has the following advantages: the result of the query operation specified by the query task can be sent to the designated receiver, and the flexible query and fullness are provided. Use resources to share the burden of the query.
- one aspect of the method for performing database query provided by the present application has the following advantages: the result of the obtained query operation can be integrated, and the integrated result is provided to the receiving specified by the query task. By. Play the role of making full use of resources to share the burden of inquiry.
- FIG. 1 is a schematic structural diagram of a database system according to a first embodiment of the present application.
- FIG. 2 is a schematic flowchart of a method for querying a database according to a second embodiment of the present application
- FIG. 3 is a schematic flowchart of a method for allocating a query operation according to a third embodiment of the present application.
- FIG. 4 is a schematic flowchart of a method for performing a database query according to a fourth embodiment of the present application.
- FIG. 5 is a schematic flowchart of a method for performing database query according to a fifth embodiment of the present application.
- FIG. 6 is a structural block diagram of an apparatus for querying a database according to a sixth embodiment of the present application.
- FIG. 7 is a structural block diagram of an apparatus for allocating a query operation according to a seventh embodiment of the present application.
- FIG. 8 is a structural block diagram of an apparatus for performing a database query according to an eighth embodiment of the present application.
- FIG. 9 is a structural block diagram of an apparatus for performing database query according to a ninth embodiment of the present application.
- the first embodiment of the present application provides a database system.
- the schematic diagram of the structure is as shown in FIG. 1.
- the utility model includes: a primary database U101, a secondary database U102, a secondary database U103, a secondary database U104 and a query processing unit U105, and the primary database.
- U101 has a data connection with the respective slave databases (U102, U103 and U104) and between the respective slave databases (U102, U103 and U104) and the query processing unit U105.
- the data connection includes a hardware connection and a software connection
- the hardware connection may be a wired network connection such as Ethernet, or a wireless network connection such as Bluetooth or a wireless local area network
- the software connection may be various software protocols or program processes. Interface connection between. Data and information can be exchanged through the data connection.
- the primary database U101 receives and performs an update operation on the database from the outside, such as adding a record, modifying a record, deleting a record, and the like. Update database information.
- the slave database U102, the slave database U103 and the slave database U104 (numbered 0, 1, 2, respectively). It is synchronized with the primary database to maintain a database data consistent with the primary database, so that when the primary database fails, the primary database can be used to provide the services provided by the original primary database.
- the slave databases may be synchronized with the master database in a plurality of manners.
- the master database may actively send update information to each slave database when updating, and each slave database is further based on the master database.
- the database data is updated with the update information of the database.
- each of the slave databases may periodically check the update information to the primary database or the unit that stores the update information of the primary database according to its own status, and update its own database data as soon as it is updated.
- the slave databases (U102, U103 and U104) also accept and respond to query operations from the query processing unit U105.
- Each subordinate database maintains the database data consistent with the main database by synchronizing with the main database, and can be used to provide a query function of the database.
- the query processing unit U105 used in this embodiment is configured to send the query request to the corresponding subordinate database, or split the query request into query operation instructions with no intersection of the query scope, and send the split query operation instructions to the same or different.
- the dependent database performs the query operation and feeds back the query result.
- the query processing unit U105 can accept a query request for the database, generate a corresponding query operation instruction according to the query request, and then send the query operation instruction to a certain or specified slave database to execute the slave database.
- the query operation for example, the data query for the query operation instruction is relatively simple, and only a subordinate database can be queried, or the subordinate database specified by the query operation instruction is provided for the query operation; or the query processing unit U105 converts the query request according to the need.
- the query instructions are distributed to the same or different subordinate databases, and different query operations are performed on different databases, thereby realizing the rational use of multiple subordinate databases, which is beneficial to improving efficiency and reducing single subordinates. Data processing pressure for database queries.
- the query processing unit can split the query request and distribute it to different slave databases to perform the query operation.
- the external query request is split into query operation instructions having no intersection of the query scope, and the query operation is performed on the slave databases (U102, U103, and U104).
- the query operation in which the query scope has no intersection means that there is no intersection of the query operations performed on the respective dependent databases, that is, different records are queried for different dependent databases.
- the query request is split into query operations that do not intersect the query scope of each subordinate database.
- the distribution column value corresponding to the query object refers to a value corresponding to each record of the query object that can be used to specify the slave database. This value is called the distribution column value.
- the identifier of the corresponding subordinate database can be obtained.
- the object to be queried is a population data table
- each record of the table includes information such as a city, a population, and the like
- the distribution column value is a column of data of the table, wherein each data corresponds to one row of the population data table.
- the query processing unit U105 After obtaining the external query request for the demographic data table, the query processing unit U105 acquires the distribution column value corresponding to the demographic data table, and converts the query request into the specification of the demographic data table.
- the distributed column value item is queried, and each distribution column value may be hashed and then modulo according to the number of subordinate databases (3 in this embodiment), and the corresponding subordinate database is determined according to the remainder after modulo. Query operation.
- the distribution column values with a remainder of 0 include A0, B0, C0, D0...
- the distribution column values with a remainder of 1 include A1, B1, C1, D1...
- the distribution column values with a remainder of 2 include A2, B2, C2, D2...
- the query operation performed on the slave database U102 with the number 0 is the records corresponding to the distribution column values of A0, B0, C0, D0, etc. with the remainder 0.
- the query operation performed on the slave database U103 numbered 1 is a record corresponding to the distribution column values of A1, B1, C1, and D1 having a remainder of 1.
- the query operation performed on the slave database U104 of number 2 is the record corresponding to the distribution column values of A2, B2, C2, D2, etc. with a remainder of 2.
- the distribution column values corresponding to the query object include the following:
- the distribution column value table corresponding to each query object of the database may be generated in advance, for example, the distribution column value of each row record of each query object of the generated database is edited in advance by the owner of the database.
- the distributed column value table of each query object is generated, stored, and updated synchronously when the database is updated.
- the query processing unit U105 receives the external query request, the distribution column value of the query object corresponding to the current query request is obtained from the distributed column value table corresponding to each of the saved query objects of the database.
- Obtaining the distribution column value from the distributed column of the saved query object can simplify the query and improve the query efficiency. And since the distribution column value is generated by the owner of the database in advance, the query of the record corresponding thereto can be distributed to each subordinate database to the maximum extent.
- the value of any column of the query object corresponding to the query request may also be used as the distribution column value of the query object.
- the value of the column specified by the query request can be used as the distribution column value.
- the city name value of the city column of the population data table may be queried first, and the city name value is used as the distribution column value.
- the value of the column of the query object corresponding to the query request is used as the distribution column value, and the information of the query request can be fully utilized, and the distributed column index table does not need to be generated and maintained in advance, which has the effect of reducing the workload of database maintenance.
- the value of the first column of the query object is used as a distribution column value, and the value of the column that the query object necessarily has is used as the distribution column value in the case that the query request does not specify the column of the query object, thereby simplifying the maintenance work of the database. .
- the value of the column included in the query request may also be used as the distribution column value of the query object.
- the query request specifies the “city”, and may first query all the city name values of the city data column of the population data table, and use the city name value as the distribution column value.
- Using the value of the column specified by the query request as the distribution column value can fully utilize the information of the query request, and does not need to generate and maintain the distributed column index table in advance, thereby reducing the workload of database maintenance.
- the query task of splitting the query request into the dependent database without the intersection of the query scope according to the distribution column value is applicable not only to the case of querying a single query object, but also to the case of querying multiple query objects, and has universal applicability.
- the query request is split into a query operation on the slave database whose query scope does not intersect.
- the unique key refers to the value of the key corresponding to each record of the query object, and the key value of each record is different.
- the value range of the key value may be pre-divided into a plurality of value ranges equal to the number of the dependent databases participating in the query, and each dependent database (according to the unique key index) is selected to access the data of the corresponding value domain.
- c1 is a unique key.
- it is divided into three value ranges [0, 60], [60, 100], and [100, 150], and each of the dependent databases accesses the record data of the corresponding value domain.
- This mode is suitable for querying individual query objects.
- the query request is split into a query operation on the slave database whose query scope does not intersect.
- the number of data pages of the query object may be previously divided into a plurality of ranges equal to the number of dependent databases participating in the query.
- the data page number of the query object is 0-1500
- the subordinate database is three, which can be divided into [0-500], [500, 1000] and [1000-1500] 3 ranges, which are processed by three subordinate databases respectively. .
- This mode is suitable for querying individual query objects.
- the query processing unit respectively performs the query operation on the slave databases (U102, U103 and U104), and the slave databases (U102, U103 and U104) feed back the result of the query operation to the query processing unit U105.
- the dependent database U102 returns the result of the query operation of the distribution column value of the population data table A0, B0, C0, D0, etc. to the query processing unit U105; the dependent database U103 will have a distribution column value for the population data table.
- the result of the query operation of A1, B1, C1, D1, etc. is returned to the query processing unit U105; the dependent database U104 returns the result of the query operation of the distribution column value of the population data table to A2, B2, C2, D2, etc.
- the query processing unit U105 is provided.
- the query processing unit U105 After receiving the execution result of the query operation, the query processing unit U105 provides a query result to the requester of the query request.
- the query processing unit U105 respectively receives the execution result of the query operation for the records of the distribution column values of the population data table, such as A0, B0, C0, D0, fed back by the slave database U102, and the feedback of the slave database U103.
- the distribution column value of the population data table is the execution result of the query operation recorded by A1, B1, C1, D1, etc.
- the distribution column value of the population data table fed back by the slave database U104 is A2, B2, C2, D2, etc.
- the execution result is fed back to the requester of the external query request.
- the database system provided by this embodiment completes a response to an external query request.
- the query processing unit of the database system may further be configured to send a query task, accept the result of the query task and the query operation sent by the other query processing unit, execute a database query operation specified by the accepted query task, and integrate the As a result of the query operation, the result of the dependent database query operation or the consolidated result is provided to the recipient specified by the query task.
- the query result of integrating the query operation includes sorting, merging, and the like of the execution result of the query operation.
- the query processing unit U105 may further dynamically determine the number of the subordinate databases participating in the query according to the statistical information of the data involved in the query, for example, the size of the corresponding table, and send the split query operation instruction to the determined subordinate database.
- the query operation is performed and the query result is fed back.
- the query processing unit may determine how many subordinate databases participate in the query according to the size of the workload involved in the query request or the size of the query object, and the workload is small or the corresponding data table is small, and a small number of subordinates may be allocated.
- the database even participates in the query operation by a subordinate database. On the contrary, it allocates as much as possible to the subordinate database to participate in the query operation, so as to balance or as much as possible the workload of the query operation for each subordinate database, and improve the efficiency.
- the query processing unit may be located on the same physical node as the slave database, that is, each slave database has a slave database and a query processing unit at the same time. This facilitates the ability to take advantage of multiple subordinate databases to handle large and complex query requests to the database.
- the database system may further include respective query processing units corresponding to the respective dependent databases, and the query processing units are respectively located at nodes of the corresponding dependent database. on.
- the external query request accepted by the query processing unit U105 is select c1, count(c2) from t1 group by c1.
- the c1 column of the population data table t1 is the city name, and the c2 column is the population quantity value.
- the query processing unit U105 converts the query tasks to the respective dependent databases (U102, U103 and U104) and distributes them to the query processing units corresponding to the respective dependent databases, and the query tasks may include no intersection of the query ranges of the respective dependent databases. Query operation.
- Each of the query processing units corresponding to the respective subordinate databases accepts the query task, and if the query task does not include a query operation that does not intersect the query scope of each subordinate database, according to the accepted query task and the corresponding subordinate
- the database forms a query operation that does not intersect the query ranges of the respective dependent databases.
- the query tasks formed by the query processing units corresponding to the respective subordinate databases of the database system are as follows:
- the query task corresponding to the query processing unit of the node where the slave database U102 is located is the population quantity data of the city whose query distribution column values are A0, B0, C0, D0, etc., and sends the query result to the node where the slave database U104 is located.
- Query processing unit is the population quantity data of the city whose query distribution column values are A0, B0, C0, D0, etc.
- the query task corresponding to the query processing unit of the node where the slave database U103 is located is the population quantity data of the city in which the query distribution column values are A1, B1, C1, D1, etc., and the query result is sent to the node where the slave database U104 is located.
- Query processing unit is the population quantity data of the city in which the query distribution column values are A1, B1, C1, D1, etc.
- the query task corresponding to the query processing unit of the node where the slave database U104 is located is the population quantity data of the city whose query distribution column values are A2, B2, C2, D2, etc., and is received by the slave database U102 and the slave database U103.
- the population quantity data of the city is calculated, the sum of the populations of the respective cities is calculated, and the result is sent to the query processing unit U105.
- Each of the query processing units located at the same node as the respective slave databases performs a query operation corresponding to the query task of the slave database of the node:
- the query processing unit of the node where the slave database U102 is located performs an operation of querying the population quantity data of the city in which the distribution column values are A0, B0, C0, D0, etc., and sends the execution result of the query operation to the slave database U102.
- the query processing unit of the node where the slave database U103 is located performs an operation of querying the population quantity data of the city in which the distribution column values are A1, B1, C1, D1, etc., and sends the execution result of the query operation to the slave database U103.
- the query processing unit of the node where the slave database U104 is located performs an operation of querying the population quantity data of the city whose query distribution column values are A2, B2, C2, D2, etc., and receives the nodes where the slave databases U102 and U103 are located.
- the population data of each city sent is collected, and the data of the population of each city received is integrated, and the data of the population of each city is obtained, and the data of the population of the integrated cities is sent.
- the query processing unit U105 is given.
- the second embodiment of the present application provides a method for querying a database.
- the schematic flowchart of the application is as shown in FIG. 2, and includes the following steps:
- Step S201 obtaining a query request for the database.
- the query request may typically include information of a query object of the specified database information.
- the information of the query object may include the name of the table to be queried, the value of the column of the table to be queried, and the like.
- Step S202 splitting the query request into query operation instructions for the dependent database that have no intersection of the query scope.
- the query operation on the slave database without the intersection of the query scope means that there is no intersection of the query operations performed on the respective slave databases, that is, different records are queried for different two slave databases.
- the method of splitting the query request into the query database does not intersect the query of the slave database.
- the present embodiment provides the following manner to split the query request into the slave database with no intersection of the query scope. Query operation:
- the query request is split into query operation instructions for the slave database whose query scope does not intersect according to the distribution column value corresponding to the query object.
- the distribution column value corresponding to the query object corresponding to the request includes at least one of the following:
- the query request is split into query operation instructions for the slave database whose query scope does not intersect.
- the query request is split into query operation instructions for the slave database whose query scope does not intersect.
- Step S203 executing the query operation instruction for the slave database.
- the step of integrating the result of the query operation may be further included.
- the related description reference may be made to the related description in the first embodiment of the present application.
- Step S204 providing a result of the query request to a requester of the query request.
- the result of the query database request is fed back to the requester of the request based on the result of the execution of the query operation on the dependent database, or the result of the integration. Thereby completing the query of the database.
- the third embodiment of the present application provides a method for allocating a query operation.
- the schematic flowchart of the present application is as shown in FIG. 3, and includes the following steps:
- Step S301 obtaining a query request for the database.
- Step S302 splitting the query request into query operation instructions for the slave database that have no intersection of the query scope.
- the query operation for splitting the query request into the query database without the intersection of the query scope may be performed in multiple ways.
- the query request is split into the query of the slave database without the intersection of the query scope.
- the query request is split into query operation instructions for the slave database without the intersection of the query scope according to the distribution column value corresponding to the query object.
- the distribution column value corresponding to the query object includes at least one of the following:
- the query request is split into query operation instructions for the slave database whose query scope does not intersect.
- the query request is split into query operation instructions for the slave database whose query scope does not intersect.
- the fourth embodiment of the present application provides a method for performing a database query, and a schematic flowchart thereof is shown in FIG. 4, and includes the following steps:
- Step S401 obtaining a query task.
- Step S402 performing a query operation specified by the query task.
- Step S403 providing a result of the query operation to a receiver specified by the query task.
- a fifth embodiment of the present application provides a method for performing a database query, and a schematic flowchart thereof is shown in FIG. 5, and includes the following steps:
- Step S501 Acquire an execution query task.
- Step S502 obtaining a query result of other query operations specified by the query task.
- Step S503 integrating the query result.
- the step of performing the query operation specified by the query task to obtain the query result may be further included.
- Step S504 providing the integrated result to the recipient specified by the query task.
- the sixth embodiment of the present application provides an apparatus for querying a database.
- the structural block diagram thereof is as shown in FIG. 6, and includes an obtaining unit U601, a splitting unit U602, an executing unit U603, and a providing unit U604.
- the obtaining unit U601 is configured to obtain a query request for querying a database.
- the splitting unit U602 is configured to split the query request into a query operation on a slave database whose query scope does not intersect.
- the splitting unit is specifically configured to: split the query request into a query task for a dependent database whose query scope does not intersect according to a distribution column value corresponding to the query object.
- the distribution column value corresponding to the query object includes at least one of: a pre-stored distribution column value of the query object; a value of an arbitrary column of the query object; a value of a first column of the query object; the query Request the value of the specified column.
- the splitting unit may be further configured to split the query request into a query operation on the slave database whose query scope does not intersect according to the unique key of the record of the query object corresponding to the query request.
- the splitting unit may be further configured to: split the query request into a query operation on the slave database whose query scope does not intersect according to the number of the data page of the query object corresponding to the query request.
- the executing unit U603 is configured to perform the query operation on the slave database.
- the providing unit U604 is configured to provide the requester of the request with the query result of the query request.
- the apparatus provided in this embodiment may further include an integration unit for integrating the result of the query operation.
- the seventh embodiment of the present application provides an apparatus for allocating a query operation, and a structural block diagram thereof is shown in FIG. 7, and includes: an obtaining unit U701 and a splitting unit U702.
- the obtaining unit U701 is configured to obtain a query request for a database
- the splitting unit U702 is configured to split the query request into a query operation on a dependent database whose query scope does not intersect.
- the splitting unit U702 may be specifically configured to split the query request into a query task for a dependent database whose query scope does not intersect according to a distribution column value corresponding to the query object.
- the distribution column value includes at least one of: a pre-stored distribution column value of the query object; a value of the query query object arbitrary column; a value of the first column of the query object; the query request specifies The value of the column.
- the splitting unit U702 may be further configured to split the query request into a query operation on the slave database whose query scope does not intersect according to the unique key of the record of the query object corresponding to the query request.
- the splitting unit U702 may be further configured to split the query request into a query operation on the slave database whose query scope does not intersect according to the number of the data page of the query object corresponding to the query request.
- An eighth embodiment of the present invention provides an apparatus for performing a database query, and a structural block diagram thereof is shown in FIG. 8, and includes: an obtaining unit U801, an executing unit U802, and a providing unit U803.
- the obtaining unit U801 is configured to acquire a query task.
- the executing unit U802 is configured to execute a query operation specified by the query task
- the providing unit U803 is configured to provide a result of the query operation to a receiver specified by the query task.
- the ninth embodiment of the present application provides an apparatus for performing database query, and a structural block diagram thereof is shown in FIG. 9, and includes: an obtaining unit U901, a second obtaining unit U902, an integrating unit U903, and a providing unit U904.
- the obtaining unit U901 is configured to acquire a query task.
- the second obtaining unit U902 is configured to obtain a query result of other query operations specified by the query task
- the integration unit U903 is configured to integrate the query result
- the providing unit U904 is configured to provide the integrated result to the recipient specified by the query task.
- the apparatus for performing database query may further include an execution unit.
- the execution unit is configured to execute a query operation specified by the query task to obtain a query result.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media including both permanent and non-persistent, removable and non-removable media may be implemented by any method or technology.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the application can take the form of an entirely hardware embodiment, an entirely software embodiment or a combination of software and hardware.
- the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种数据库系统以及查询数据库的方法和装置,所述系统包括:主用数据库,至少一个从属数据库和查询处理单元,所述主用数据库与所述从属数据库间具有数据连接,所述从属数据库与所述查询处理单元间具有数据连接;所述查询处理单元,用于将查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。本申请可提供查询的效率。
Description
本申请要求2017年12月29日递交的申请号为201711482536.1、发明名称为“一种数据库系统以及查询数据库的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及数据库,具体涉及一种数据库系统。本发明同时涉及一种查询数据库的方法和一种查询数据库的装置。还涉及一种分配查询任务的方法和一种分配查询任务的装置。还涉及一种执行数据库查询的方法和一种执行数据库查询的装置。还涉及一种进行数据库查询的方法和一种进行数据库查询的装置。
非分布式数据库一般采用一个主用数据库加一个从属数据库或一个主用数据库加多个从属数据库的主从架构。
这种架构中,主用数据库为对外可写的。主用数据库上的数据有更新时,会通过事务日志同步到从属数据库。一般一个主用数据库会对应一个或多个从属数据库,每个从属数据库都有一份完整的、和主用数据库保持一致的数据。
在主用数据库故障时,每个从属数据库都可以作为备用数据库代替主用数据库,增强了可用性。每个从属数据库都可以执行查询请求,可以分离主用数据库的查询负担。
在目前的架构中,一个SQL查询操作只能在一个数据库中执行,即一个SQL查询只能在主用数据库中执行或只能在一个从属数据库中执行。这可能导致一个从属数据库繁忙进行一个复杂的大型SQL查询操作的执行而负荷较重,响应速度缓慢,而其他从属数据库空闲的情况。特别地,从属数据库除了日常作为查询数据库,一般还会在每天特定时间(如凌晨),执行生成报表、数据核对等复杂操作。这种情况下,执行复杂的大型SQL查询操作甚至可能会由于过负荷运行而导致无法提供查询服务的情况。
可见,现有的非分布式主从架构的数据库,对于复杂查询,无法利用其它备用数据库资源,会导致查询响应速度慢,效率低下的问题。
发明内容
本申请提供一种数据库系统,以解决现有主从架构的数据库的上述的问题。本发明 另外提供一种查询数据库的方法、一种分配查询操作的方法、一种执行数据库查询的方法、一种进行数据库查询的方法及前述方法相应的装置。
本申请提供一种数据库系统,特包括:主用数据库,至少一个从属数据库和查询处理单元,所述主用数据库与所述从属数据库间具有数据连接,所述从属数据库与所述查询处理单元间具有数据连接;
所述查询处理单元,用于将查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。
此外,本申请还提供一种查询数据库的方法,包括:
获取对数据库的查询请求;
将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令;
执行所述对从属数据库的查询操作指令;
向所述查询请求的请求者提供所述查询请求的结果。
此外,本申请还提供一种分配查询操作的方法,包括:
获取对数据库的查询请求;
将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
此外,本申请还提供一种执行数据库查询的方法,包括:
获取查询任务;
执行所述查询任务所指定的查询操作;
将所述查询操作的结果提供给所述查询任务指定的接收者。
此外,本申请还提供一种进行数据库查询的方法,包括:
获取查询任务;
获取所述查询任务所指定的其他查询操作的查询结果;
整合所述查询结果;
将整合的结果提供给所述查询任务所指定的接收者。
此外,本申请还提供一种查询数据库的装置,包括:
获取单元,用于获取查询数据库的查询请求;
拆分单元,用于将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令;
执行单元,用于执行所述对从属数据库的查询操作指令;
提供单元,用于向所述请求的请求者提供所述查询请求的查询结果。
此外,本申请还提供一种分配查询操作的装置,包括:
获取单元,用于获取对数据库的查询请求;
拆分单元,用于将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
此外,本申请还提供一种执行数据库查询的装置,包括:
获取单元,用于获取查询任务;
执行单元,用于执行所述查询任务所指定的查询操作指令;
提供单元,用于将所述查询操作的结果提供给所述查询任务指定的接收者。
此外,本申请还提供一种进行数据库查询的装置,包括:
获取单元,用于获取查询任务;
第二获取单元,用于获取所述查询任务所指定的其他查询操作的查询结果;
整合单元,用于整合所述查询结果;
提供单元,用于将整合的结果提供给所述查询任务所指定的接收者。
与现有技术相比,本申请提供的一种数据库系统的其中一个方面具有以下优点:通过查询处理单元,将查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,从而可以有效利用从属数据库资源,避免某一或单一从属数据库查询压力较大,并能够达到提高查询效率的效果。
与现有技术相比,本申请提供的一种查询数据库的方法的其中一个方面具有以下优点:将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作,从而将查询分散到从属数据库,起到有效利用从属数据库资源的作用,达到提高查询效率的效果。
与现有技术相比,本申请提供的一种分配查询操作的方法的其中一个方面具有以下优点:将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作,从而将查询分散到从属数据库,起到有效利用从属数据库资源的作用,达到提高查询效率的效果。
与现有技术相比,本申请提供的一种执行数据库查询的方法的其中一个方面具有以下优点:能够将查询任务所指定的查询操作的结果发送给指定的接收者,起到灵活查询和充分利用资源分担查询负担的作用。
与现有技术相比,本申请提供的一种进行数据库查询的方法的其中一个方面具有以下优点:能够将获取到的查询操作的结果进行整合,并将整合的结果提供给查询任务指定的接收者。起到充分利用资源分担查询负担的作用。
图1是本申请第一实施例一种数据库系统的结构示意图;
图2是本申请第二实施例一种查询数据库的方法的流程示意图;
图3是本申请第三实施例一种分配查询操作的方法的流程示意图;
图4是本申请第四实施例一种执行数据库查询的方法的流程示意图;
图5是本申请第五实施例一种进行数据库查询的方法的流程示意图;
图6是本申请第六实施例一种查询数据库的装置的结构框图;
图7是本申请第七实施例一种分配查询操作的装置的结构框图;
图8是本申请第八实施例一种执行数据库查询的装置的结构框图;
图9是本申请第九实施例一种进行数据库查询的装置的结构框图。
在下面的描述中阐述了很多具体细节以便于充分理解本发明。但是本发明能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似推广,因此本发明不受下面公开的具体实施的限制。
本申请第一实施例提供一种数据库系统,其结构示意图如图1所示,包括:主用数据库U101,从属数据库U102,从属数据库U103,从属数据库U104和查询处理单元U105,所述主用数据库U101与所述各个从属数据库(U102,U103和U104)之间,以及所述各个从属数据库(U102,U103和U104)与所述查询处理单元U105之间具有数据连接。
所述数据连接,包括硬件连接和软件连接,所述硬件连接可以是有线网络连接如以太网,也可以使无线网络连接如蓝牙或无线局域网,所述软件连接可以是各种软件协议或程序进程间的接口连接。通过所述数据连接,可以交换数据和信息。
所述主用数据库U101,从外部接收并执行对数据库进行的更新操作,如增加记录,修改记录,删除记录等。更新数据库信息。
所述从属数据库U102,从属数据库U103和从属数据库U104(编号分别为0,1,2)。分别与主用数据库保持同步,使其保持一份与主用数据库一致的数据库数据,从而在主用数据库故障时,可以替代主用数据库对外提供原主用数据库提供的服务。
所述从属数据库(U102,U103和U104)与主用数据库保持同步可以有多种方式,既可以是主用数据库在更新时将更新信息主动发送给各个从属数据库,各个从属数据库再 根据所述主用数据库的更新信息更新自身的数据库数据;也可以是各个从属数据库根据自身的状况,定时向主用数据库或保存有主用数据库更新信息的单元检查更新信息,一旦有更新就更新自身数据库数据。
所述从属数据库(U102,U103和U104)还从所述查询处理单元U105接受并响应查询操作。各个从属数据库通过与主用数据库同步,保持有与主用数据库一致的数据库数据,可以用于提供数据库的查询功能。
本实施例所述的查询处理单元U105用于将查询请求发送至相应的从属数据库,或者将查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。
具体而言,查询处理单元U105一方面可以接受对数据库的查询请求,根据所述查询请求生成相应的查询操作指令,然后将查询操作指令发送至某一或指定的从属数据库,执行对从属数据库的查询操作,例如,查询操作指令针对的数据查询较为简单,仅查询某一从属数据库即可,或者查询操作指令指定的为提供查询操作的从属数据库;或者根据需要,查询处理单元U105将查询请求转化为查询范围没有交集的查询操作指令,将查询指令分发至相同或不同的从属数据库,对不同数据库执行不同的查询操作,从而实现多个从属数据库的合理利用,有利于提高效率,并减轻单一从属数据库查询的数据处理压力。
在下面的实例中,以查询处理单元可以将查询请求拆分后分发至不同从属数据库执行查询操作的处理方式进行详细说明。
查询处理单元接受对数据库的查询请求后,将外部查询请求拆分为查询范围没有交集的查询操作指令,对所述从属数据库(U102,U103和U104)进行所述查询操作。
所述查询范围没有交集的查询操作是指对各个从属数据库进行的查询操作没有交集,即对不同的从属数据库查询不同的记录。
将外部查询请求拆分为查询范围没有交集的查询操作的方式可以有多种,
本实施例提供以下几种方式:
方式一,根据外部查询请求的查询对象所对应的分布列值,将查询请求拆分为对于各个从属数据库查询范围没有交集的查询操作。所述查询对象所对应的分布列值是指被查询对象每条记录对应一个可以用于指定从属数据库的值。该值被称为分布列值。根据对所述分布列值进行处理,可以得到其所对应的从属数据库的标识。
例如,被查询对象为一个人口数据表,表的每条记录包括城市,人口数量等信息, 其分布列值为该表的一列数据,其中每个数据对应所述人口数据表的一行记录。
所述的查询处理单元U105在获取到外部对所述人口数据表的查询请求后,获取所述人口数据表所对应的分布列值,将所述查询请求转换为对所述人口数据表的指定的分布列值项进行查询,可以对每一分布列值进行哈希运算后按照从属数据库的数量(本实施例中为3)进行取模,根据取模后的余数确定对相应的从属数据库进行查询操作。
例如,对于分布列值A0,B0,C0,D0……A1,B1,C1,D1……A2,B2,C2,D2……进行上述处理后,
余数为0的分布列值包括A0,B0,C0,D0……
余数为1的分布列值包括A1,B1,C1,D1……
余数为2的分布列值包括A2,B2,C2,D2……
则对编号为0的从属数据库U102进行的查询操作为余数为0的A0,B0,C0,D0等分布列值所对应的各条记录。
对编号为1的从属数据库U103进行的查询操作为余数为1的A1,B1,C1,D1等分布列值所对应的各条记录。
对编号为2的从属数据库U104进行的查询操作为余数为2的A2,B2,C2,D2等分布列值所对应的各条记录。
所述查询对象所对应的分布列值包括以下几种:
一,预先保存的所述查询对象的分布列值。
可以事先生成数据库的各个查询对象所对应的分布列值表,例如事先由数据库的所有者编辑生成数据库的各个查询对象的每一行记录的分布列值。生成所述各个查询对象的分布列值表后,存储起来,并在数据库更新时进行同步更新。当查询处理单元U105接收到外部的查询请求时,从保存的所述数据库的各个查询对象所对应的分布列值表中获取本次查询请求对应的查询对象的分布列值。
从保存的查询对象的分布列指表获取分布列值能够简化查询的步骤,提高查询效率。并且由于所述分布列值事先有数据库的所有者生成,能够最大限度的将对其所对应的记录的查询分散到各个从属数据库。
二,所述查询对象任意列的列值。
当接收到外部的查询请求时,也可以将所述查询请求对应的查询对象的任意列的值作为该查询对象的分布列值。可以将查询请求所指定的的列的值作为分布列值。
例如,对于查询各个城市的人口数据的情况,可以先查询所述人口数据表城市列所 有的城市名称值,将城市名称值作为分布列值。
将所述查询请求所对应的查询对象的列的值作为分布列值,能够充分利用查询请求的信息,无需事先生成并维护分布列指表,具有减轻数据库维护工作量的作用。
三,所述查询对象的第一列的值。
对于没有指定查询对象的列的查询请求,可以将其所需要查询的查询对象的第一列的值作为分布列值。
将所述查询对象的第一列的值作为分布列值,能够在查询请求没有指定查询对象的列的情况下,利用查询对象必然具有的列的值作为分布列值,简化了数据库的维护工作。
四,所述查询请求所指定的列的值。
当接收到外部的查询请求时,还可以将所述查询请求所包含的列的值作为查询对象的分布列值。
例如,对于查询各个城市的人口数据的情况,查询请求指定了“城市”,可以先查询所述人口数据表城市列所有的城市名称值,将城市名称值作为分布列值。
将所述查询请求所指定的列的值作为分布列值,能够充分利用查询请求的信息,无需事先生成并维护分布列指表,具有减轻数据库维护工作量的作用。
对于查询数据库的多个表的情况,可以选取关联条件的列的值作为分布列值。例如,对于查询请求对性的查询对象为表t1和t2,其中t1表的c1列与t2表的c2列相关联的情况,可以分别选取t1表的c1列和t2表的c2列作为t1和t2的分布列,获取分布列值的操作为select*from t1,t2where t1.c1=t2.c2。
根据分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询任务,不仅适用于查询单个查询对象的情况,也适用于查询多个查询对象的情况,具有普遍适用性。
方式二,根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
所述唯一键指查询对象每条记录对应的键的值,每条记录的所述键值都不同。可以预先把键值的值域划分成与参与查询的从属数据库相等数目的多个值域,并指定每个从属数据库(根据唯一键索引)访问对应值域的数据。
例如,c1为唯一键,对于本实施例中三个从属数据库,分成三个值域[0,60],[60,100]和[100,150],每个从属数据库分别访问对应值域的记录数据。
此方式适合于查询单独查询对象的情况。
方式三,根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
可以预先把查询对象的数据页的编号分成与参与查询的从属数据库相等数目的多个范围。例如,查询对象的数据页编号为0-1500,从属数据库为三个,则可以分成[0-500],[500,1000]和[1000-1500]3个范围,由三个从属数据库分别处理。
此方式适合于查询单独查询对象的情况。
所述查询处理单元分别对所述从属数据库(U102,U103和U104)执行所述查询操作,所述从属数据库(U102,U103和U104)将查询操作的结果反馈给所述查询处理单元U105。
例如,从属数据库U102将对人口数据表的分布列值为A0,B0,C0,D0等的查询操作的结果返回给所述查询处理单元U105;从属数据库U103将对人口数据表的分布列值为A1,B1,C1,D1等的查询操作的结果返回给所述查询处理单元U105;从属数据库U104将对人口数据表的分布列值为A2,B2,C2,D2等的查询操作的结果返回给所述查询处理单元U105。
所述查询处理单元U105接收到所述查询操作的执行结果后,对外向所所述查询请求的请求者提供查询结果。
例如,所述查询处理单元U105分别接收到从属数据库U102反馈的对所述人口数据表的分布列值为A0,B0,C0,D0等记录的查询操作的执行结果,从属数据库U103反馈的对所述人口数据表的分布列值为A1,B1,C1,D1等记录的查询操作的执行结果和从属数据库U104反馈的对所述人口数据表的分布列值为A2,B2,C2,D2等记录的查询操作的执行结果后,将所述执行结果反馈给所述外部查询请求的请求者。
至此,本实施例提供的数据库系统完成一次对外部查询请求的响应。
本实施例提供的数据库系统的查询处理单元还可以用于发送查询任务,接受其他查询处理单元发送的查询任务和查询操作的结果,执行所接受的查询任务所指定的数据库查询操作,整合所述查询操作的结果,将对所述从属数据库查询操作的结果或所述整合后的结果提供给查询任务所指定的接收者。
所述整合所述查询操作的查询结果包括对查询操作的执行结果进行排序,合并等。
所述查询处理单元U105还可以根据查询所涉及的数据的统计信息,例如查询对应的表的大小,动态决定参与查询的从属数据库的数目,将拆分的查询操作指令发送至所决定的从属数据库进行所述查询操作,并反馈查询结果。简言之,所述查询处理单元可以根据查询请求所涉及的工作量的大小或者查询对象的大小决定有多少个从属数据库 参与查询,工作量小或者查询对应的数据表小,可以分配少量的从属数据库甚至由一个从属数据库参与查询操作,反之,则尽可能分配给更多的从属数据库参与查询操作,以均衡或尽可能对每一从属数据库执行查询操作的工作量,提高效率。
所述查询处理单元可以与所述从属数据库位于同一物理节点上,即每一从属数据库的节点上都同时具有一个从属数据库和一个查询处理单元。这样有利于充分利用多个从属数据库的能力处理大型复杂的对数据库的查询请求。
例如,除了上述的主用数据库,从属数据库和查询处理单元外,数据库系统可以还包括与各个从属数据库相对应的各个查询处理单元,所述查询处理单元分别位于其所对应的从属数据库所在的节点上。对于查询几个城市的人口数据的情况,查询处理单元U105接受到的外部查询请求为select c1,count(c2)from t1 group by c1。其中人口数据表t1的c1列为城市名称,c2列为人口数量值。
查询处理单元U105将其转换为对各个从属数据库(U102,U103和U104)的查询任务并分发给各个从属数据库所对应的查询处理单元,所述查询任务可以包括对各个从属数据库的查询范围没有交集的查询操作。
所述各个从属数据库所对应的各个查询处理单元接受所述查询任务,若所述查询任务不包括对各个从属数据库的查询范围没有交集的查询操作,则根据所接受的查询任务和所对应的从属数据库形成对所述各个从属数据库查询范围没有交集的查询操作。
例如,对所述数据库系统的各个从属数据库对应的查询处理单元形成的查询任务如下:
从属数据库U102所在的节点的查询处理单元所对应的查询任务为查询分布列值为A0,B0,C0,D0等的所述城市的人口数量数据,并将查询结果发送给从属数据库U104所在的节点的查询处理单元。
从属数据库U103所在的节点的查询处理单元所对应的查询任务为查询分布列值为A1,B1,C1,D1等的所述城市的人口数量数据,并将查询结果发送给从属数据库U104所在的节点的查询处理单元。
从属数据库U104所在的节点的查询处理单元所对应的查询任务为查询分布列值为A2,B2,C2,D2等的所述城市的人口数量数据,接收从属数据库U102和从属数据库U103所发送的所述城市的人口数量数据,计算各个城市的人口数量的总和并将结果发送给所述查询处理单元U105。
与所述各个从属数据库位于同一节点的各个查询处理单元对本节点的从属数据库 执行相应查询任务所对应的查询操作:
从属数据库U102所在的节点的查询处理单元对所述从属数据库U102执行查询分布列值为A0,B0,C0,D0等的所述城市的人口数量数据的操作,并将查询操作的执行结果发送给从属数据库U104所在的节点的查询处理单元。
从属数据库U103所在的节点的查询处理单元对所述从属数据库U103执行查询分布列值为A1,B1,C1,D1等的所述城市的人口数量数据的操作,并将查询操作的执行结果发送给从属数据库U104所在的节点的查询处理单元。
从属数据库U104所在的节点的查询处理单元对所述从属数据库U104执行查询分布列值为A2,B2,C2,D2等的所述城市的人口数量数据的操作,接收从属数据库U102和U103所在的节点发送来的各个城市的人口数量数据,将接收到的各个城市的人口数量的数据和整合起来,得到所述各个城市的人口数量的数据,将所述整合后的各个城市的人口数量的数据发送给所述查询处理单元U105。
本申请第二实施例提供一种查询数据库的方法,其流程示意图如图2所示,包括以下步骤:
步骤S201,获取对数据库的查询请求。
所述查询请求通常可以包括指定的数据库信息的查询对象的信息。所述查询对象的信息可以包括需要查询的表的名称,需要查询的表的列的值等信息。
本步骤的详细说明可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
步骤S202,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
所述查询范围没有交集的对从属数据库的查询操作是指对各个从属数据库执行的查询操作没有交集,即对不同的两个个从属数据库查询不同的记录。
将所述查询请求拆分为查询范围没有交集的对从属数据库的查询擦苹果可以有多种方式,本实施例提供以下的方式将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作:
方式一,根据查询对象所对应的分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
所述请求对应的查询对象所对应的分布列值包括以下至少一项:
一,预先保存的所述查询对象的分布列值。
二,所述查询对象的任意列的值。
三,所述查询对象的第一列的值。
四,所述查询请求所指定的列的值。
相应的详细的说明,可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
方式二,根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
方式三,根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
步骤S203,执行所述对从属数据库的查询操作指令。
本步骤详细的说明可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
在本步骤后,还可以包括对所述查询操作的结果进行整合的步骤,相关说明可以参考本申请第一实施例中的相关描述们再次不做赘述。
步骤S204,向所述查询请求的请求者提供所述查询请求的结果。
根据对从属数据库的查询操作的执行结果,或整合的结果,将查询数据库请求的结果反馈给所述请求的请求者。从而完成本次对数据库的查询。
本申请第三实施例提供一种分配查询操作的方法,其流程示意图如图3所示,包括以下步骤:
步骤S301,获取对数据库的查询请求。
本步骤的详细说明可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
步骤S302,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作可以有多种方式,本实施例提供以下的方式将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作:
方式一,根据查询对象所对应分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
所述查询对象所对应的分布列值包括以下至少一项:
一,预先保存的所述查询对象的分布列值。
二,所述查询对象任意列的值。
三,所述查询对象的第一列的值。
四,所述查询请求所指定的列的值。
方式二,根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
方式三,根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
相应的详细的说明,可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
本申请第四实施例提供一种执行数据库查询的方法,其流程示意图如图4所示,包括以下步骤:
步骤S401,获取查询任务。
步骤S402,执行所述查询任务所指定的查询操作。
步骤S403,将所述查询操作的结果提供给所述查询任务指定的接收者。
本实施例各步骤的详细说明可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
本申请第五实施例提供一种进行数据库查询的方法,其流程示意图如图5所示,包括以下步骤:
步骤S501,获取执行查询任务。
步骤S502,获取所述查询任务所指定的其他查询操作的查询结果。
步骤S503,整合所述查询结果。
本步骤前,还可以包括执行所述查询任务所指定的查询操作获得查询结果的步骤。
步骤S504,将整合的结果提供给所述查询任务所指定的接收者。
本实施例各步骤的详细说明可以参考本申请第一实施例中查询处理单元的相关描述,在此不做赘述。
本申请第六实施例提供一种查询数据库的装置,其结构框图如图6所示,包括:获取单元U601,拆分单元U602,执行单元U603和提供单元U604。
所述获取单元U601,用于获取查询数据库的查询请求。
所述拆分单元U602,用于将所述查询请求拆分为查询范围没有交集的对从属数据库 的查询操作。
所述拆分单元具体用于:根据查询对象所对应分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询任务。
所述查询对象所对应分布列值包括以下至少一项:预先保存的所述查询对象的分布列值;所述查询对象任意列的值;所述查询对象的第一列的值;所述查询请求所指定的列的值。
所述拆分单元还可以具体用于:根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
所述拆分单元还可以具体用于:根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
所述执行单元U603,用于执行所述对从属数据库的查询操作。
所述提供单元U604,用于向所述请求的请求者提供所述查询请求的查询结果。
本实施例所提供的装置还可以包括整合单元,用于整合所述查询操作的结果。
本申请第七实施例提供一种分配查询操作的装置,其结构框图如图7所示,包括:获取单元U701和拆分单元U702。
所述获取单元U701,用于获取对数据库的查询请求;
所述拆分单元U702,用于将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
所述拆分单元U702可以具体用于:根据查询对象所对应的分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询任务。
所述分布列值包括以下至少一项:预先保存的所述查询对象的分布列值;所述查询查询对象任意列的值;所述查询对象的第一列的值;所述查询请求所指定的列的值。
所述拆分单元U702还可以具体用于:根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
所述拆分单元U702还可以具体用于:根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
本申请第八实施例提供一种执行数据库查询的装置,其结构框图如图8所示,包括:获取单元U801,执行单元U802和提供单元U803。
所述获取单元U801,用于获取查询任务;
所述执行单元U802,用于执行所述查询任务所指定的查询操作;
所述提供单元U803,用于将所述查询操作的结果提供给所述查询任务指定的接收者。
本申请第九实施例提供一种进行数据库查询的装置,其结构框图如图9所示,包括:获取单元U901,第二获取单元U902,整合单元U903和提供单元U904。
所述获取单元U901,用于获取查询任务;
所述第二获取单元U902,用于获取所述查询任务所指定的其他查询操作的查询结果;
所述整合单元U903,用于整合所述查询结果;
所述提供单元U904,用于将整合的结果提供给所述查询任务所指定的接收者。
本实施例提供的进行数据库查询的装置,还可以包括执行单元。所述执行单元用于执行所述查询任务所指定的查询操作获得查询结果。
本发明虽然以较佳实施例公开如上,但其并不是用来限定本发明,任何本领域技术人员在不脱离本发明的精神和范围内,都可以做出可能的变动和修改,因此本发明的保护范围应当以本发明权利要求所界定的范围为准。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实 施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
Claims (28)
- 一种数据库系统,其特征在于,包括:主用数据库,至少一个从属数据库和查询处理单元,所述主用数据库与所述从属数据库间具有数据连接,所述从属数据库与所述查询处理单元间具有数据连接;所述查询处理单元,用于将查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。
- 根据权利要求1所述的数据库系统,其特征在于,所述查询处理单元具体用于接受查询请求,根据所述查询请求对应的查询对象所对应的分布列值,将所述查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。
- 根据权利要求2所述的数据库系统,其特征在于,所述查询对象所对应的分布列值包括以下至少一项:预先保存的所述查询对象的分布列值;所述查询对象任意列的值;所述查询对象的第一列的值;所述查询请求所指定的列的值。
- 根据权利要求1所述的数据库系统,其特征在于,所述查询处理单元具体用于接受查询请求,根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。
- 根据权利要求1所述的数据库系统,其特征在于,所述查询处理单元具体用于接受查询请求,根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的查询操作指令,将拆分的查询操作指令发送至相同或不同的从属数据库进行所述查询操作,并反馈查询结果。
- 根据权利要求1所述的数据库系统,其特征在于,所述查询处理单元还用于发送查询任务,接受其他查询处理单元发送的查询任务和查询操作的结果,执行所接受的查询任务所指定的数据库查询操作,整合所述查询操作的结果,将对所述从属数据库进行查询操作的结果或所述整合后的结果提供给查询任务所指定的接收者。
- 根据权利要求6所述的数据库系统,其特征在于,所述查询处理单元与所述从属数据库位于同一物理节点上。
- 根据权利要求1所述的数据库系统,其特征在于,所述查询处理单元,用于具 体用于将查询请求拆分为查询范围没有交集的查询操作指令,根据查询所涉及的数据的统计信息,动态决定参与查询的从属数据库的数目,将拆分的查询操作指令发送至所决定的从属数据库进行所述查询操作,并反馈查询结果。
- 根据权利要求1所述的数据库系统,其特征在于,所述查询处理单元,还用于将查询请求发送至相应的从属数据库。
- 一种查询数据库的方法,其特征在于,包括:获取对数据库的查询请求;将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令;执行所述对从属数据库的查询操作指令;向所述查询请求的请求者提供所述查询请求的结果。
- 根据权利要求10所述的查询数据库的方法,其特征在于,所述将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令包括:根据查询对象所对应的分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 根据权利要求11所述的查询数据库的方法,其特征在于,所述查询对象所对应的分布列值包括一下至少一项:预先保存的所述查询对象的分布列值;所述查询对象的任意列的值;所述查询对象的第一列的值;所述查询请求所指定的列的值。
- 根据权利要求10所述的查询数据库的方法,其特征在于,所述将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令包括:根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 根据权利要求10所述的查询数据库的方法,其特征在于,所述将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令包括:根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 根据权利要求10所述的查询数据库的方法,其特征在于,所述向所述查询请求的请求者提供所述查询请求的结果的步骤前还包括:整合所述查询操作的结果。
- 根据权利要求10所述的查询数据库的方法,其特征在于,所述执行所述对从属数据库的查询操作指令具体为:根据查询所涉及的数据的统计信息,决定参与查询的从属数据库的数目,对所决定的从属数据库执行所述查询操作指令。
- 一种分配查询操作的方法,其特征在于,包括:获取对数据库的查询请求;将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 根据权利要求17所述的分配查询操作的方法,其特征在于,所述将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令包括:根据查询对象所对应的分布列值将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 根据权利要求18所述的分配查询操作的方法,其特征在于,所述查询对象所对应的分布列值包括以下至少一项:预先保存的所述查询对象的分布列值;所述查询对象任意列的值;所述查询对象的第一列的值;所述查询请求所指定的列的值。
- 根据权利要求17所述的分配查询操作的方法,其特征在于,所述将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令包括:根据所述查询请求对应的查询对象的记录的唯一键,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 根据权利要求17所述的分配查询操作的方法,其特征在于,所述将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令包括:根据所述查询请求对应的查询对象的数据页的编号,将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令。
- 一种执行数据库查询的方法,其特征在于,包括:获取查询任务;执行所述查询任务所指定的查询操作;将所述查询操作的结果提供给所述查询任务指定的接收者。
- 一种进行数据库查询的方法,其特征在于,包括:获取查询任务;获取所述查询任务所指定的其他查询操作的查询结果;整合所述查询结果;将整合的结果提供给所述查询任务所指定的接收者。
- 根据权利要求23所述的进行数据库查询的方法,其特征在于,所述整合所述查询结果的步骤前还包括:执行所述查询任务所指定的查询操作获得查询结果。
- 一种查询数据库的装置,其特征在于,包括:获取单元,用于获取查询数据库的查询请求;拆分单元,用于将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作指令;执行单元,用于执行所述对从属数据库的查询操作指令;提供单元,用于向所述请求的请求者提供所述查询请求的查询结果。
- 一种分配查询操作的装置,其特征在于,包括:获取单元,用于获取对数据库的查询请求;拆分单元,用于将所述查询请求拆分为查询范围没有交集的对从属数据库的查询操作。
- 一种执行数据库查询的装置,其特征在于,包括:获取单元,用于获取查询任务;执行单元,用于执行所述查询任务所指定的查询操作指令;提供单元,用于将所述查询操作的结果提供给所述查询任务指定的接收者。
- 一种进行数据库查询的装置,其特征在于,包括:获取单元,用于获取查询任务;第二获取单元,用于获取所述查询任务所指定的其他查询操作的查询结果;整合单元,用于整合所述查询结果;提供单元,用于将整合的结果提供给所述查询任务所指定的接收者。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020533622A JP7440007B2 (ja) | 2017-12-29 | 2018-12-25 | データベースをクエリするためのシステム、方法および装置 |
US16/954,286 US11789957B2 (en) | 2017-12-29 | 2018-12-25 | System, method, and apparatus for querying a database |
EP18895044.8A EP3734476A4 (en) | 2017-12-29 | 2018-12-25 | DATABASE SYSTEM AND METHOD AND DEVICE FOR REQUESTING A DATABASE |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711482536.1 | 2017-12-29 | ||
CN201711482536.1A CN110019274B (zh) | 2017-12-29 | 2017-12-29 | 一种数据库系统以及查询数据库的方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019128978A1 true WO2019128978A1 (zh) | 2019-07-04 |
Family
ID=67066574
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/123437 WO2019128978A1 (zh) | 2017-12-29 | 2018-12-25 | 一种数据库系统以及查询数据库的方法和装置 |
Country Status (5)
Country | Link |
---|---|
US (1) | US11789957B2 (zh) |
EP (1) | EP3734476A4 (zh) |
JP (1) | JP7440007B2 (zh) |
CN (1) | CN110019274B (zh) |
WO (1) | WO2019128978A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111159106B (zh) * | 2019-12-30 | 2023-04-07 | 亚信科技(中国)有限公司 | 一种数据查询方法及装置 |
US11568065B2 (en) * | 2021-01-15 | 2023-01-31 | Bank Of America Corporation | System for securing electronic data by aggregation of distributed electronic database entries |
CN115048416A (zh) * | 2022-06-20 | 2022-09-13 | 北京人大金仓信息技术股份有限公司 | 数据查询方法、装置和设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916280A (zh) * | 2010-08-17 | 2010-12-15 | 上海云数信息科技有限公司 | 并行计算系统及按查询内容进行负载均衡的方法 |
CN106339432A (zh) * | 2016-08-19 | 2017-01-18 | 上海巨数信息科技有限公司 | 一种按查询内容进行负载均衡的系统及其方法 |
CN106372177A (zh) * | 2016-08-30 | 2017-02-01 | 东华大学 | 支持混合数据类型的关联查询及模糊分组的查询扩展方法 |
Family Cites Families (42)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5694546A (en) | 1994-05-31 | 1997-12-02 | Reisman; Richard R. | System for automatic unattended electronic information transport between a server and a client by a vendor provided transport software with a manifest list |
US7181438B1 (en) | 1999-07-21 | 2007-02-20 | Alberti Anemometer, Llc | Database access system |
US6795819B2 (en) | 2000-08-04 | 2004-09-21 | Infoglide Corporation | System and method for building and maintaining a database |
US6778977B1 (en) | 2001-04-19 | 2004-08-17 | Microsoft Corporation | Method and system for creating a database table index using multiple processors |
PL374305A1 (en) | 2001-12-28 | 2005-10-03 | Jeffrey James Jonas | Real time data warehousing |
US8620937B2 (en) | 2002-12-27 | 2013-12-31 | International Business Machines Corporation | Real time data warehousing |
US7403942B1 (en) | 2003-02-04 | 2008-07-22 | Seisint, Inc. | Method and system for processing data records |
CA2744925C (en) * | 2003-04-08 | 2014-06-03 | Grant L. Hutchison | Method and system for executing a database query |
US8200775B2 (en) | 2005-02-01 | 2012-06-12 | Newsilike Media Group, Inc | Enhanced syndication |
US7490113B2 (en) | 2003-08-27 | 2009-02-10 | International Business Machines Corporation | Database log capture that publishes transactions to multiple targets to handle unavailable targets by separating the publishing of subscriptions and subsequently recombining the publishing |
US8543566B2 (en) | 2003-09-23 | 2013-09-24 | Salesforce.Com, Inc. | System and methods of improving a multi-tenant database query using contextual knowledge about non-homogeneously distributed tenant data |
US7707039B2 (en) | 2004-02-15 | 2010-04-27 | Exbiblio B.V. | Automatic modification of web pages |
EP1716505B1 (en) | 2004-02-21 | 2018-01-10 | Microsoft Technology Licensing, LLC | Ultra-shared-nothing parallel database |
US7499917B2 (en) | 2005-01-28 | 2009-03-03 | International Business Machines Corporation | Processing cross-table non-Boolean term conditions in database queries |
US7672930B2 (en) * | 2005-04-05 | 2010-03-02 | Wal-Mart Stores, Inc. | System and methods for facilitating a linear grid database with data organization by dimension |
US7908242B1 (en) | 2005-04-11 | 2011-03-15 | Experian Information Solutions, Inc. | Systems and methods for optimizing database queries |
US7831620B2 (en) * | 2006-08-31 | 2010-11-09 | International Business Machines Corporation | Managing execution of a query against a partitioned database |
US8468244B2 (en) | 2007-01-05 | 2013-06-18 | Digital Doors, Inc. | Digital information infrastructure and method for security designated data and with granular data stores |
US20090012932A1 (en) * | 2007-07-03 | 2009-01-08 | Xeround Systems Ltd. | Method and System For Data Storage And Management |
US8489622B2 (en) | 2008-12-12 | 2013-07-16 | Sas Institute Inc. | Computer-implemented systems and methods for providing paginated search results from a database |
US8078825B2 (en) | 2009-03-11 | 2011-12-13 | Oracle America, Inc. | Composite hash and list partitioning of database tables |
US8880549B2 (en) * | 2009-11-09 | 2014-11-04 | International Business Machines Corporation | Concurrent database access by production and prototype applications |
US8655867B2 (en) | 2010-05-13 | 2014-02-18 | Salesforce.Com, Inc. | Method and system for optimizing queries in a multi-tenant database environment |
US20120331010A1 (en) * | 2011-06-24 | 2012-12-27 | Douglass Adam Christie | Systems And Methods For Performing A Query On A Distributed Database |
CN102254031A (zh) * | 2011-08-03 | 2011-11-23 | 无锡浙潮科技有限公司 | 基于批处理请求的Microsoft SQL Server数据库集群 |
EP2780835B1 (en) | 2011-11-15 | 2019-08-07 | Ab Initio Technology LLC | Data clustering, segmentation, and parallelization |
US9110947B1 (en) * | 2011-12-30 | 2015-08-18 | Teradata Us, Inc. | Column-oriented task execution in a row-partitioned database system |
JP5800720B2 (ja) | 2012-01-24 | 2015-10-28 | 三菱電機株式会社 | 情報処理装置及び情報処理方法及びプログラム |
US8892599B2 (en) * | 2012-10-24 | 2014-11-18 | Marklogic Corporation | Apparatus and method for securing preliminary information about database fragments for utilization in mapreduce processing |
US9928287B2 (en) * | 2013-02-24 | 2018-03-27 | Technion Research & Development Foundation Limited | Processing query to graph database |
CN103123652A (zh) * | 2013-03-14 | 2013-05-29 | 曙光信息产业(北京)有限公司 | 数据查询方法和集群数据库系统 |
US9235618B2 (en) * | 2013-04-06 | 2016-01-12 | Citrix Systems, Inc. | Systems and methods for caching of SQL responses using integrated caching |
JP6107429B2 (ja) * | 2013-05-30 | 2017-04-05 | 富士通株式会社 | データベースシステム、検索方法およびプログラム |
US9063710B2 (en) | 2013-06-21 | 2015-06-23 | Sap Se | Parallel programming of in memory database utilizing extensible skeletons |
US9720992B2 (en) * | 2013-11-22 | 2017-08-01 | Sap Se | DML replication with logical log shipping |
US10394818B2 (en) * | 2014-09-26 | 2019-08-27 | Oracle International Corporation | System and method for dynamic database split generation in a massively parallel or distributed database environment |
US10496642B2 (en) * | 2014-10-03 | 2019-12-03 | The Regents Of The University Of Michigan | Querying input data |
EP3076308B1 (en) * | 2015-03-31 | 2017-11-29 | Sap Se | Telecommunication method for handling a database query in a telecommunication system |
CN106326309B (zh) * | 2015-07-03 | 2020-02-21 | 阿里巴巴集团控股有限公司 | 一种数据查询方法和装置 |
US10642833B2 (en) * | 2015-08-11 | 2020-05-05 | Sybase, Inc. | Accelerating database queries using composite union enumeration |
US10678792B2 (en) * | 2015-10-23 | 2020-06-09 | Oracle International Corporation | Parallel execution of queries with a recursive clause |
CN107451154B (zh) * | 2016-05-31 | 2021-03-30 | 华为技术有限公司 | 一种数据表的处理方法、装置及系统 |
-
2017
- 2017-12-29 CN CN201711482536.1A patent/CN110019274B/zh active Active
-
2018
- 2018-12-25 WO PCT/CN2018/123437 patent/WO2019128978A1/zh unknown
- 2018-12-25 US US16/954,286 patent/US11789957B2/en active Active
- 2018-12-25 JP JP2020533622A patent/JP7440007B2/ja active Active
- 2018-12-25 EP EP18895044.8A patent/EP3734476A4/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101916280A (zh) * | 2010-08-17 | 2010-12-15 | 上海云数信息科技有限公司 | 并行计算系统及按查询内容进行负载均衡的方法 |
CN106339432A (zh) * | 2016-08-19 | 2017-01-18 | 上海巨数信息科技有限公司 | 一种按查询内容进行负载均衡的系统及其方法 |
CN106372177A (zh) * | 2016-08-30 | 2017-02-01 | 东华大学 | 支持混合数据类型的关联查询及模糊分组的查询扩展方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3734476A4 * |
Also Published As
Publication number | Publication date |
---|---|
US11789957B2 (en) | 2023-10-17 |
JP2021508867A (ja) | 2021-03-11 |
JP7440007B2 (ja) | 2024-02-28 |
EP3734476A1 (en) | 2020-11-04 |
EP3734476A4 (en) | 2021-09-15 |
US20210097075A1 (en) | 2021-04-01 |
CN110019274B (zh) | 2023-09-26 |
CN110019274A (zh) | 2019-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103078941B (zh) | 一种分布式计算系统的任务调度方法 | |
US9152669B2 (en) | System and method for distributed SQL join processing in shared-nothing relational database clusters using stationary tables | |
US9031925B2 (en) | Hadoop access via hadoop interface services based on function conversion | |
US8676951B2 (en) | Traffic reduction method for distributed key-value store | |
WO2019128978A1 (zh) | 一种数据库系统以及查询数据库的方法和装置 | |
EP3333726A1 (en) | Distributed database processing method and device | |
US9336270B2 (en) | Techniques for accessing a parallel database system via external programs using vertical and/or horizontal partitioning | |
US20210173714A1 (en) | High-throughput parallel data transmission | |
CN105824957A (zh) | 分布式内存列式数据库的查询引擎系统及查询方法 | |
JP2013186890A (ja) | データベースミドルウェアを用いたデータ管理システム及びその方法 | |
US20140229506A1 (en) | Data stream processing apparatus and method using query partitioning | |
JPWO2012121316A1 (ja) | 分散ストレージシステムおよび方法 | |
CN102779183B (zh) | 数据查询的方法、设备及系统 | |
US11947534B2 (en) | Connection pools for parallel processing applications accessing distributed databases | |
Mühlbauer et al. | Scyper: A hybrid oltp&olap distributed main memory database system for scalable real-time analytics | |
WO2023207082A1 (zh) | 负载均衡方法及装置和电子设备 | |
CN114218267A (zh) | 查询请求异步处理方法、装置、计算机设备、存储介质 | |
CN111400301B (zh) | 一种数据查询方法、装置及设备 | |
CN105930354B (zh) | 存储模型转换方法和装置 | |
WO2016092604A1 (ja) | データ処理システムおよびデータアクセス方法 | |
WO2018188607A1 (zh) | 流处理方法及装置 | |
CN111209305B (zh) | 查询数据的方法、数据节点、分布式数据库、计算设备 | |
CN112527872A (zh) | 数据查询方法及装置、存储介质及电子设备 | |
CN112541038A (zh) | 时序数据管理方法、系统、计算设备及存储介质 | |
KR101681651B1 (ko) | 데이터베이스 관리 시스템 및 방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18895044 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2020533622 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2018895044 Country of ref document: EP Effective date: 20200729 |