1.
Graph Fundamentals
Basic concepts to get you going.
A graph database can store any kind of data using a few simple concepts:
Nodes - graph data records
Relationships - connect nodes
Properties - named data values
图形基础
让你前进的基本概念。
图形数据库可以使用几个简单的概念存储任何类型的数据:
节点-图形数据记录
关系-连接节点
属性-命名数据值
2.
A Graph Database
Neo4j stores data in a Graph, with records called Nodes.
The simplest graph has just a single node with some named values called Properties. Let's draw a social graph of our friends on the Neo4j team:
Start by drawing a circle for the node
Add the name Emil
Note that he is from Sweden
Nodes are the name for data records in a graph
Data is stored as Properties
Properties are simple name/value pairs
图形数据库
NEO4J将数据存储在一个图表中,其中的记录称为节点。
最简单的图只有一个节点,其中一些命名值称为属性。让我们画一张NEO4J团队中朋友的社交图:
从为节点绘制圆开始
添加名字emil
注意他是瑞典人
节点是图表中数据记录的名称
数据存储为属性
属性是简单的名称/值对
3.
Labels
Associate a set of nodes.
Nodes can be grouped together by applying a Label to each member. In our social graph, we'll label each node that represents a Person.
Apply the label "Person" to the node we created for Emil
Color "Person" nodes red
A node can have zero or more labels
Labels do not have any properties
标签
关联一组节点。
通过对每个成员应用标签,可以将节点组合在一起。在我们的社会关系图中,我们将标记每个代表一个人的节点。
将标签“person”应用于我们为emil创建的节点
将“人”节点涂成红色
节点可以有零个或多个标签
标签没有任何属性
4.
More Nodes
Schema-free, nodes can have a mix of common and unique properties.
Like any database, storing data in Neo4j can be as simple as adding more records. We'll add a few more nodes:
Emil has a klout score of 99
Johan, from Sweden, who is learning to surf
Ian, from England, who is an author
Rik, from Belgium, has a cat named Orval
Allison, from California, who surfs
Similar nodes can have different properties
Properties can be strings, numbers, or booleans
Neo4j can store billions of n