Neo4j(二)——文档说明阅读

反正以后估计不咋会看,一开始就看看留点印象吧。


目录

1、图基础 Graph Fundamentals

2、图数据库 A Graph Database

3、标签 Labels

4、更多节点 More Nodes

5、关系 Consider Relationships

6、关系属性 Relationship properties


1、图基础 Graph Fundamentals

图形数据库可以使用一些简单的概念存储任何类型的数据:

节点——图数据记录      (Nodes——graph data records)

关系——连接节点          (Relationships——connect nodes)

属性——命名数据值      (命名属性值)

2、图数据库 A Graph Database

最简单的图只有有属性值的一个节点。The simplest graph has just a single node with some named values called Properties.

下面以绘制一个社交圈为例

eg. 绘制一个社交圈

  • 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
  • 属性是简单的name/value对  Properties are simple name/value pairs

3、标签 Labels

——Associate a set of nodes  关联一组节点

Nodes can be grouped together by applying a Label to each member. 通过标签可以将节点组织在一起

A node can have zero or more labels. 一个节点可以有零个或多个标签
Labels do not have any properties.标签没有任何属性

eg

Apply the label "Person" to the node we created for Emil
Color "Person" nodes red

将标签“ Person”应用于我们为Emil创建的节点
颜色“ Person”节点为红色

4、更多节点 More Nodes

——Schema-free, nodes can have a mix of common and unique properties.

schema-free的节点可以混用通用属性和唯一属性

Similar nodes can have different properties
Properties can be strings, numbers, or booleans
Neo4j can store billions of nodes

eg.

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

5、关系 Consider Relationships

——Connect nodes in the graph

The real power of Neo4j is in connected data. To associate any two nodes, add a Relationship which describes how the records are related.

Relationships always have direction
Relationships always have a type
Relationships form patterns of data

eg.

In our social graph, we simply say who KNOWS whom:

Emil KNOWS Johan and Ian
Johan KNOWS Ian and Rik
Rik and Ian KNOWS Allison

6、关系属性 Relationship properties

Store information shared by two nodes.
In a property graph, relationships are data records that can also contain properties. 

关系也可以是包含属性的数据记录,如

eg

Emil has known Johan since 2001
Emil rates Ian 5 (out of 5)
Everyone else can have similar relationship properties

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值