Neo4j 简明教程
Neo4j - Data Model
Neo4j Property Graph Data Model
Neo4j 图形数据库遵循属性图形模型来存储和管理其数据。
Neo4j Graph Database follows the Property Graph Model to store and manage its data.
以下是属性图形模型的关键特性 -
Following are the key features of Property Graph Model −
-
The model represents data in Nodes, Relationships and Properties
-
Properties are key-value pairs
-
Nodes are represented using circle and Relationships are represented using arrow keys
-
Relationships have directions: Unidirectional and Bidirectional
-
Each Relationship contains "Start Node" or "From Node" and "To Node" or "End Node"
-
Both Nodes and Relationships contain properties
-
Relationships connects nodes
在属性图形数据模型中,关系应该是方向性的。如果我们尝试创建没有方向的关系,那么它将抛出一个错误消息。
In Property Graph Data Model, relationships should be directional. If we try to create relationships without direction, then it will throw an error message.
在 Neo4j 中,关系也应该是方向性的。如果我们尝试创建没有方向的关系,那么 Neo4j 将抛出一个错误消息,指出“关系应该是方向性的”。
In Neo4j too, relationships should be directional. If we try to create relationships without direction, then Neo4j will throw an error message saying that "Relationships should be directional".
Neo4j 图形数据库将所有数据存储在节点和关系中。我们既不需要任何附加的 RRBMS 数据库,也不需要任何 SQL 数据库来存储 Neo4j 数据库数据。它以其本机格式以图形的形式存储其数据。
Neo4j Graph Database stores all of its data in Nodes and Relationships. We neither need any additional RRBMS Database nor any SQL database to store Neo4j database data. It stores its data in terms of Graphs in its native format.
Neo4j 使用 Native GPE(图形处理引擎)来处理其 Native 图形存储格式。
Neo4j uses Native GPE (Graph Processing Engine) to work with its Native graph storage format.
图形数据库数据模型的主要构建模块有 -
The main building blocks of Graph DB Data Model are −
-
Nodes
-
Relationships
-
Properties
以下是属性图形的一个简单示例。
Following is a simple example of a Property Graph.

在这里,我们使用圆圈表示节点。关系使用箭头表示。关系是方向性的。我们可以用属性(键值对)表示节点的数据。在此示例中,我们在节点的圆圈内表示了每个节点的 ID 属性。
Here, we have represented Nodes using Circles. Relationships are represented using Arrows. Relationships are directional. We can represent Node’s data in terms of Properties (key-value pairs). In this example, we have represented each Node’s Id property within the Node’s Circle.