You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/ops/storages.md
+27-21Lines changed: 27 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,26 +87,32 @@ You can find an end-to-end example [here](https://github.com/cocoindex-io/cocoin
87
87
88
88
## Property Graph Targets
89
89
90
-
Property graph is a graph data model where both nodes and relationships can have properties.
90
+
Property graph is a widely-adopted model for knowledge graphs, where both nodes and relationships can have properties.
91
+
[Graph database concepts](https://neo4j.com/docs/getting-started/appendix/graphdb-concepts/) has a good introduction to basic concepts of property graphs.
92
+
93
+
The following concepts will be used in the following sections:
*[Node label](https://neo4j.com/docs/getting-started/appendix/graphdb-concepts/#graphdb-labels), which represents a type of nodes.
96
+
*[Relationship](https://neo4j.com/docs/getting-started/appendix/graphdb-concepts/#graphdb-relationship), which describes a connection between two nodes.
*[Properties](https://neo4j.com/docs/getting-started/appendix/graphdb-concepts/#graphdb-properties), which are key-value pairs associated with nodes and relationships.
91
99
92
100
### Data Mapping
93
101
94
-
In CocoIndex, you can export data to property graph databases.
95
-
This usually involves more than one collectors, and you export them to different types of graph elements (nodes and relationships).
96
-
In particular,
102
+
Data from collectors are mapped to graph elements in various types:
97
103
98
-
1. You can export rows from some collectors to nodes in the graph. Each row is mapped to a node.
99
-
2. You can export rows from some other collectors to relationships in the graph. Each row is mapped to a relationship, together with the source and target nodes of the relationship.
100
-
3. Since relationships exported in 2 may share the same nodes (with nodes exported in 1, and other relationships exported in 2),
101
-
there will match and deduplicate nodes, using their primary key as each node's identifier.
104
+
1. Rows from collectors → Nodes in the graph
105
+
2. Rows from collectors → Relationships in the graph (including source and target nodes of the relationship)
102
106
103
-
This is what you need to provide to export data to a property graph database:
107
+
This is what you need to provide to define these mappings:
104
108
105
-
*Provide `Nodes` to export nodes with each label (part 1).
106
-
*For labels that will appear as source/target nodes of relationships (part 2) without being exported as nodes (part 1), you need to declare these labels to provide label-level configuration like primary keys.
107
-
*Provide `Relationships` to export relationships with each type (part 2).
109
+
*Specify [nodes to export](#nodes-to-export).
110
+
*[Declare extra node labels](#declare-extra-node-labels), for labels to appear as source/target nodes of relationships but not exported as nodes.
111
+
*Specify [relationships to export](#relationships-to-export).
108
112
109
-
Nodes' matching and deduplicating are taken care of by CocoIndex, without additional configuration.
113
+
In addition, the same node may appear multiple times, from exported nodes and various relationships.
114
+
They should appear as the same node in the target graph database.
115
+
CocoIndex automatically [matches and deduplicates nodes](#nodes-matching-and-deduplicating) based on their primary key values.
If a node label needs to appear as source or target of a relationship, but not exported as a node, you need to [declare](../core/flow_def#target-declarations) the label with necessary configuration.
0 commit comments