Graph Store Model in Neo4j

Neo4j是一个开源的图数据库,自2007年起提供ACID兼容的事务后端。数据以节点、关系和属性的形式组织。节点带有标签,表示不同角色,关系则是两个节点之间的定向连接,两者都可拥有属性。图存储模型中,每个顶点记录包含指向边的指针以及元数据,每条边记录包含关系标签、连接的顶点指针及前后边指针。
摘要由CSDN通过智能技术生成

Neo4j

Neo4j is an open-source, NoSQL, native graph database that provides an ACID-compliant transactional backend for your applications that has been publicly available since 2007. This article only focus on graph store model of Neo4j.

Property Graph

In property graph, information is organized as nodes, relationships, and properties.[2]

Nodes are the entities in the graph.

  • Nodes can be tagged with labels, representing their different roles in your domain. (For example, Person).
  • Nodes can hold any number of key-value pairs, or properties. (For example, name)
  • Node labels may also attach metadata (such as index or constraint information) to certain nodes.

Relationships provide directed, named, connections between two node entities (e.g. Person LOVES Person).

  • Relationships always have a direction, a type, a start node, and an end node, and they can have properties, just like nodes.
  • Nodes can have any number or type of relationships without sacrificing performance.
  • Although relationships are always directed, they can be navigated efficiently in any direction.

Graph Store Model

The following figure[3] details a simple example of an property graph in Neo4j. Here three vertices v 1 v_{1} v1, v 2 v_{2} v2, v 3 v_{3} v3 are connected via different edges e 1 e_{1} e1, e 2 e_{2} e2, . . . e 5 e_{5} e5. The edges have labels l 1 l_{1} l1, l 2 l_{2} l2 which represents different relationships between the connected vertices.

In this model, each vertex record contains a pointer to the first edge and additional metadata such as a pointer to vertex properties. Each edge record contains the label representing the relationship between the connected vertices, pointers to the vertex pairs connected by the edge, and the pointers for previous and next edges for each vertex. The vertex and edge records for the graph at Figure 1 are shown in Table I.

reference

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值