Graph attribute foreign key integrity constraint method and system in hybrid database
By storing graph attribute data into the relational kernel in the mixed database and introducing foreign key constraints, the problem of unremarkable performance of graph and relational data processing in the mixed database is solved, and the integrity of graph attributes is guaranteed and coordinated graph relational data processing is achieved.
Patent Information
- Application Number
- CN202311753684.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
In the prior art, the kernel of the model where the graph and relationship are mixed or even integrated must meet the processing requirements of relational data and also meet the processing requirements of graph data. The ultimate performance is not outstanding in both aspects.
A foreign key integrity constraint method for graph attributes in a mixed database is proposed. By storing the attribute data of the graph into the relational kernel in the mixed database kernel, the primary key of the point of the graph database is set as a foreign key constraint for the graph attributes stored in the relational kernel, and the integrity data maintenance mechanism is used to maintain the primary key of the point of the graph database as a foreign key constraint.
The respective characteristics and processing capabilities of graph data and relational data kernel are retained, which not only maintains the correlation relationship characteristics between points and edges in graph data kernel, but also introduces strong constraint characteristics of relational data kernel, providing integrity guarantees for graph attributes and forming a coordinated 'graph + relationship' pattern.
Smart Images

Figure CN120179862A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of graph database management systems, and particularly to a method and system for foreign key integrity constraint of graph attributes in a hybrid database. Background Art
[0002] With the explosive development of the Internet, mobile Internet, social networks, Internet of Things and industrial domain related networks such as power networks, there is a great demand for the storage of relationship graphs and applications such as network topology analysis and functional analysis based on relationship graphs, which also promotes the research and development boom of graph databases.
[0003] Relational databases are based on the relational data model and are databases that process data by means of mathematical concepts and methods such as set algebra. All kinds of entities in the real world and various relationships between entities can be represented by the relational model. The query language of relational databases is the SQL language, that is, the Structured Query Language, which is a high-level non-procedural programming language. After being approved by the database committee of the American National Standards Institute (ANSI) and the International Organization for Standardization (ISO) in batches, it is defined as the standard query language for relational databases.
[0004] Foreign key constraint is a major feature in relational databases. Through foreign key constraint, which is used to establish a relationship between two tables and requires specifying which column in the main table to reference. A typical scenario is as follows: a "personnel" table and a "country" table, where the "nationality" column in each row of the "personnel" table needs to correspond to a row in the "country" table, meaning that each person has a "legal" (i.e., data with normal status in the database) nationality. This scenario can be achieved through foreign key constraint. Through this "foreign key constraint" and other constraint features, relational databases generally have strong integrity constraints on the column attributes in the table.
[0005] A graph database is a data management system with vertices and edges as the basic storage units and with the design principle of efficiently storing and querying graph data. The vertices and edges in a graph database have attributes, that is, data associated with a certain vertex or edge in the form of key-value pairs. When characterizing the attributes of a graph database, the attribute values of vertices or edges can exist in a certain data type (such as integer, string, double precision number, etc.).
[0006] Unlike relational databases, the attributes of vertex and edge data in graph databases often do not have features similar to "foreign key constraints".
[0007] In the application process of existing intelligent applications in graph databases, there are also increasing requirements for the mixed application of data in other modes, that is, in the same application system, when using a graph database, other database types are also used, such as document databases, relational databases, etc., presenting the characteristics of a "mixed" mode. Based on the requirements of "mixing" the characteristics of multiple different types of graph databases, such as a "relationship + graph" hybrid database.
[0008] For the existing "relationship + graph" hybrid databases, there are the following forms:
[0009] Graph data is managed through a graph database kernel, and relational data is managed through a relational kernel.
[0010] The mixed data is managed through a database kernel, which is both a relational kernel and a graph data kernel. In this mode, the vertex and edge Schema (or types) of the graph database are the tables of the relational database, and a specific vertex or edge is a row in the relational database table.
[0011] The problems existing in the above different "relationship + graph" hybrid database forms are as follows:
[0012] For the method of managing "graph kernel and relational kernel" separately, whether it is from the internal of the kernel or from the external interface, the graph data and relational data are separated, and there is no logical correlation between the data internally. Such a data management method is actually similar to the method of matching a single relational database with a graph database, and the data is independent from the management mode.
[0013] For the mode of "one data kernel" processing relational data and graph data simultaneously, considering that the kernel processes the data uniformly, the data is closely related logically or conceptually, and there is no situation of separation between the graph database and the relationship. However, in this mode of "graph" and "relationship" mixing or even fusing, the kernel needs to meet the processing requirements of both relational data and graph data. The final result is largely that the performance is not prominent in the processing of relational data, and the performance is also not prominent in the processing of graph data. Summary of the Invention
[0014] In order to solve the problem that in the existing technology, for the mode of "graph" and "relationship" mixing or even fusing, the kernel needs to meet the processing requirements of both relational data and graph data, and the final result is largely that the performance is not prominent in the processing of relational data, and the performance is also not prominent in the processing of graph data, the present invention proposes a method for graph attribute foreign key integrity constraint in a hybrid database, including:
[0015] Store the attribute data of the graph in the relational kernel of the hybrid database kernel;
[0016] Set the primary key of the points in the graph database as a foreign key constraint for the graph attributes stored in the relational kernel;
[0017] Adopt an integrity data maintenance mechanism to maintain the primary key of the points in the graph database that is used as a foreign key constraint.
[0018] Optionally, setting the primary key of the points in the graph database as a foreign key constraint for the graph attributes stored in the relational kernel includes:
[0019] Set the primary key ID of the corresponding referenced points in the graph database in the graph attributes stored in the relational kernel as a foreign key constraint.
[0020] Optionally, adopting an integrity data maintenance mechanism to maintain the primary key of the points in the graph database that is used as a foreign key constraint includes:
[0021] When it is detected that the primary key data referenced by the point element in the graph database as a foreign key constraint exists, adopt a restriction processing strategy for maintenance;
[0022] When the point element in the database is referenced by the primary key data used as a foreign key, when the point element is changed, adopt a NULL / empty strategy for maintenance;
[0023] When the point element in the database is referenced by the primary key data used as a foreign key, when the point element has been changed, adopt a cascade delete strategy for maintenance.
[0024] Optionally, when the point element in the database is referenced by the primary key data used as a foreign key, when the point element is changed, adopting a NULL / empty strategy for maintenance includes:
[0025] When the point element in the database is referenced by the primary key data used as a foreign key, when the point element is changed, under the condition that the attribute value is allowed to be empty, set all the attributes that use the point element to NULL / empty.
[0026] Optionally, when the point element in the database is referenced by the primary key data used as a foreign key, when the point element has been changed, adopting a cascade delete strategy for maintenance includes:
[0027] When the point element in the database is referenced by the primary key data used as a foreign key, when the point element has been changed, all the point elements to which the attributes that use the point element as a foreign key reference belong are deleted.
[0028] Optionally, when it is detected that the primary key data referenced by the point element in the graph database as a foreign key constraint exists, adopting a restriction processing strategy for maintenance includes:
[0029] When the primary key data to which the point element of the graph database is referenced as a foreign key constraint exists, changing the point element of the graph database is rejected.
[0030] On the other hand, the present application also provides a graph attribute foreign key integrity constraint system in a hybrid database, including:
[0031] An attribute introduction module, configured to store the attribute data of the graph into the relational kernel in the hybrid database kernel;
[0032] A constraint setting module, configured to set the primary key of the point of the graph database as a foreign key constraint for the graph attributes stored in the relational kernel;
[0033] A maintenance module, configured to maintain the primary key of the point of the graph database as a foreign key constraint by using an integrity data maintenance mechanism.
[0034] Optionally, the maintenance module includes:
[0035] A restriction sub-module, configured to perform maintenance by using a restriction processing strategy when it is detected that the primary key data to which the point element of the graph database is referenced as a foreign key constraint exists;
[0036] A NULL strategy sub-module, configured to perform maintenance by using a NULL / empty strategy when the point element of the database is referenced by the primary key data referenced as a foreign key and the point element is changed;
[0037] A deletion sub-module, configured to perform maintenance by using a cascading deletion strategy when the point element of the database is referenced by the primary key data referenced as a foreign key and the point element has changed.
[0038] Optionally, the restriction sub-module is specifically configured to:
[0039] When it is detected that the primary key data to which the point element of the graph database is referenced as a foreign key constraint exists, changing the point element of the graph database is rejected.
[0040] Optionally, the NULL strategy sub-module is specifically configured to:
[0041] When the point element of the database is referenced by the primary key data referenced as a foreign key and the point element is changed, under the condition that the attribute value is allowed to be null, all attributes using the point element are set to NULL / empty.
[0042] Optionally, the deletion sub-module is specifically configured to:
[0043] When the point element of the database is referenced by the primary key data referenced as a foreign key and the point element has changed, all point elements to which the attributes using the point element as a foreign key reference belong are deleted.
[0044] In another aspect, the present application also provides a computing device, including: one or more processors;
[0045] The processor is configured to execute one or more programs;
[0046] When the one or more programs are executed by the one or more processors, a method for graph attribute foreign key integrity constraint in a hybrid database as described above is implemented.
[0047] In another aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, a method for graph attribute foreign key integrity constraint in a hybrid database as described above is implemented.
[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0049] The present invention provides a method for graph attribute foreign key integrity constraint in a hybrid database, including: storing the attribute data of the graph in the relational kernel in the hybrid database kernel; setting the primary key of the points in the graph database as a foreign key constraint for the graph attributes stored in the relational kernel; and maintaining the primary key of the points in the graph database as a foreign key constraint by using an integrity data maintenance mechanism. The present invention retains the respective characteristics and processing capabilities of the graph data and the relational data kernel, not only maintains the association relationship characteristics between points and edges in the graph data kernel, but also introduces the strong constraint characteristics of the relational data kernel, providing integrity guarantee for the attribute data stored in the relational kernel. At the same time, a collaborative "graph + relationship" mode is formed, and the graph processing kernel and the relational processing kernel are not separated, but cooperate to process data. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of a method for graph attribute foreign key integrity constraint in a hybrid database according to the present invention;
[0051] Figure 2 It is a flowchart of the working process of the method for graph attribute foreign key integrity constraint in the hybrid database introduced by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0052] The present invention proposes a method for foreign key integrity constraint of graph attributes in a hybrid database, which is a foreign key integrity constraint method based on a cross-relationship kernel and a graph kernel on the basis of hybrid storage of graph attributes. The attributes of graph nodes and edges in the hybrid "graph + relationship" kernel database are stored in the relationship kernel, and at the same time, foreign key constraints are introduced for these attributes. The introduced foreign key constraints are different from the usual references between relational tables, but are foreign key constraints for graph data nodes and edges. The introduction of this invention retains the respective characteristics and processing capabilities of the graph data and relationship data kernels, maintains the association relationship characteristics between nodes and edges in the graph data kernel, and introduces the strong constraint characteristics of the relationship data kernel, providing integrity assurance for the attribute data stored in the relationship kernel. At the same time, the introduction of this method forms a collaborative "graph + relationship" mode. The graph processing kernel and the relationship processing kernel are not separated, but cooperate to process data.
[0053] Embodiment 1:
[0054] A method for foreign key integrity constraint of graph attributes in a hybrid database, as Figure 1 shown, includes:
[0055] Step S1: Store the attribute data of the graph in the relationship kernel in the hybrid database kernel;
[0056] Step S2: Set the primary key of the graph database nodes as a foreign key constraint for the graph attributes stored in the relationship kernel;
[0057] Step S3: Adopt an integrity data maintenance mechanism to maintain the primary key of the graph database nodes as a foreign key constraint.
[0058] The constraint of attribute data in the graph database environment introduced by the present invention means that the value of an attribute (or data) of a certain element (node, edge) depends on and uses the information of another node, and the two are kept consistent: the value of the user is meaningful only on the premise that the value on which it depends exists. For example, if a "student" takes classes in a certain "school", if "school" is used as an attribute of "student", the "school" attribute in the "student" data must be meaningful on the premise that it exists. Data such as a student taking classes in a non-existent school is meaningless, or the data is "illegal" (i.e., unreasonable) - a situation that the system needs to avoid.
[0059] To achieve the purpose of attribute constraint, the present invention introduces a cross-kernel graph data attribute storage method in a graph + relational hybrid database; and introduces a foreign key constraint method for nodes and edges in graph data for this kind of attribute.
[0060] The following combines Figure 2 to describe the technical solution of the present invention in detail.
[0061] Step 1: On the basis of the mechanism of storing graph database kernel nodes and edges, introduce the attribute storage of the relational database kernel
[0062] In existing graph databases, individual node and edge element data may have attribute data. For example, for a node type like "student", there may be attributes such as "student ID number" and "date of birth", and for a node type like "class", there may be attributes such as "class number" and "grade", while for an edge type like "which class the student belongs to", there may be an attribute such as "classroom location". Generally, graph databases maintain a list of attributes owned by each node and edge at the kernel level. However, when the number of attributes of one or several types of nodes (or edges) in the graph database is large, the graph database kernel needs to maintain a large amount of attribute data. But for the graph database kernel, this attribute data is often not the data required during graph data traversal. The existence of a large amount of attribute data actually affects the efficiency of the core traversal and calculation functions of graph data.
[0063] This "attribute" data can be stored in the relational kernel of the hybrid database kernel, that is, on the basis of the mechanism of storing graph nodes, edges, and attributes, introduce the relational database kernel to store part of the graph's attribute data.
[0064] In such a "graph + relational" hybrid kernel database, there will be the following types of data:
[0065] Graph node, edge, and attribute data;
[0066] Attribute data of graph nodes and edges partially managed by the relational kernel;
[0067] Step 2: Introduce foreign key constraints for the graph attributes stored in the relational kernel
[0068] In this step, introduce constraints for the attribute values of the nodes (or edges) of the graph database stored in the relational kernel. The data referred to by this constraint (i.e., the parent key in the foreign key constraint) is a certain node of the graph database (represented by the ID of the node), that is, the value of the attribute in this constraint needs to refer to the primary key of a specific node in the graph database.
[0069] For example, in a graph database with multiple node types such as "student" and "class" and an edge type like "which class the student belongs to", in order to distinguish the "ethnic group" attribute of students, a node type like "ethnic group" can be introduced, and each specific node in this node type represents a real ethnic group (such as "Han", "Manchu", "Hui", etc.). On this basis, the value of the "ethnic group" attribute of a specific node of the "student" type, as a foreign key, can only come from a specific "ethnic group" node (represented by the ID of the "ethnic group" node).
[0070] By using the method of "attribute value" stored in the relational database to reference a specific existing "point", it is ensured that such "attribute value" must be a reasonably existing point (i.e., the above-mentioned "ethnic group"), and the integrity of such attribute value is thus guaranteed.
[0071] The definition of the point (or edge) attribute value in the existing graph database has no integrity constraint, and only a constraint between two "points" can be established through the "edge". In the graph database, generally no constraint is established for the "attribute". However, the cost of establishing an edge is much higher than that of an "attribute", and the constraint function of such "edge" between points is more limited: there are only add and delete operations, and it cannot be modified like an "attribute". Similar to the way of the "ethnic group" attribute of "students" mentioned here, it can actually be achieved by the conventional method of adding an edge from a point of the "student" type to a point of the "ethnic group", but this method:
[0072] The cost of creating an edge is high;
[0073] The "edge" data does not support modification operations well;
[0074] In some scenarios, it will bring a large amount of edge data, and the operability is not high. For example, if the "edge" of "ethnic group" is introduced for all people in a certain country, it may introduce hundreds of millions or billions of edges.
[0075] And through this method of "attribute" of the "foreign key" type, only the primary key ID of the corresponding referenced point needs to be set in a certain attribute of the point (and stored in the relational kernel). Compared with the edge, the cost of setting the value of the attribute is lower, and the supported operations such as modification and query are also more convenient.
[0076] Step 3: Introduce data integrity maintenance operations for the cross-graph data kernel and the relational kernel
[0077] For the attributes that have established "foreign key constraints" inside the relational database kernel, introduce an integrity data maintenance mechanism. When there are the following changes to the referenced data (i.e., the "primary key" used by the "foreign key" attribute, that is, the pointed point element), integrity checks and processing need to be performed according to the corresponding "foreign key" strategy:
[0078] The referenced data has an attribute modification;
[0079] The referenced data is deleted.
[0080] When the above two types of changes to the referenced data occur, the attribute data in all relational tables that reference this referenced data is processed according to different strategies:
[0081] Restriction processing strategy: In this strategy, as long as it is detected that the primary key data to which a certain point element is referenced as a foreign key exists, the change operation of the referenced data is rejected.
[0082] Set to NULL / empty strategy: In this strategy, as long as a certain point element is referenced by the primary key data to which it is referenced as a foreign key, when this point element changes, all attributes that use its data as a foreign key value are set to NULL / empty. This situation can only occur when the attribute value allows null.
[0083] Cascade delete strategy: In this strategy, as long as a certain point element is referenced by the primary key data to which it is referenced as a foreign key, when this point element changes, all point (or edge) elements to which the attributes using its data as a foreign key value belong are deleted.
[0084] It can be seen that regardless of which of the above three strategies is adopted, when a point element of the graph used by a foreign key reference changes, after the operation is completed, for the attribute that uses this element as a foreign key value, its value is either not modified, set to NULL / empty, or the point and edge elements to which it belongs are deleted, and there will be no "illegal" situation where the data referenced by the attribute value does not exist.
[0085] Embodiment 2:
[0086] Based on the same inventive concept, the present invention also provides a graph attribute foreign key integrity constraint system in a hybrid database, including:
[0087] An attribute introduction module for storing the attribute data of the graph into the relational kernel in the hybrid database kernel;
[0088] A constraint setting module for setting the primary key of the point of the graph database as a foreign key constraint for the graph attributes stored in the relational kernel;
[0089] A maintenance module for maintaining the primary key of the point of the graph database used as a foreign key constraint by adopting an integrity data maintenance mechanism.
[0090] Optionally, the maintenance module includes:
[0091] A restriction sub-module for maintaining by adopting a restriction processing strategy when it is detected that the primary key data to which the point element of the graph database is referenced as a foreign key constraint exists;
[0092] An empty strategy sub-module for maintaining by adopting a NULL / empty strategy when the point element of the database is referenced by the primary key data to which it is referenced as a foreign key and the point element changes;
[0093] A deletion sub-module, which is used to maintain a cascading deletion strategy when a point element in a database is referenced by primary key data that is used as a foreign key and the point element has been changed.
[0094] Optionally, a restriction sub-module is specifically used for:
[0095] When it is detected that there is primary key data that references a point element in a graph database as a foreign key constraint, changing the point element in the graph database is rejected.
[0096] Optionally, a null strategy sub-module is specifically used for:
[0097] When a point element in a database is referenced by primary key data that is used as a foreign key, when the point element is changed, under the condition that the attribute value is allowed to be null, all attributes that use the point element are set to NULL / empty.
[0098] Optionally, the deletion sub-module is specifically used for:
[0099] When a point element in a database is referenced by primary key data that is used as a foreign key and the point element has been changed, all point elements to which the attributes that use the point element as a foreign key reference belong are deleted.
[0100] Embodiment 3:
[0101] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory. The memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of a method for foreign key integrity constraint of graph attributes in a hybrid database in the above embodiments.
[0102] Embodiment 4:
[0103] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and the operating system of the terminal is stored in this storage space. Moreover, one or more instructions suitable for being loaded and executed by the processor are stored in this storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the steps of the method for graph attribute foreign key integrity constraint in a hybrid database in the above embodiments.
[0104] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0105] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified function in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0106] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified function in Figure 1 one flow or multiple flows and / or blocksFigure 1 The functions specified in one or more boxes.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 process or more processes and / or boxes Figure 1 or more boxes.
[0108] The above are only embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included within the scope of the claims of the present invention pending approval.
Claims
1. A method for foreign key integrity constraint of graph attributes in a hybrid database, characterized in that, including: storing the attribute data of the graph into the relational kernel in the hybrid database kernel; setting the primary key of the point in the graph database as a foreign key constraint for the graph attributes stored in the relational kernel; maintaining the primary key of the point in the graph database, which is used as a foreign key constraint, by using an integrity data maintenance mechanism.
2. The method according to claim 1, characterized in that, The step of setting the primary key of the point in the graph database as a foreign key constraint for the graph attributes stored in the relational kernel includes: setting the primary key ID of the corresponding point in the graph database being referenced in the graph attributes stored in the relational kernel as a foreign key constraint.
3. The method according to claim 1, characterized in that, The step of maintaining the primary key of the point in the graph database, which is used as a foreign key constraint, by using an integrity data maintenance mechanism includes: when it is detected that the primary key data referenced by the point element in the graph database as a foreign key constraint exists, using a restriction processing strategy for maintenance; when the point element in the database is referenced by the primary key data used as a foreign key, when the point element is changed, using a NULL / empty strategy for maintenance; when the point element in the database is referenced by the primary key data used as a foreign key, when the point element is changed, using a cascade deletion strategy for maintenance.
4. The method according to claim 3, characterized in that, The step of using a NULL / empty strategy for maintenance when the point element in the database is referenced by the primary key data used as a foreign key and the point element is changed includes: when the point element in the database is referenced by the primary key data used as a foreign key and the point element is changed, under the condition that the attribute value allows null, setting all attributes using the point element to NULL / empty.
5. The method according to claim 3, characterized in that, The step of using a cascade deletion strategy for maintenance when the point element in the database is referenced by the primary key data used as a foreign key and the point element is changed includes: when the point element in the database is referenced by the primary key data used as a foreign key and the point element is changed, all point elements to which the attributes using the point element as a foreign key reference belong are deleted.
6. The method according to claim 3, characterized in that, The step of using a restriction processing strategy for maintenance when it is detected that the primary key data referenced by the point element in the graph database as a foreign key constraint exists includes: when it is detected that the primary key data referenced by the point element in the graph database as a foreign key constraint exists, rejecting the change of the point element in the graph database.
7. A system for foreign key integrity constraint of graph attributes in a hybrid database, characterized in that, including: an attribute introduction module for storing the attribute data of the graph into the relational kernel in the hybrid database kernel; a constraint setting module for setting the primary key of the point in the graph database as a foreign key constraint for the graph attributes stored in the relational kernel; a maintenance module for maintaining the primary key of the point in the graph database, which is used as a foreign key constraint, by using an integrity data maintenance mechanism.
8. The system according to claim 7, characterized in that, The maintenance module includes: a restriction sub-module for using a restriction processing strategy for maintenance when it is detected that the primary key data referenced by the point element in the graph database as a foreign key constraint exists; a NULL / empty strategy sub-module for using a NULL / empty strategy for maintenance when the point element in the database is referenced by the primary key data used as a foreign key and the point element is changed; a deletion sub-module for using a cascade deletion strategy for maintenance when the point element in the database is referenced by the primary key data used as a foreign key and the point element is changed.
9. A computer device, characterized in that, including: one or more processors; the processor for storing one or more programs; When the one or more programs are executed by the one or more processors, a method for graph attribute foreign key integrity constraint in a hybrid database as described in any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and when the computer program is executed, a method for graph attribute foreign key integrity constraint in a hybrid database as described in any one of claims 1 to 6 is implemented.