A view processing method, storage medium and device
Mapping remote tables by creating local external tables in the database view solves the problem that DBLINK remote tables cannot be included in the view, improves data security and database performance, and simplifies data access and permission management.
Patent Information
- Application Number
- CN202411931514.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-08
AI Technical Summary
In the database view based on rules system implementation, DBLINK remote table objects cannot be included, resulting in low data security, incomplete data, difficulty in joint querying and degraded database performance.
By obtaining the definition information of the view to be created, it is determined whether it contains a reference to the remote table. If it is included, a local external table corresponding to the remote table is created in the local database, and a view is created based on the local external table to indirectly access the data of the remote table.
It improves the security of the permission level of the database operation object, simplifies SQL statements, improves the clarity of data access logic, facilitates permission control management, and improves the flexibility and operability of database operations.
Smart Images

Figure CN119782329A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to database technology, and in particular to a view processing method, storage medium and device. Background Art
[0002] A view is a virtual table in a database management system, which is based on the query results of one or more tables. The view itself does not store data, but stores an SQL query to dynamically generate data from the base table. A database link (DBLINK) is a database object used to establish connections between different database instances so that data can be queried and operated across instances. The actual data in a DBLINK remote table is a table defined and stored in a homogeneous or heterogeneous database. Through DBLINK, cross-database queries can be performed to obtain data from remote tables.
[0003] However, the physical storage number of the database object is saved in the view implemented based on the rule system in the database, and the DBLINK remote table is a non-local table, so there is no physical storage number in the local database, resulting in the inability to include the DBLINK remote table object in the view to implement the view operation function. In other words, in the view implemented based on the rule system, the DBLINK remote table cannot be included in the view, and the users or applications of the local database can only directly access the remote table of the remote database, which affects the security of the data and is not suitable for processing sensitive data.
[0004] In addition, the view cannot contain DBLINK remote table objects. There may also be problems such as incomplete data in the view, inability to perform simple and convenient joint query or analysis of local data and remote data, and difficulty in synchronizing data between remote and local tables, which affects database performance. Summary of the invention
[0005] In view of the above problems, a view processing method, storage medium and device are proposed to overcome the above problems or at least partially solve the above problems.
[0006] An object of the present invention is to provide a view processing method that can improve data security.
[0007] A further object of the present invention is to improve the convenience of distinguishing local external tables from ordinary external tables.
[0008] Another further object of the present invention is to ensure the execution accuracy of the view.
[0009] In particular, the present invention provides a view processing method, comprising:
[0010] Get the definition information of the view to be created;
[0011] Based on the view definition information, determine whether the view contains references to remote tables;
[0012] If yes, then create a local external table corresponding to each remote table involved in the view in the local database, wherein each local external table is used to map to its corresponding remote table;
[0013] Create a view in the local database based on the local external table so that the view can be used to access the data of the remote table.
[0014] Optionally, after the step of creating a local external table corresponding to each remote table involved in the view in the local database, the view processing method further includes:
[0015] The local external table is marked with a preset identifier to distinguish the local external table from other data tables in the local database.
[0016] Optionally, after the step of creating a view in the local database according to the local external table, the view processing method further includes:
[0017] In response to the view output instruction, determining whether the view to be output involves a local external table;
[0018] If so, all local external tables involved in the view to be output are converted into corresponding remote tables, and the information of the view to be output obtained by the conversion is used as the output information of the view to be output.
[0019] Optionally, the step of determining whether the view to be output involves a local external table includes:
[0020] Determine whether the data table involved in the view to be output has a preset identifier;
[0021] If yes, confirm that the view to be exported involves a local external table;
[0022] If not, confirm that the view to be exported does not involve local external tables.
[0023] Optionally, after the step of creating a view in the local database according to the local external table, the view processing method further includes:
[0024] In response to the view deletion instruction, the relevant information of the local external table involved in the view is deleted to maintain the lifecycle consistency of the view and the local external table involved in the view.
[0025] Optionally, the view definition information includes a query statement used to define the view; and
[0026] Based on the view definition information, whether the view contains references to remote tables includes:
[0027] Determine whether the query statement involves querying a remote table;
[0028] If so, confirm that the view contains references to remote tables;
[0029] If so, verify that the view does not contain references to remote tables.
[0030] Optionally, the step of creating a local external table corresponding to each remote table involved in the view in the local database includes:
[0031] Obtaining definition information of a remote table, wherein the definition information of the table at least includes structure and attributes;
[0032] Based on the definition information of the remote table, a local external table with the same structure and properties as the remote table is created in the local database.
[0033] Optionally, a database link pointing to the remote database is pre-created in the local database; and
[0034] Remote tables include data tables in a remote database that are accessible via a database link.
[0035] According to another aspect of the present invention, a machine-readable storage medium is provided, on which a machine-executable program is stored. When the machine-executable program is executed by a processor, any of the above view processing methods is implemented.
[0036] According to another aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a machine executable program stored in the memory and running on the processor, and the processor implements any of the above view processing methods when executing the machine executable program.
[0037] The view processing method of the present invention obtains the definition information of the view to be created, determines whether the view contains a reference to a remote table according to the definition information of the view, and creates a local external table corresponding to each remote table involved in the view in the local database when the view contains a reference to the remote table, realizes the use of the local external table to map the remote table corresponding to it, and creates a view in the local database according to the local external table, realizes access to the data of the remote table through the view. Thus, the view processing method of the present invention can use the local external table to map the remote table corresponding to it, and create a view according to the local external table to indirectly access the data of the remote table, realizes access to the remote table through the view, avoids the user's direct access to the remote table, hides the original table structure of the remote table, thereby improving the security of the database operation object authority level, and further improves the security of the data. At the same time, accessing the data of the remote table through the view simplifies the SQL statement, improves the clarity of the data access logic, thereby improving the efficiency of the user's use of the database and the ease of understanding of the user. In addition, accessing the data of the remote table through the view facilitates the granting of different permissions to different views to distinguish the access restrictions of the remote table, is beneficial to the authority control management of the database user, and improves the flexibility and operability of the database operation.
[0038] Furthermore, the view processing method of the present invention achieves effective marking of local external tables by marking the local external tables with a preset identifier after the step of creating a local external table corresponding to each remote table involved in the view, so as to effectively distinguish local external tables from other data tables in the local database, thereby improving the convenience of distinguishing local external tables from ordinary external tables, and further improving the performance of the database system.
[0039] Furthermore, the view processing method of the present invention, after the step of creating the view, responds to the view output instruction, determines whether the view to be output involves local external tables, and when the view to be output involves local external tables, converts all local external tables involved in the view to be output into corresponding remote tables, and uses the information of the converted view as the output information of the view, thereby realizing the conversion of the view output information, ensuring the accuracy of data information in scenarios where information needs to be output, such as displaying the original definition of the view, exporting the view backup, etc., thereby improving the execution accuracy of the view, and further improving the performance of the database system.
[0040] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
[0042] Figure 1 is a flowchart of a view processing method according to an embodiment of the present invention;
[0043] Figure 2 is a flowchart of a view processing method according to another embodiment of the present invention;
[0044] Figure 3 is a schematic diagram of the structure of a machine-readable storage medium according to an embodiment of the present invention; and
[0045] Figure 4 is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0047] In order to solve the above technical problem, an embodiment of the present invention proposes a view processing method. Figure 1 FIG. 1 is a schematic flow chart of a view processing method according to an embodiment of the present invention. Figure 1 As shown, the view processing method may generally include:
[0048] Step S102, obtaining definition information of the view to be created. It should be noted that the definition information of the view in this step may include a query statement (or SQL statement) for defining the view.
[0049] Step S104, judging whether the view contains a reference to a remote table according to the view definition information, if so, executing step S106. It should be noted that after this step, if the view does not contain a reference to a remote table, the view can be created in the original creation mode.
[0050] Step S106: Create a local external table corresponding to each remote table involved in the view in the local database, wherein each local external table is used for mapping with its corresponding remote table.
[0051] Step S108, creating a view in the local database according to the local external table, so as to access the data of the remote table through the view.
[0052] The view processing method of the present invention obtains the definition information of the view to be created, determines whether the view contains a reference to a remote table according to the definition information of the view, and creates a local external table corresponding to each remote table involved in the view in the local database when the view contains a reference to the remote table, thereby realizing the use of the local external table to map with the corresponding remote table, and creating a view in the local database according to the local external table, thereby realizing access to the data of the remote table through the view. Therefore, the view processing method of the present invention can use the local external table to map with the corresponding remote table, and create a view according to the local external table to indirectly access the data of the remote table, thereby realizing access to the remote table through the view, avoiding direct access of the user to the remote table, hiding the original table structure of the remote table, thereby improving the security of the database operation object authority level, and further improving the security of the data.
[0053] In addition, the view processing method of the present invention can access the data of the remote table through the view, simplify the SQL statement, improve the clarity of the data access logic, thereby improving the efficiency of the user's use of the database and the ease of understanding of the user. At the same time, the view processing method of the present invention can access the data of the remote table through the view, which is convenient for assigning different permissions to different views to distinguish the access restrictions of the remote table, which is beneficial to the permission control management of the database user and improves the flexibility and operability of the database operation.
[0054] In some embodiments, a database link (DBLNIK) for pointing to a remote database is pre-created in the local database. DBLNIK is a connection established between two databases in a relational database to allow objects in one database to be accessed from another database, thereby realizing data interaction and sharing between cross-databases. In this embodiment, DBLNIK can be used for the connection between the local database and the remote database. Accordingly, the remote table in the above step S104 may include a data table in the remote database that is accessible via DBLNIK. That is to say, the remote table in the above step S104 may be a DBLINK remote table.
[0055] Therefore, the view processing method of the present invention can use the local external table to map the corresponding DBLINK remote table, so that the view can include the DBLINK remote table, thereby realizing access to the DBLINK remote table through the view, thereby improving the flexibility and operability of database operations and the security of object authority levels.
[0056] In some embodiments, in the above step S102, the view definition information may include a query statement (or SQL statement) for defining the view. It should be noted that the query statement determines the data source and structure of the view. When creating a view, it is necessary to execute the step of inputting the view definition SQL statement. In a specific embodiment, the SQL statement may select data based on a local table, or may select data based on a non-local table such as a remote table.
[0057] Accordingly, the above step S104 may include the following steps: determining whether the query statement involves a query on a remote table; if so, confirming that the view contains a reference to the remote table; if so, confirming that the view does not contain a reference to the remote table.
[0058] Therefore, the view processing method of the present invention can accurately judge whether a view contains a reference to a remote table based on the view definition information, thereby improving the accuracy of the judgment, thereby ensuring the effectiveness of the subsequent process operations, and further ensuring the performance of the database system.
[0059] In some embodiments, the above step S106 may include the following steps: obtaining definition information of the remote table, wherein the definition information of the table includes at least structure and attributes; creating a local external table having the same structure and attributes as the remote table in the local database according to the definition information of the remote table. Specifically, the definition information of the table may be obtained through SQL query, database management tool or API interface. The definition information of the remote table may include the structure and attributes of the table. In a specific embodiment, the structure of the table may include information such as column name, data type, constraint condition, etc., and the attributes of the table may include information such as primary key, foreign key, index, storage setting, etc.
[0060] Therefore, the view processing method of the present invention creates a local external table in the local database according to the acquired remote table definition information, ensuring that the structure and attributes of the created local external table are completely consistent with the remote table, so as to perform data operations and integrity checks in the local database, thereby achieving effective synchronization and integration of data of remote tables in the remote database, avoiding access delays and poor data security caused by local database users or applications directly accessing remote tables in the remote database, and improving data security while improving data processing efficiency.
[0061] In some embodiments, the above step S108 can be specifically performed as follows: constructing a relationship between a local external table and a view, converting the information of all DBLINK remote tables involved in the definition of the view into the information of the corresponding local external table, and constructing a dependency relationship with the view. Thus, the view processing method of the present invention realizes the creation of a view in a local database according to a local external table, and simultaneously creates a dependency relationship between the local external table and the view, thereby ensuring that the life cycle of the view is consistent with that of the external table.
[0062] In some embodiments, after the above step S108, the view processing method of the present invention may further include the following steps: marking the local external table with a preset identifier to distinguish the local external table from other data tables in the local database. Specifically, the preset identifier may include a field of a preset length added to the local external table, a label added to an existing field in the local external table, or a special modification to the name of the local external table. In addition, other data tables in the local database may include local tables, ordinary external tables, etc.
[0063] In a specific embodiment, the preset flag can be a special field added to the local external table, which is used to identify whether the local external table provides support for DBLINK views. For example, a Boolean field named "IS_DBLINK_SUPPORTED" can be added to the header of the local external table, and its value can be set to "TRUE" to identify the table as a local external table.
[0064] Therefore, the view processing method of the present invention achieves effective marking of local external tables by marking the local external tables with preset identifiers after the step of creating local external tables corresponding to each remote table involved in the view, so as to effectively distinguish local external tables from other data tables in the local database, thereby improving the convenience of distinguishing local external tables from ordinary external tables, and further improving the performance of the database system.
[0065] In some embodiments, after the above step S108, the view processing method of the present invention may further include the following steps: in response to the view output instruction, determine whether the view to be output involves a local external table; if so, convert all local external tables involved in the view to be output into corresponding remote tables, and use the information of the view to be output obtained by the conversion as the output information of the view to be output.
[0066] It should be noted that the view output instruction can be issued by a user or application of a local database to instruct the execution of operations such as displaying the original definition of a view or exporting a backup of a view. In addition, output information can refer to information related to a view that is generated and presented to a user during a certain operation or query process, including but not limited to the original definition of a view, exporting a backup of a view, querying results of a view, and possible error or warning information.
[0067] Therefore, the view processing method of the present invention, after the step of creating the view, responds to the view output instruction, determines whether the view to be output involves local external tables, and when the view to be output involves local external tables, converts all local external tables involved in the view to be output into corresponding remote tables, and uses the information of the converted view as the output information of the view, thereby realizing the conversion of the view output information, ensuring the accuracy of data information in scenarios where output information is required, such as displaying the original definition of the view, exporting the view backup, etc., thereby improving the execution accuracy of the view, and further improving the performance of the database system.
[0068] In some embodiments, the above step of determining whether the view to be output involves a local external table may include the following steps: determining whether the data table involved in the view to be output has a preset identifier; if so, confirming that the view to be output involves a local external table; if not, confirming that the view to be output does not involve a local external table. That is, when deleting a view, the relevant information of the corresponding local external table can be deleted according to the dependency relationship between the view and the local external table to maintain the life cycle consistency between the view and the local external table.
[0069] Therefore, the view processing method of the present invention can accurately identify whether the view to be output involves a local external table through a preset identifier. Since the local external table may contain sensitive information or interact with other systems, it helps to implement stricter data access control on such views, thereby further ensuring data security.
[0070] In some embodiments, after the above step S108, the view processing method of the present invention may further include the following steps: in response to a view deletion instruction, deleting the relevant information of the local external table involved in the view to maintain the life cycle consistency of the view and the local external table involved. It should be noted that the view deletion instruction may be issued by a user or application of the local database to instruct the deletion of a specified view.
[0071] Therefore, the view processing method of the present invention can accurately identify whether the view to be output involves a local external table through a preset identifier. Since the local external table may contain sensitive information or interact with other systems, it helps to implement stricter data access control on such views, thereby further ensuring data security.
[0072] In a specific implementation, the present invention proposes a view creation scheme that uses a local external table to map a corresponding DBLINK remote table, so that the view can contain the DBLINK remote table, thereby realizing access to the remote table through the view, improving the flexibility and operability of database operations and the security of object permission levels. For example, for createview v1 as select*from t1@dblink; the specific technical solution may include the following steps:
[0073] 1. When creating a view containing a DBLINK remote table in a local database, firstly, based on the DBLINK function of the database, the definition information of all remote tables in the view is obtained according to DBLINK, and then a local external table with the same definition is created in the local database based on the definition information of the remote table to form a mapping relationship. The local external table has the same structure and attributes as the remote table, and has a physically unique identification number in the local database to facilitate the creation of a dependency relationship with the view.
[0074] 2. Create a view in the local database based on the local external table, that is, create a dependency relationship between the local external table and the view, so that when the view is deleted in the subsequent process, the corresponding local external table related information can be deleted according to the dependency relationship to maintain the life cycle consistency of the view and the external table.
[0075] 3. Perform special identification processing on the created local external table to identify that the local external table is used to provide support for the DBLINK view and to distinguish between ordinary external tables and local external tables.
[0076] 4. All output information related to this view will be converted according to the identifier of the local external table, and all local external tables involved in the view will be converted to DBLINK remote tables to output information. Specifically, the output information can include displaying the original definition of the view and exporting the view backup. For example, all local external tables in all views that are mapped to DBLINK remote tables are converted to corresponding DBLINK remote tables when output as the original definition of the view.
[0077] 5. When deleting a view, delete the relevant information of the corresponding local external table based on the dependency relationship to maintain the lifecycle consistency between the view and the local external table.
[0078] At this point, the view can go through the complete creation process in the database and be created successfully. The query, insert, modify, and delete operations on the view will convert the DBLINK remote table into the local external table in the view, thereby realizing the access to the DBLINK remote table.
[0079] Therefore, the view processing method of the present invention can have at least the following beneficial effects: (1) by including the DBLINK remote table in the view, the SQL statement can be simplified, the data access logic becomes clearer, and the efficiency of users using the database and the user's understanding are improved; (2) it is beneficial to data security, avoiding the user's direct access to the DBLINK remote table and hiding the original table structure of the DBLINK remote table; (3) it is beneficial to the permission control management of database users, and different permissions are assigned to different views to distinguish the access restrictions of the remote table.
[0080] Figure 2 FIG. 1 is a flow chart of a view processing method according to another embodiment of the present invention. Figure 2 , the process steps of this embodiment are specifically described.
[0081] Step S202, obtaining definition information of the view to be created. It should be noted that the definition information of the view includes an SQL statement used to define the view.
[0082] Step S204, determining whether the view contains a reference to a remote table, if so, executing step S206, if not, executing step S212.
[0083] Step S206: Create a local external table corresponding to the remote table in the local database. It should be noted that each local external table is used to map its corresponding remote table, and each created local external table is specially marked with a preset identifier.
[0084] Step S208: Create a view in the local database according to the local external table. It should be noted that this step can be specifically performed by creating a dependency relationship between the view and the local external table to facilitate access to the data of the remote table.
[0085] Step S210, in response to the view output instruction, all local external tables involved in the view are converted into corresponding remote tables, and the information of the converted view is used as the output information of the view. At this point, this process ends.
[0086] Step S212: Create a view in the original creation mode. This process ends here.
[0087] Therefore, the view processing method of the present invention can use the local external table to map the corresponding remote table, and create a view based on the local external table to indirectly access the data of the remote table, thereby realizing the access to the remote table through the view, avoiding the user's direct access to the remote table, hiding the original table structure of the remote table, thereby improving the security of the database operation object authority level, and further improving the security of the data.
[0088] Furthermore, the view processing method of the present invention accesses the data of the remote table through the view, simplifies the SQL statement, and improves the clarity of the data access logic, thereby improving the efficiency of the user's use of the database and the ease of the user's understanding.
[0089] Furthermore, the view processing method of the present invention accesses the data of the remote table through the view, which facilitates the granting of different permissions to different views to distinguish the access restrictions of the remote table, is beneficial to the permission control management of database users, and improves the flexibility and operability of database operations.
[0090] This embodiment also provides a machine-readable storage medium and a computer device. Figure 3 is a schematic diagram of the structure of a machine-readable storage medium 10 according to an embodiment of the present invention, Figure 4 is a schematic diagram of the structure of a computer device 20 according to an embodiment of the present invention.
[0091] The machine-readable storage medium 10 stores a machine-executable program 11 , and when the machine-executable program 11 is executed by a processor, the processing method of any of the above embodiments is implemented.
[0092] The computer device 20 may include a memory 220, a processor 210, and a machine executable program 11 stored in the memory 220 and running on the processor 210, and the processor 210 implements the processing method of any of the above embodiments when executing the machine executable program 11.
[0093] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any machine-readable storage medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.
[0094] For the purposes of the description of this embodiment, the machine-readable storage medium 10 may be any device that can contain, store, communicate, propagate or transmit a program for use with an instruction execution system, device or apparatus or in conjunction with such instruction execution systems, devices or apparatuses. More specific examples (a non-exhaustive list) of the machine-readable storage medium 10 include the following: an electrical connection portion (electronic device) having one or more wirings, a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the machine-readable storage medium 10 may even be paper or other suitable medium on which the program may be printed, because the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.
[0095] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
[0096] The computer device 20 may be, for example, a server, a desktop computer, a notebook computer, a tablet computer, or a smart phone. In some examples, the computer device 20 may be a cloud computing node. The computer device 20 may be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, a program module may include routines, programs, target programs, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. The computer device 20 may be implemented in a distributed cloud computing environment where remote processing devices linked through a communication network perform tasks. In a distributed cloud computing environment, program modules may be located on a local or remote computing system storage medium including a storage device.
[0097] The computer device 20 may include a processor 210 adapted to execute stored instructions, and a memory 220 providing temporary storage space for the operation of the instructions during operation. The processor 210 may be a single-core processor, a multi-core processor, a computing cluster, or any number of other configurations. The memory 220 may include a random access memory (RAM), a read-only memory, a flash memory, or any other suitable storage system.
[0098] The flow chart provided by the present embodiment is not intended to indicate that the operation of the method will be performed in any particular order, or that all operations of the method are included in all every case. In addition, the method may include additional operations. Within the scope of the technical thinking provided by the present embodiment method, additional changes may be made to the above method.
[0099] At this point, those skilled in the art should recognize that, although multiple exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived based on the content disclosed in the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and recognized as covering all these other variations or modifications.
Claims
1. A view processing method, comprising: Get the definition information of the view to be created; According to the definition information of the view, determining whether the view contains a reference to a remote table; If yes, then creating a local external table corresponding to each remote table involved in the view in the local database, wherein each local external table is used to map the remote table corresponding to it; The view is created in the local database according to the local external table, so as to access the data of the remote table through the view.
2. The view processing method according to claim 1, wherein: After the step of creating in the local database a local external table corresponding to each remote table involved in the view, the view processing method further comprises: The local external table is marked with a preset identifier to distinguish the local external table from other data tables in the local database.
3. The view processing method according to claim 2, wherein: After the step of creating the view in the local database according to the local external table, the view processing method further includes: In response to the view output instruction, determining whether the view to be output involves the local external table; If so, all the local external tables involved in the view to be output are converted into the corresponding remote tables, and the information of the view to be output obtained by conversion is used as the output information of the view to be output.
4. The view processing method according to claim 3, wherein: The step of determining whether the view to be output involves the local external table includes: Determining whether the data table involved in the view to be output has the preset identifier; If yes, confirming that the view to be output involves the local external table; If not, it is confirmed that the view to be output does not involve the local external table.
5. The view processing method according to claim 1, wherein: After the step of creating the view in the local database according to the local external table, the view processing method further includes: In response to the view deletion instruction, the relevant information of the local external table involved in the view is deleted to maintain the lifecycle consistency of the view and the local external table involved in the view.
6. The view processing method according to claim 1, wherein: The view definition information includes a query statement used to define the view; and The determining, according to the definition information of the view, whether the view includes a reference to a remote table comprises: Determining whether the query statement involves querying the remote table; If so, confirming that the view contains a reference to the remote table; If so, it is confirmed that the view does not contain a reference to the remote table.
7. The view processing method according to claim 1, wherein: The step of creating a local external table corresponding to each remote table involved in the view in the local database comprises: Obtaining definition information of the remote table, wherein the definition information of the table at least includes structure and attributes; According to the definition information of the remote table, a local external table having the same structure and the same attributes as the remote table is created in the local database.
8. The view processing method according to claim 1, wherein: A database link pointing to the remote database is pre-created in the local database; and The remote table comprises a data table in the remote database accessible via the database link.
9. A machine-readable storage medium having a machine-executable program stored thereon, wherein the machine-executable program, when executed by a processor, implements the view processing method according to any one of claims 1 to 8.
10. A computer device, comprising a memory, a processor, and a machine executable program stored in the memory and running on the processor, wherein the processor implements the view processing method according to any one of claims 1 to 8 when executing the machine executable program.