前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Nebula Graph】:数据模型

【Nebula Graph】:数据模型

作者头像
WEBJ2EE
发布2021-10-27 10:13:27
5640
发布2021-10-27 10:13:27
举报
文章被收录于专栏:WebJ2EE
代码语言:javascript
复制
目录
1. 数据模型

1. 数据模型

Nebula Graph data model uses six data structures to store data. They are:

  1. graph spaces
  2. vertices
  3. edges
  4. tags
  5. edge types
  6. properties

  • Graph spaces: Graph spaces are used to isolate data from different teams or programs. Data stored in different graph spaces are securely isolated. Storage replications, privileges, and partitions can be assigned. (图空间(Graph space)类似 Oracle 中的 User、MySql 中的 Database,图空间之间的数据相互隔离)
  • Vertices: Vertices are used to store entities.(顶点,用于储存实体且由 VID 在图空间中唯一标识)
    • In Nebula Graph, vertices are identified with vertex identifiers (i.e. VID). The VID must be unique in the same graph space. VID should be int64, or fixed_string(N).
    • A vertex must have at least one tag or multiple tags.
  • Edges: Edges are used to connect vertices. An edge is a connection or behavior between two vertices. (边,用于连接两个顶点)
    • There can be multiple edges between two vertices. (两个顶点之间可以有多条边)
    • Edges are directed. -> identifies the directions of edges. Edges can be traversed in either direction.(边是有方向的)
    • An edge is identified uniquely with a source vertex, an edge type, a rank value, and a destination vertex. Edges have no EID.
    • An edge must have one and only one edge type. (边,有且只能有一种边类型)
    • The rank value is an immutable user-assigned 64-bit signed integer. It identifies the edges with the same edge type between two vertices. Edges are sorted by their rank values. The edge with the greatest rank value is listed first. The default rank value is zero. (等级值在边排序的时候有用,越大越靠前)
  • Tags: Tags are used to categorize vertices. Vertices that have the same tag share the same definition of properties. (标签,用于给顶点分类)
  • Edge types: Edge types are used to categorize edges. Edges that have the same edge type share the same definition of properties. (边属性,用于给边分类)
  • Properties: Properties are key-value pairs. Both vertices and edges are containers for properties.(属性,键值对,顶点和边上都可以有属性)

参考:

Data modeling: https://docs.nebula-graph.io/2.5.1/1.introduction/2.data-model/

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2021-10-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 WebJ2EE 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档