Neo4j标记属性图的定义

Neo4j基于标记属性图模型,包括点、关系、属性和标签。点存储属性,类似文件,标签用于分组和角色标识。关系定向、命名,连接点并赋予结构,也可携带属性,增强图的语义表达。此模型适用于存储和查询具有复杂关系的数据。
摘要由CSDN通过智能技术生成

Neo4j所依赖的图模型,其学名为(标记)属性图模型。其定义如下:

  • 一个标记属性图由点、关系、属性以及标签组成
  • 点拥有属性。点就像一个文件,他以任意键值对的形式存储属性。在 Neo4j 中,键值是字符串,其值是Java 字符串、基元数据类型,以及这些类型的数组。
  • 点可以被多个标签标记。标签将点氛围不用组,并且标识点在数据集中的角色与作用。
  • 关系将点联系在了一起,并构成了图的结构。关系总是包含一个方向,一个名字和关系的起始点与终止点——没有悬空的关系。关系的方向和名称一起为节点的结构增加了语义清晰度。
  • 和点一样,关系和可以拥有属性。可以为关系增加属性的能力非常有用,尤其是为图算法提供额外的元数据、向关系添加其他语义(包括质量和权重),以及在运行时约束查询的时候。

英文原文:

基本定义(In Chapter 1):A labeled property graph has the following characteristics:

  • It contains nodes and relationships.
  • Nodes contain properties (key-value pairs).
  • Nodes can be labeled with one or more labels.
  • Relationships are named and directed, and always have a start and end node.
  • Relationships can also contain properties.

它的解释:
We introduced the labeled property graph model in Chapter 1. To recap, these are its salient features:

  • A labeled property graph is made up of nodes, relationships, properties, and labels.
  • Nodes contain properties. Think of nodes as documents that store properties in the form of arbitrary key-value pairs. In Neo4j, the keys are strings and the values are the Java string and primitive data types, plus arrays of these types.
  • Nodes can be tagged with one or more labels. Labels group nodes together, and indicate the roles they play within the dataset.
  • Relationships connect nodes and structure the graph. A relationship always has a direction, a single name, and a start node and an end node—there are no dangling relationships. Together, a relationship’s direction and name add semantic clarity to the structuring of nodes.
  • Like nodes, relationships can also have properties. The ability to add properties to relationships is particularly useful for providing additional metadata for graph algorithms, adding additional semantics to relationships (including quality and weight), and for constraining queries at runtime.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值