Method, apparatus, and computing device for accessing a database

By storing user data in different pages, the low performance and concurrency conflicts caused by single-table storage are resolved, enabling more efficient access to user data.

CN113535775BActive Publication Date: 2025-11-07HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010547335.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-04-17
Filing Date
2020-06-16
Publication Date
2025-11-07
Estimated Expiration
2040-06-16

AI Technical Summary

Technical Problem

In existing technologies, user data is stored centrally in a single table, resulting in low performance for accessing individual user data and page conflicts during concurrent operations, leading to severe performance degradation.

Method used

By physically isolating user data and storing data for different users on different pages, invalid data loading is reduced, and page conflicts are reduced during concurrent access.

Benefits of technology

It improves the data access performance for individual users and the performance of concurrent access, and reduces invalid data loading and page conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535775B_ABST
    Figure CN113535775B_ABST
Patent Text Reader

Abstract

The application provides a database access method and device. The method comprises the following steps: receiving user data of a first user; storing the user data of the first user into at least one first page, wherein the at least one first page does not store user data of other users except the first user. The technical scheme of the application can reduce invalid data loading and improve data access performance of a single user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and more particularly, to a method and apparatus for accessing a database and a computing device. BACKGROUND

[0002] A database is a "warehouse" for organizing, storing and managing data according to a data structure. It is a long-term storage, organized, shareable and uniformly managed collection of a large amount of data in a computer.

[0003] In related technologies, a large amount of user data is stored in a single table and scattered in different pages of the table. Since only a small amount of the same user data is contained in a single page, the database loads data in units of pages. On the one hand, when reading the data of a user, a large amount of invalid page data in the page needs to be loaded at the same time, resulting in low data access performance for a single user. On the other hand, when performing concurrent operations on multiple users, access conflicts of the same page may occur, which need to be solved by locking, resulting in performance loss. SUMMARY

[0004] The present application provides a method and apparatus for accessing a database and a computing device, which can reduce the loading of invalid data and improve the data access performance for a single user.

[0005] In a first aspect, a method for accessing a database is provided, comprising: receiving user data of a first user; and storing the user data of the first user to at least one first page, wherein the at least one first page does not store user data of other users except the first user.

[0006] In the above technical solution, by physically isolating the data of users, on the one hand, the loading of invalid data can be reduced and the data access performance for a single user can be improved; on the other hand, page conflicts during concurrent access of different users can be reduced and the performance of concurrent access can be improved.

[0007] In a possible implementation, the method further comprises: receiving user data of a second user; and storing the user data of the second user to at least one second page, wherein the at least one second page is different from the at least one first page.

[0008] In the above technical solution, for different user data, the data can be stored in different pages to physically isolate the data of users. In this way, when the user data of a user is needed, only the data in the page corresponding to the user needs to be loaded, and the data in the entire table does not need to be loaded, so that the loading of invalid data can be reduced and the data access performance for a single user can be improved.

[0009] In another possible implementation, the method comprises: allocating different pages for a plurality of users, the plurality of users comprising the first user and a second user.

[0010] In the above technical solution, different pages are allocated for a plurality of users. In this way, on the one hand, loading of invalid data can be reduced, and data access performance of a single user can be improved; on the other hand, page conflicts during concurrent access of different users can be reduced, and concurrent access performance can be improved.

[0011] In another possible implementation, the user data of the first user and the user data of the second user are from the same table in a same table space.

[0012] In another possible implementation, the user data of the first user and the user data of the second user are from different tables in a same table space.

[0013] In a second aspect, a method for accessing a database is provided, comprising: receiving a first query request, the first query request carrying an identification of a first user; reading first data from at least one first page bound to the first user according to the identification of the first user, the at least one first page not storing user data of users other than the first user; and feeding back the read first data, the read first data being a query result of the first query request.

[0014] In the above technical solution, in the process of obtaining user data, first data can be read from at least one first page bound to a first user according to an identification of the first user, and all data in a table can be avoided from being read, so that loading of invalid data can be reduced, and data access performance of a single user can be improved.

[0015] In a possible implementation, the method further comprises: receiving a second query request, the second query request carrying an identification of a second user; reading data from at least one second page bound to the second user according to the identification of the second user, the at least one second page being different from the at least one first page; and feeding back the read second data, the read second data being a query result of the second query request.

[0016] In the above technical solution, in the process of obtaining user data of different users, data can be read from pages bound to different users according to identifications of the different users. On the one hand, all data in a table can be avoided from being read, so that loading of invalid data can be reduced, and data access performance of a single user can be improved. On the other hand, page conflicts during concurrent access of different users can be reduced, and concurrent access performance can be improved.

[0017] In another possible implementation, the user data of the first user and the user data of the second user are from the same table in the same table space.

[0018] In another possible implementation, the user data of the first user and the user data of the second user are from different tables in the same table space.

[0019] The extension, limitation, explanation, description and effect of the related content in the first aspect also apply to the same content in the second aspect.

[0020] In a third aspect, an apparatus for accessing a database is provided, comprising: a receiving module, a storage module,

[0021] The receiving module is configured to receive user data of a first user.

[0022] The storage module is configured to store the user data of the first user to at least one first page, and the at least one first page does not store user data of other users except the first user.

[0023] In a possible implementation, the receiving module is further configured to receive user data of a second user, and the storage module is further configured to store the user data of the second user to at least one second page, and the at least one second page is different from the at least one first page.

[0024] In another possible implementation, the apparatus further comprises an allocation module configured to allocate different pages to a plurality of users, and the plurality of users comprises the first user and the second user.

[0025] In another possible implementation, the user data of the first user and the user data of the second user are from the same table in the same table space.

[0026] In another possible implementation, the user data of the first user and the user data of the second user are from different tables in the same table space.

[0027] The extension, limitation, explanation, description and effect of the related content in the first aspect also apply to the same content in the third aspect.

[0028] The extension, limitation, explanation, description and effect of the related content in the first aspect also apply to the same content in the third aspect.

[0029] In a fourth aspect, an apparatus for accessing a database is provided, comprising: a receiving module, a reading module and a feedback module, the receiving module is configured to receive a first query request, and the first query request carries an identifier of a first user.

[0030] The reading module is configured to read first data from at least one first page bound to the first user according to the identity of the first user, the at least one first page not storing user data of users other than the first user;

[0031] The feedback module is configured to feed back the read first data, the read first data being a query result of the first query request.

[0032] In a possible implementation, the receiving module is further configured to receive a second query request, the second query request carrying an identity of a second user; the reading module is further configured to read data from at least one second page bound to the second user according to the identity of the second user, the at least one second page being different from the at least one first page; and the feedback module is further configured to feed back the read second data, the read second data being a query result of the second query request.

[0033] In another possible implementation, the user data of the first user and the user data of the second user are from the same table in a same table space.

[0034] In another possible implementation, the user data of the first user and the user data of the second user are from different tables in a same table space.

[0035] The expansions, limitations, explanations, descriptions and effects of the related contents in the above second aspect also apply to the same contents in the fourth aspect.

[0036] The expansions, limitations, explanations, descriptions and effects of the related contents in the above first aspect also apply to the same contents in the fourth aspect.

[0037] In a fifth aspect, a computing device is provided, comprising a processor and a memory, the processor running instructions in the memory, so that the computing device performs the method steps performed in the above first aspect or any possible implementation of the first aspect.

[0038] In a sixth aspect, a computing device is provided, comprising a processor and a memory, the processor running instructions in the memory, so that the computing device performs the method steps performed in the above second aspect or any possible implementation of the second aspect.

[0039] In a seventh aspect, a computing device is provided, comprising a processor and a memory; the processor running instructions in the memory, so that the computing device deploys the device for accessing the database in the above third aspect or any possible implementation of the third aspect.

[0040] In an eighth aspect, a computing device is provided, comprising a processor and a memory; the processor executes instructions in the memory, so that the computing device deploys the apparatus for accessing a database as described in the fourth aspect above or any possible implementation of the fourth aspect.

[0041] In a ninth aspect, a computer-readable storage medium is provided, comprising instructions; the instructions are used to implement the method steps performed in the first aspect or any possible implementation of the first aspect.

[0042] In a tenth aspect, a computer-readable storage medium is provided, comprising instructions; the instructions are used to implement the method steps performed in the second aspect or any possible implementation of the second aspect.

[0043] In an eleventh aspect, a computer-readable storage medium is provided, comprising instructions; the instructions are used to implement the apparatus for accessing a database as described in the third aspect above or any possible implementation of the third aspect.

[0044] In a twelfth aspect, a computer-readable storage medium is provided, comprising instructions; the instructions are used to implement the apparatus for accessing a database as described in the fourth aspect above or any possible implementation of the fourth aspect.

[0045] Optionally, as an implementation, the storage medium can be a non-volatile storage medium.

[0046] In a thirteenth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method for accessing a database in the first aspect above or any possible implementation of the first aspect.

[0047] Optionally, as an implementation, the chip comprises a processor and a data interface, the processor reads instructions stored on a memory through the data interface, and executes the method for accessing a database in the first aspect above or any possible implementation of the first aspect.

[0048] Optionally, as an implementation, the chip can further comprise a memory, the memory stores instructions, and the processor is configured to execute the instructions stored on the memory, and when the instructions are executed, the processor is configured to execute the method for accessing a database in the first aspect above or any possible implementation of the first aspect.

[0049] In a fourteenth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method for accessing a database in the second aspect above or any possible implementation of the second aspect.

[0050] Optionally, as an implementation form, the chip comprises a processor and a data interface, the processor reads instructions stored in a memory through the data interface, and implements the method for accessing the database in the second aspect and any implementation form of the second aspect.

[0051] Optionally, as an implementation form, the chip further comprises a memory, the memory stores instructions, and the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to implement the method for accessing the database in the second aspect and any implementation form of the second aspect.

[0052] In a fifteenth aspect, a chip is provided, which acquires instructions and executes the instructions to implement the apparatus for accessing the database in the third aspect or any possible implementation form of the third aspect.

[0053] Optionally, as an implementation form, the chip comprises a processor and a data interface, the processor reads instructions stored in a memory through the data interface, and implements the apparatus for accessing the database in the third aspect or any possible implementation form of the third aspect.

[0054] Optionally, as an implementation form, the chip further comprises a memory, the memory stores instructions, and the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to implement the apparatus for accessing the database in the third aspect or any possible implementation form of the third aspect.

[0055] In a sixteenth aspect, a chip is provided, which acquires instructions and executes the instructions to implement the apparatus for accessing the database in the fourth aspect or any possible implementation form of the fourth aspect.

[0056] Optionally, as an implementation form, the chip comprises a processor and a data interface, the processor reads instructions stored in a memory through the data interface, and implements the apparatus for accessing the database in the fourth aspect or any possible implementation form of the fourth aspect.

[0057] Optionally, as an implementation form, the chip further comprises a memory, the memory stores instructions, and the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to implement the apparatus for accessing the database in the fourth aspect or any possible implementation form of the fourth aspect. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 is a schematic architecture diagram of a computing device 100 provided by an embodiment of the present application.

[0059] Figure 2is a schematic flow chart of a method for accessing a database provided by an embodiment of the present application.

[0060] Figure 3 is a schematic flow chart of another method for accessing a database provided by an embodiment of the present application.

[0061] Figure 4 A correspondence between a business user and an aggregated object is shown.

[0062] Figure 5 A division schematic diagram of an aggregated object table is shown.

[0063] Figure 6 is a schematic flow chart of another method for accessing a database provided by an embodiment of the present application.

[0064] Figure 7 is a schematic block diagram of an apparatus 700 for accessing a database provided by an embodiment of the present application.

[0065] Figure 8 is a schematic block diagram of another apparatus 800 for accessing a database provided by an embodiment of the present application. DETAILED DESCRIPTION

[0066] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0067] It should be understood that in the embodiments of the present application, "first", "second", "third", "fourth", etc. are only used to refer to different objects and do not mean other limitations on the referred objects.

[0068] Since the embodiments of the present application involve a large number of professional terms, in order to facilitate understanding, the related terms and concepts that may be involved in the embodiments of the present application will be introduced first.

[0069] 1. Database (DB)

[0070] A database is a "warehouse" that organizes, stores and manages data according to data structures. It is a long-term storage in a computer, an organized, shareable and unified management of a large amount of data, which can be regarded as an electronic file cabinet - a place to store electronic files. Users can add, query, update, delete and other operations on the data in the file.

[0071] 2. Relational database

[0072] A relational database refers to a database that uses a relational model to organize data. The relational model is a traditional standard for data storage, and various entities in the real world and various connections between the entities are represented by the relational model. The relational model can be simply understood as a two-dimensional table model, and a relational database is composed of two-dimensional tables and the relationships between the tables.

[0073] Users can retrieve data in the database through queries, and a query is an execution code for limiting certain areas in the database. Structured Query Language (SQL) is a data query language based on a relational database, and this language can perform retrieval and operation on data in the relational database.

[0074] A relational database can be divided into row storage and column storage according to the storage organization mode of data. Among them, row storage can organize data according to records, and all field values of the records are stored together, while column storage organizes data according to fields, and the same field values in different records are stored together. In order to facilitate user understanding, the rows and columns of the relational database are referred to as tables, and a group of tables constitutes a database.

[0075] The logical storage structure of a relational database can include: a table space, a segment, an extent, and a page. The following will describe these structures in detail.

[0076] Table space, in a relational database, all data is logically stored in a space, which can be referred to as a table space. A table space can include at least one table, and each table can be composed of multiple segments.

[0077] Segment, composed of multiple extents. Segments in a database can be, for example: data segments, index segments, Undo segments, etc. The first page of the segment can be referred to as the entry of the table.

[0078] Extent, the smallest unit of disk allocation, is a plurality of pages that are physically continuous.

[0079] Page, the smallest data organization and management unit in a database, is a disk storage space unit of a data file, and is also the smallest unit of input / output (I / O) of a database. In some embodiments, the page can also be referred to as a block.

[0080] 3、Online transaction processing (OLTP)

[0081] OLTP, also known as transaction processing, refers to the use of computer networks to connect business processing computer devices or networks distributed in different geographical locations with business management center networks, and to process general real-time job data through information systems, computer networks and databases in an online transaction manner. OLTP is usually used for automated data processing work, such as order input, financial services and other repetitive daily transaction activities.

[0082] In the OLTP business system, there is a typical scenario: the organization and access of data have obvious business user attributes, the magnitude of users is large and the data volume of a single user is small. At the same time, the real-time and concurrency of data access for different users are high. The following lists two possible business scenarios.

[0083] Bank real-time risk control business. The number of bank credit card users is large, but the personal risk control information of each user is relatively small. For example, personal information, overdue records, etc. When a large number of credit card users make card consumption, the system needs to query the personal risk control information of each user in real time and perform risk assessment.

[0084] E-commerce shopping cart business. A large e-commerce website can have millions or even billions of users, but the shopping cart data of a single user is small. The system usually also sets an upper limit to its support capacity, and at the same time, the system needs to meet the real-time modification and query of the shopping cart by users during the shopping peak period.

[0085] For ease of description, the above business scenario in which the magnitude of users is large and the data volume of a single user is small can be referred to as a target business scenario.

[0086] 4、User private data

[0087] Refers to data in the business system with clear user attributes. For example, user data can be personal information, overdue records, etc.

[0088] 5、Aggregated object table

[0089] The table with business user attributes in the database is designated as an aggregated object table. For example, the aggregated object table can be a personal information table, an overdue record table, etc.

[0090] The data in the aggregated object table in the database has business user attributes. That is, the data in the aggregated object table can be user private data.

[0091] 6、User

[0092] A user can be an account using a database. In one possible implementation, it can include a business user and a database user used by a business system.

[0093] The database user used by the business system and the business user can be in a one-to-many relationship. As an example, the database user used by the business system is a certain bank, and each business user can be a credit card issuing user of each bank. As another example, the database user used by the business system is a certain large e-commerce, and each business user can be a shopping cart of each user.

[0094] In a related technical solution, a standard relational database is used to store and access data. In this technical solution, a large amount of user data is stored in a single table and scattered in different pages of the table. Since only a small amount of data of the same user is contained in a single page, the database loads data in pages. In the above target business scenario, on the one hand, when reading data of a certain user, a large amount of invalid page data in the page needs to be loaded at the same time, resulting in low data access performance of a single user; on the other hand, when multiple users perform concurrent operations, access conflicts of the same page may occur, which need to be solved by locking, causing performance loss.

[0095] Therefore, the present application provides a method for accessing a database, which can effectively reduce the loading of invalid data, improve the data access performance of a single user, and effectively reduce the page conflicts of concurrent access of different users, and improve the performance of concurrent access.

[0096] The method for accessing a database provided by the embodiments of the present application can be applied to a computing device, which can also be referred to as a computing system, including a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a processing unit, a memory, and a memory control unit, and the functions and structures of the hardware are described in detail later. The operating system is any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer includes application programs such as a browser, an address book, a word processing software, and an instant messaging software. Optionally, the computing system is a handheld device such as a smartphone or a terminal device such as a personal computer, and the present application is not particularly limited as long as it can use the method provided by the embodiments of the present application. The execution subject of the method for accessing a database provided by the embodiments of the present application can be a computing system, or a functional module in the computing system that can call and execute a program.

[0097] The following will be described in detail Figure 1 A computing device provided by the embodiments of the present application is described in detail.

[0098] Figure 1 is a schematic diagram of an architecture of a computing device 100. The computing device 200 can be a server or a computer or other computing-capable device. Figure 1 The computing device 100 shown includes at least one processor 110 and memory 120.

[0099] The processor 110 executes instructions in the memory 120, so that the computing device 100 implements the method for accessing a database provided by the present application, for example, implements the steps performed by the device for accessing a database. Alternatively, the processor 110 executes instructions in the memory 120, so that the computing device 100 implements the device for accessing a database provided by the present application, for example, implements each functional module included in the device for accessing a database.

[0100] Optionally, the computing device 100 further includes a system bus, wherein the processor 110 and the memory 120 are respectively connected with the system bus. The processor 110 can access the memory 120 through the system bus, for example, the processor 110 can read and write data in the memory 120 or execute code in the memory 120 through the system bus. The system bus is a peripheral component interconnect express (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus is divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 1 In the figure, only one thick line is used to represent the system bus, but it does not mean that there is only one bus or only one type of bus.

[0101] In one possible implementation, the function of the processor 110 is mainly to interpret the instructions (or code) of the computer program and process the data in the computer software. The instructions of the computer program and the data in the computer software can be saved in the memory 120 or the cache 116.

[0102] Optionally, the processor 110 is a chip that has a processing capability of signals. By way of example, and not limitation, the processor 110 is a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. Among them, the general purpose processor is a microprocessor and the like. For example, the processor 110 is a central processing unit (CPU).

[0103] Optionally, each processor 110 includes at least one processing unit 112 and a memory control unit 114.

[0104] Optionally, the processing unit 112 is also called core or kernel, which is the most important component of the processor. The processing unit 112 is manufactured by single crystal silicon with certain production process, and all the calculations, command receiving, command storage and data processing of the processor are executed by the core. The processing units respectively independently run program instructions, and use the parallel computing capability to speed up the program running. Various processing units have fixed logic structures, for example, the processing unit includes logic units such as level one cache, level two cache, execution unit, instruction level unit and bus interface.

[0105] In one implementation, the memory control unit 114 is configured to control data interaction between the memory 120 and the processing unit 112. Specifically, the memory control unit 114 receives a memory access request from the processing unit 112, and controls access to the memory based on the memory access request. By way of example, and not limitation, the memory control unit is a memory management unit (MMU) or the like.

[0106] In one implementation, each memory control unit 114 addresses the memory 120 through a system bus. An arbiter (not shown in the figure) is configured in the system bus, which is responsible for processing and coordinating the competitive access of multiple processing units 112.

[0107] In one implementation, the processing unit 112 and the memory control unit 114 are communicatively connected through the internal connection line of the chip, such as the address line, so as to realize the communication between the processing unit 112 and the memory control unit 114.

[0108] Optionally, each processor 110 also includes a cache 116, which is a buffer for data exchange (referred to as cache). When the processing unit 112 wants to read data, it first looks for the required data in the cache, and if found, directly executes, and if not found, finds it from the memory. Since the running speed of the cache is much faster than that of the memory, the role of the cache is to help the processing unit 112 run faster.

[0109] The memory 120 can provide a running space for a process in the computing device 100, for example, the computer program (specifically, the code of the program) for generating the process is stored in the memory 120. After the computer program is run by the processor to generate the process, the processor allocates a corresponding storage space for the process in the memory 120. Further, the above-mentioned storage space further includes a text segment, an initialization data segment, a bit initialization data segment, a stack segment, a heap segment, and the like. The memory 120 stores the data generated during the running of the process in the above-mentioned storage space of the process, for example, intermediate data, or process data, and the like.

[0110] Optionally, the memory is also referred to as the internal memory, which is used to temporarily store the operation data in the processor 110, and exchange data with the external storage such as the hard disk. As long as the computer is running, the processor 110 will call the data required for operation to the memory for operation, and after the operation is completed, the processing unit 112 will transmit the result.

[0111] By way of example and not limitation, memory 120 is volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory is read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory is random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM). It should be noted that the memory 120 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0112] The structure of the computing device 100 listed above is merely illustrative and is not limited thereto. The computing device 100 includes various hardware components in existing computing systems. For example, the computing device 100 also includes other storage devices besides memory 120, such as disk storage. Those skilled in the art should understand that the computing device 100 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that the aforementioned computing device 100 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the aforementioned computing device 100 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 1 All the devices shown.

[0113] The following is combined with Figure 2 This application provides a detailed description of the method for accessing a database provided in its embodiments. This method can be... Figure 1 The computing device 100 shown executes the method for accessing a database provided in this application, for example, the steps performed by the means of accessing a database.

[0114] Figure 2 is a schematic flow chart of a method for accessing a database according to an embodiment of the present application. As shown in the figure, the method can include steps 210-220, which are described in detail as follows. Figure 2

[0115] Step 210: receiving user data of a first user.

[0116] Step 220: storing the user data of the first user to at least one first page, wherein the at least one first page does not store user data of other users than the first user.

[0117] The at least one first page can be a segment in the database, which is not limited in the present application. The at least one first page does not store user data of other users than the first user, that is, the at least one first page is only used to store user data of the first user.

[0118] As an example, the first user can be the business user described above, or can also be the database user described above.

[0119] Optionally, user data of a second user can also be received, and the user data of the second user is stored to at least one second page. The at least one second page is different from the at least one first page.

[0120] The correspondence between the first user and the at least one first page, and the correspondence between the second user and the at least one second page, can be assigned in advance before storing the user data, or can be established after storing the user data. The two possible implementation manners are described in detail as follows.

[0121] In one possible implementation manner, different pages can be assigned to multiple users (including the first user and the second user) in advance before receiving the user data, and the correspondence between the multiple users and the different pages corresponding thereto is established. For example, at least one first page is assigned to the first user in advance, and the correspondence between the first user and the at least one first page is established. For another example, at least one second page can also be assigned to the second user in advance, and the correspondence between the second user and the at least one second page is established.

[0122] ​In another possible implementation, the user data can also be stored in a blank page in the database after being received, and a corresponding relationship between the blank page and the user can be established. For example, after receiving the first user data, the first user data is stored in a blank first page in the database, and a corresponding relationship between the first user and the first page is established. For another example, after receiving the second user data, the second user data is stored in a blank second page in the database, and a corresponding relationship between the second user and the second page is established.

[0123] In the technical solution, the data of the users is physically isolated, which can reduce the loading of invalid data, improve the data access performance of a single user, reduce the page conflict in concurrent access of different users, and improve the performance of concurrent access.

[0124] The user data of the first user and the user data of the second user can be from the same table in the same table space, or from different tables in the same table space, which is not limited in the present application.

[0125] Optionally, the at least one first page corresponding to the first user can be determined according to a mapping relationship, and the mapping relationship is a corresponding relationship between the first user and the at least one first page. Specifically, as an example, the address information of a first page corresponding to the first user can be determined according to the mapping relationship, and the entry address of the at least one first page can be determined according to the address information of the first page, so that the at least one first page corresponding to the first user can be determined according to the entry address of the at least one first page. The address information of the first page is used to indicate the address of the first page in the physical storage space, and the entry address of the at least one first page is stored in the first page.

[0126] Optionally, the first query request carrying the identifier of the first user can also be received, the first data can be read from the at least one first page bound by the first user according to the identifier of the first user, and the read first data can be fed back. The at least one first page does not store the user data of other users except the first user, and the read first data is the query result of the first query request.

[0127] In a possible implementation, the first data can be fed back to the client sending the query request. The specific feedback form can be various, for example, the first data can be fed back in the form of a table. For another example, the first data can also be fed back in the form of an email.

[0128] Optionally, a second query request may also be received, carrying the identifier of a second user. Data is read from at least one second page bound to the second user based on the second user's identifier, and the read second data is returned. Here, the at least one second page is different from the at least one first page, and the read second data is the query result of the second query request.

[0129] The following is combined with Figure 3 The text provides specific examples to describe a particular implementation of data storage in a database. It should be understood that... Figure 3 The examples are merely to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of the application to... Figure 3 The specific numerical values ​​or specific scenarios will be considered. Those skilled in the art will obviously be able to make various equivalent modifications or changes based on the examples given, and such modifications and changes also fall within the scope of the embodiments of this application.

[0130] Figure 3 This is a schematic flowchart illustrating another method for accessing a database provided in an embodiment of this application. This method can be... Figure 1 The computing device 100 shown executes the method for accessing a database provided in this application, for example, the steps performed by the means of accessing a database.

[0131] like Figure 3 As shown, the method may include steps 310-330, which will be described in detail below.

[0132] Step 310: Specify the aggregate object table.

[0133] To define the private data of business users managed by the aggregation object, you can specify a table in the database that has business user attributes as the aggregation object table. Examples include a personal information table and an overdue record table.

[0134] When a table is designated as an aggregation object table, it indicates that the table's data has business user attributes. Different business users possess private data belonging to this table, and storage access to this table's data must be done through its associated aggregation object. For other tables in the business system that do not have business user attributes, such as public product information tables, they are still created using the existing table creation method and do not need to specify aggregation object attributes. These types of tables are shared by all aggregation objects.

[0135] As an example, the data definition language (DDL) for creating tables can be extended. Specifically, the extended DDL statement is: `create_table_clause[polymer]`, which indicates that the table is specified as an aggregate object table when it is created.

[0136] Step 320: dividing the aggregation object table into multiple regions, each region being used to store data of different business users.

[0137] In order to realize the physical isolation of data of different business users in a single aggregation object table, the single aggregation object table can be divided into multiple regions. Each business user can correspond to a region in the aggregation object table, and each business user can perform data access or storage on the region corresponding to the business user in the single aggregation object table when accessing or storing the single aggregation object table.

[0138] The region corresponding to each business user is referred to as an aggregation object.

[0139] As an example, Figure 4 The correspondence between the business user and the aggregation object is shown. Referring to Figure 4 An aggregation object can be associated with a business user in a business scenario, for example, a certain credit card user, a certain e-commerce website registered user, etc. The business user private data is organized and stored in granularity of aggregation objects, and the data under each aggregation object is physically isolated. The access operation of a certain aggregation object in the database only involves the private data of the business user associated with it.

[0140] Specifically, the region of the aggregation object table divided for each business user can be a segment in the aggregation object table, or can also be one or more pages in the aggregation object table, which is not limited in the present application.

[0141] Next, taking the creation of the personal asset table asset_t as an example. Referring to Figure 5 Three associated aggregation objects are created for the three business users under the database user db_user, and the business table asset_t is specified as an aggregation object table when it is created. The database can divide or create a segment for each business user associated aggregation object in the asset_t table, for example, the aggregation object usr1-poly corresponds to segment1, the aggregation object usr2-poly corresponds to segment2, and the aggregation object usr3-poly corresponds to segment3 in the asset_t table. All pages in the segment are used to store asset_t table data of the corresponding aggregation object.

[0142] As Figure 5As shown, the aggregation object usr1-poly can access or store data in segment 1 of the personal asset table asset_t when accessing or storing the personal asset table asset_t, and all pages in the segment 1 are used to store data of the aggregation object usr1-poly in the asset_t table. Similarly, the aggregation object usr2-poly can access or store data in segment 2 of the personal asset table asset_t when accessing or storing the personal asset table asset_t, and all pages in the segment 2 are used to store data of the aggregation object usr2-poly in the asset_t table. The aggregation object usr3-poly can access or store data in segment 3 of the personal asset table asset_t when accessing or storing the personal asset table asset_t, and all pages in the segment 3 are used to store data of the aggregation object usr3-poly in the asset_t table.

[0143] It can be seen that, due to the isolation and centralized storage of table data according to aggregation objects, the number of pages to be loaded can be effectively reduced when data of an aggregation object on a table is accessed. Taking access to the personal asset table asset_t as an example, it is assumed that a business user has 50 records in the asset_t table. If a traditional technical solution is used, due to different insertion times of the records, the records may be dispersed in 50 different pages in an extreme case, and 50 pages of data need to be loaded if all the records are traversed. However, according to the technical solution provided in the embodiments of the present application, the 50 records can be stored in one page, and only one page of data needs to be loaded to complete the traversal.

[0144] Optionally, the mode of the aggregation object table can also be defined, for example, a dedicated mode and a shared mode. As an example, "create_table_clause[polymer shared]" indicates that the created and specified mode of the aggregation object table is a shared mode, and "create_table_clause[polymer dedicated]" indicates that the created and specified mode of the aggregation object table is a dedicated mode.

[0145] In the shared mode, the aggregation object table shares the storage in the aggregation object table with other shared mode aggregation object tables under the aggregation object. That is, on a page in the aggregation object table, data of multiple shared mode aggregation object tables can be stored. In the dedicated mode, the aggregation object table does not share the storage in the aggregation object table with other aggregation object tables under the aggregation object. That is, on a page in the aggregation object table, data of only one aggregation object table is stored, and data of multiple dedicated mode aggregation object tables is not stored.

[0146] Optionally, in some embodiments, in order to distinguish the data of different tables on the same page, for the shared mode aggregation object table, a hidden column can be automatically added to the table when the table is created, and the column is used to store the object ID of the table. When the table is operated, the object ID of the table can be used to filter, so that the data of different business users on the same page of the table is obtained.

[0147] Optionally, in some embodiments, for the dedicated mode aggregation object table occupying at least one page, if the data of the business users on the table is generally small in an extreme case, the page space can be wasted. The table can be set to the shared mode, and the data of multiple tables shares the page storage, so that the waste of space can be effectively reduced.

[0148] Optionally, in some embodiments, the index of the aggregation object table can also be maintained. Specifically, for the dedicated mode aggregation object table, a local index is created based on the index defined on the table for each aggregation object, and the index entry is stored on the entry page of the segment. For the shared mode aggregation object table, the index is not supported. The number of records of the table is small, and the storage is shared on the same page, and the cost of the full table scan is usually smaller.

[0149] Step 330: record the correspondence between each business user and the aggregation object.

[0150] The region information of each aggregation object in the aggregation object table can be stored on the object detail information page. The region information can be, for example, the entry address of the region in the aggregation object table. As an example, the region information can be the asset_t table segmentEntry information, where the region of each aggregation object in the asset_t table is a segment.

[0151] The business system needs to maintain the mapping relationship between the business user, the associated aggregation object and the area information in the aggregation object table corresponding. For example, the mapping rule of the specified user name and the aggregation object name, the record of the user name and the aggregation object name mapping relationship, and the query interface are provided.

[0152] As an example, a possible system table of aggregation object basic information is shown below.

[0153] Table 1: Aggregation object basic information system table

[0154] ID Name Entry 0 Usr1-poly 1:20 1 Usr2-poly 1:21 2 usr3-poly 1:22

[0155] The basic information in the above system table can include but is not limited to: the ID of the aggregation object, the name of the aggregation object, and the entry of the aggregation object. The entry of the aggregation object records the page address where the object detailed information is stored. The page where the object detailed information is stored can save the area information of each aggregation object in the aggregation object table. For details, please refer to the description in the above, which will not be repeated here.

[0156] Optionally, the corresponding DDL statement can also be provided, so that the database user used by the business system can create and delete the associated database aggregation object of multiple business users. The specific is as follows.

[0157] create polymer[user_name.]polymer_name

[0158] drop polymer[user_name.]polymer_name

[0159] Among them, "create polymer" means to create an aggregation object; "drop polymer" means to delete an aggregation object; "user_name" means the name of the business user; "polymer_name" means the name of the created or deleted aggregation object.

[0160] In the above technical solution, by physically isolating the data of the business user, on the one hand, the loading of invalid data can be effectively reduced, and the data access performance of a single business user can be improved; on the other hand, the page conflict when different business users access concurrently can be effectively reduced, and the performance of concurrent access can be improved. Moreover, the performance of the frequently used database migration in the mass user scenario can also be effectively improved.

[0161] The following describes a specific implementation of the method for querying user data in the database in combination with a specific example in the Figure 6 It should be understood that,Figure 6 The examples are only used to help the skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to Figure 6 specific values or specific scenarios. Those skilled in the art can obviously make various equivalent modifications or changes according to the examples given, and such modifications and changes also fall within the scope of the embodiments of the present application.

[0162] Figure 6 is a schematic flow chart of another method for accessing a database provided by the embodiments of the present application. The method can be executed by the computing device 100 shown in Figure 1 to implement the method for accessing a database provided by the present application, for example, to implement the steps executed by the device for accessing a database.

[0163] As shown in Figure 6 , the method can include steps 610-660, which are described in detail below.

[0164] Step 610: The client of the business system logs in the database.

[0165] The client of the business system can obtain a database connection through database user login and successful authentication.

[0166] The client of the business system can also be a database user used by the business system.

[0167] Step 620: The database user used by the business system determines the aggregate object name associated with the business user to be operated in the database.

[0168] The database user used by the business system can obtain the aggregate object name associated with the business user to be operated in the database according to the mapping relationship between the business user and the aggregate object.

[0169] As an example, the database user used by the business system can call a structured query statement (SQL) interface provided by the database to set the aggregate object context, set the aggregate object context to be operated on the connection, and subsequent data operations on the connection will be performed on the aggregate object.

[0170] Specifically, the SQL for setting the aggregate object context is as follows:

[0171] attach polymer[user_name.]polymer_name;

[0172] Step 630: Determine whether the table to be accessed is an aggregate object table.

[0173] The database user used by the business system needs to determine whether the table is an aggregation object table when needing to access table data.

[0174] The database user used by the business system can determine whether the table is an aggregation object table according to the table information.

[0175] If it is an aggregation object table, step 640 can be executed; if it is not an aggregation object table, step 660 can be executed.

[0176] Step 640: Determine whether there is a valid aggregation object context on the current connection.

[0177] If there is a valid aggregation object context on the current connection, step 650 can be executed; if there is no valid aggregation object context on the current connection, an error can be returned.

[0178] Step 650: According to the information in the aggregation object context, find the page information of the table.

[0179] As an example, the page address where the corresponding aggregation object detailed information is stored can be found according to the information in the aggregation object context, and the Segment Entry page of the table can be found in the page address. Specifically, the page address where the corresponding aggregation object detailed information is stored can be found based on a corresponding relationship similar to Table 1 above, and the Segment Entry page of the table can be found in the page address.

[0180] Optionally, in some embodiments, if the execution plan involves index access, the related index information is found on the Segment Entry page to obtain the index Entry page.

[0181] Step 660: After obtaining the Entry page of the table and the index, the data in the table is accessed.

[0182] When other business user data needs to be operated, steps 620-660 can be repeated.

[0183] Optionally, in some embodiments, when the business user operation needs to be ended, the SQL interface of the aggregation object context is set back. As an example, the SQL interface of the aggregation object context can be set back through the SQL statement "detach polymer" provided by the database.

[0184] The method for accessing the database in the embodiments of the present application is described in detail above. Figure 1 to Figure 6 , the device embodiments of the present application will be described in detail below. Figure 7 and Figure 8 , the device embodiments of the present application will be described in detail below.

[0185] Figure 7is a schematic block diagram of an apparatus 700 for accessing a database provided by an embodiment of the present application.

[0186] The apparatus 700 for accessing a database can perform the steps of the method shown in the above embodiment, and thus the details are not repeated here. The apparatus 700 for accessing a database comprises a receiving module 710, a storage module 720, Figure 2 to Figure 3 The receiving module 710 is configured to receive user data of a first user.

[0187] The storage module 720 is configured to store the user data of the first user to at least one first page, wherein the at least one first page does not store user data of users other than the first user.

[0188] Optionally, the receiving module 710 is further configured to receive user data of a second user; and the storage module 720 is further configured to store the user data of the second user to at least one second page, wherein the at least one second page is different from the at least one first page.

[0189] Optionally, the apparatus 700 for accessing a database further comprises an assigning module 730, configured to assign different pages to a plurality of users, wherein the plurality of users comprises the first user and the second user.

[0190] Optionally, the user data of the first user and the user data of the second user are from the same table of a same table space.

[0191] Optionally, the user data of the first user and the user data of the second user are from different tables of a same table space.

[0192] The apparatus 700 for accessing a database provided herein can be embodied in the form of functional modules. The term "module" herein can be implemented by software and / or hardware, and is not limited in this regard.

[0193] For example, the "module" can be a software program, hardware circuit or a combination of both, which implements the above functions. The hardware circuit can include an application specific integrated circuit (ASIC), an electronic circuit, a processor (for example, a shared processor, a dedicated processor or a group processor) and a memory for executing one or more software or firmware programs, a combination logic circuit and / or other suitable components that support the described functions.

[0194]

[0195] is a schematic block diagram of another apparatus 800 for accessing a database provided by an embodiment of the present application. Figure 8

[0196] ​The apparatus 800 for accessing a database can perform Figure 8 The apparatus for accessing a database performs each step in the method shown, and to avoid repetition, the details are not described here. The apparatus 800 for accessing a database includes a receiving module 810, a reading module 820, a feedback module 830,

[0197] The receiving module 810 is configured to receive a first query request, the first query request carrying an identity of a first user.

[0198] The reading module 820 is configured to read first data from at least one first page bound to the first user according to the identity of the first user, the at least one first page not storing user data of other users except the first user.

[0199] The feedback module 830 is configured to feed back the read first data, the read first data being a query result of the first query request.

[0200] Optionally, the receiving module 810 is further configured to receive a second query request, the second query request carrying an identity of a second user; the reading module 820 is further configured to read data from at least one second page bound to the second user according to the identity of the second user, the at least one second page being different from the at least one first page; and the feedback module 830 is further configured to feed back the read second data, the read second data being a query result of the second query request.

[0201] Optionally, the user data of the first user and the user data of the second user are from the same table in the same table space.

[0202] Optionally, the user data of the first user and the user data of the second user are from different tables in the same table space.

[0203] The apparatus 800 for accessing a database here can be embodied in the form of functional modules. The term "module" here can be implemented by software and / or hardware, and no specific limitation is made to this.

[0204] For example, the "module" can be a software program, a hardware circuit, or a combination of both, which implements the above functions. The hardware circuit can include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combination logic circuit, and / or other suitable components supporting the described functions.

[0205] The modules of the above-described examples can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0206] The embodiments of the present application further provide a chip, which acquires instructions and executes the instructions to implement the method for accessing the database or the instructions are used to implement the apparatus for accessing the database.

[0207] Optionally, as an implementation manner, the chip comprises a processor and a data interface, the processor reads the instructions stored on the memory through the data interface, and executes the method for accessing the database.

[0208] Optionally, as an implementation manner, the chip further comprises a memory, the memory stores the instructions, and the processor is used to execute the instructions stored on the memory, when the instructions are executed, the processor is used to execute the method for accessing the database.

[0209] The embodiments of the present application further provide a computer readable storage medium, which stores instructions, the instructions are used to implement the method for accessing the database in the method embodiments or the instructions are used to implement the apparatus for accessing the database.

[0210] The embodiments of the present application further provide a computer program product comprising instructions, the instructions are used to implement the method for accessing the database in the method embodiments or the instructions are used to implement the apparatus for accessing the database.

[0211] In an implementation example, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0212] In one implementation example, the memory can be volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. Where nonvolatile memory is utilized, this can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically EPROM (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which acts as the external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0213] The term "and / or", merely describes association relationship of associated objects, indicates that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, B exists alone, and A and B can be singular or plural. In addition, the character " / " in this paper generally represents that the front and rear associated objects are "or" relationship, but also can represent "and / or" relationship, which can be understood according to the context.

[0214] In this application, "multiple" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0215] The sequence of the above processes does not mean the execution order in various embodiments of the present application. The execution order of the processes should be determined according to the functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0216] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be described here.

[0217] The functions, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the technical solutions that essentially contribute to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computing device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0218] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of accessing a database, characterized by, The method comprises: receiving private user data of a first user, the private user data of the first user being from different tables of a same table space; storing the private user data of the first user into a first aggregation object of an aggregation object table, the first aggregation object comprising at least one first page, the at least one first page not storing user data of users other than the first user.

2. The method of claim 1, wherein, The method further comprises: receiving user data of a second user; storing the user data of the second user into at least one second page, the at least one second page being different from the at least one first page.

3. The method according to claim 1 or 2, characterized in that, The method comprises: allocating different pages to a plurality of users, the plurality of users comprising the first user and the second user.

4. The method of claim 2, wherein, The user data of the first user and the user data of the second user are from the same tables of a same table space.

5. The method of claim 2, wherein, The user data of the second user is from different tables of a same table space.

6. The method of claim 1 or 2, wherein, The method further comprises: receiving shared data of a plurality of users, the plurality of users comprising the first user; storing the shared data of the plurality of users into a second aggregation object of the aggregation object table, the second aggregation object comprising at least one third page.

7. A method of accessing a database, characterized by, Comprise: receiving a first query request, the first query request carrying an identification of a first user; determining, according to the identification of the first user, a first aggregation object in an aggregation object table corresponding to the identification of the first user, wherein the first aggregation object comprises at least one first page, the at least one first page storing private user data of the first user, the private user data of the first user being from different tables of a same table space, reading first data from the at least one first page bound to the first user, the at least one first page not storing user data of users other than the first user; feeding back the read first data, the read first data being a query result of the first query request.

8. The method of claim 7, wherein, The method further comprises: receiving a second query request, the second query request carrying an identification of a second user; reading, according to the identification of the second user, second data from at least one second page bound to the second user, the at least one second page being different from the at least one first page; feeding back the read second data, the read second data being a query result of the second query request.

9. The method according to claim 7 or 8, characterized in that, The user data of the first user and the user data of the second user are from the same tables of a same table space.

10. The method according to claim 7 or 8, characterized in that, The user data of the second user is from different tables of a same table space.

11. An apparatus for accessing a database, characterized by Comprise: a receiving module, configured to receive private user data of a first user, the private user data of the first user being from different tables of a same table space; a storage module, configured to store the private user data of the first user into a first aggregation object of an aggregation object table, the first aggregation object comprising at least one first page, the at least one first page not storing user data of users other than the first user.

12. The apparatus according to claim 11, wherein the receiving module is further configured to receive user data of a second user; The storage module is further configured to store the user data of the second user into at least one second page, which is different from the at least one first page.

13. The apparatus of claim 11 or 12, wherein, The apparatus further includes: The allocation module is configured to allocate different pages to a plurality of users, including the first user and a second user.

14. The apparatus of claim 12, wherein, The user data of the first user and the user data of the second user are from the same table of a same table space.

15. The apparatus of claim 12, wherein, The user data of the second user is from different tables of the same table space.

16. The apparatus of claim 11 or 12, wherein The receiving module is further configured to receive shared data of a plurality of users, including the first user. The storage module is further configured to store the shared data of the plurality of users into a second aggregated object of an aggregated object table, which includes at least one third page.

17. An apparatus for accessing a database, the apparatus comprising: includes: The receiving module is configured to receive a first query request, which carries an identity of a first user. The reading module is configured to determine, according to the identity of the first user, a first aggregated object in an aggregated object table corresponding to the identity of the first user, wherein the first aggregated object includes at least one first page, the at least one first page stores private user data of the first user, the private user data of the first user is from different tables of a same table space, read first data from the at least one first page bound to the first user, and the at least one first page does not store user data of other users except the first user. The feedback module is configured to feed back the read first data as a query result of the first query request.

18. The apparatus of claim 17, wherein The receiving module is further configured to receive a second query request, which carries an identity of a second user. The reading module is further configured to read, according to the identity of the second user, second data from at least one second page bound to the second user, which is different from the at least one first page. The feedback module is further configured to feed back the read second data as a query result of the second query request.

19. The apparatus of claim 17 or 18, wherein, The user data of the first user and the user data of the second user are from the same table of a same table space.

20. The apparatus of claim 17 or 18, wherein, The user data of the second user is from different tables of the same table space.

21. A computing device, comprising: includes a processor and a memory; the processor runs instructions in the memory, so that the computing device executes the method of any one of claims 1 to 6 or any one of claims 7 to 10.

22. A computing device, comprising: includes a processor and a memory; the processor runs instructions in the memory, so that the computing device deploys the apparatus for accessing the database of any one of claims 11 to 16 or any one of claims 17 to 20.

23. A computer-readable storage medium, characterized in that, includes instructions; the instructions are used to implement the method of any one of claims 1 to 6 or any one of claims 7 to 10.

24. A computer-readable storage medium, characterized in that, comprising instructions; the instructions for implementing the apparatus for accessing a database as claimed in any of claims 11 to 16 or any of claims 17 to 20.

Citation Information

Patent Citations

  • Method for storing and retrieving mass information

    CN101093482A

  • Method and system for user data storage

    CN102855254A

  • Business processing system and method capable of supporting capacity expansion of database

    CN105045897A