Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of uppercase, lowercase, numbers, and special characters (such as @*&#).
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Certifications

Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Invoice

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File
v4.3
Search
    中文EN
    v4.3

      Graph Data

      This page explains what graph data looks like and how they are described in UQL. This must be mastered before leanring and using Ultipa Graph System.

      Graph Data

      Chart1: Areith works as Waiter

      Node

      The two circles Areith and Waiter shown in Chart1 are nodes.
      Nodes represent entities in the world.

      Edge

      The black arrow workAs in Chart1 is an edge, it points from Areith to Waiter.
      Edges represent relations between entities.

      Schema

      The Person, Job and workAs in the code in Chart1 are schemas.
      Schemas represent different types of node or edge.

      Property

      The name and title in the code in Chart1 are properties.
      Properties are the components of a schema to describe in detail the type of node or edge this schema represents.

      Path

      Chart2: A graph of 3 node schemas and 2 edge schemas

      The sequence of connected and alternating nodes and edges Areith, worksAs and Waiter in Chart2 is a path. Another sequence Waiter, worksAs, Areith, studyAt, Oxford is also a path.
      A path starts from and ends with node, contains at least one edge. It represents multi-step correlations of entities, which makes it the most queried in graph computing.

      Describe Nodes

      Chart3: Describing nodes

      There are a bunch of parameters that can describe node(s) in UQL. Take parameter n() as an example:

      n()									// any node in the graph
      n({@Student})						// nodes of schema 'Student'
      n({name == "Jason"})				// nodes whose property 'name' is 'Jason'
      n({@Student.name == "Jason"})		// nodes of schema 'Student' whose property 'name' is 'Jason'
      n(as a)								// any node in the graph, and give these nodes an alias 'a'
      n({@Student} as a)					// ...
      ...
      

      Features of describing nodes using n():

      • An empty n() sets no particular requirements on nodes
      • Filtering schema requires symbol @
      • Schema and property can be filtered in combinition or separately
      • Assigning alias to the found nodes requires keyword as

      All parameters that can describe node(s) in UQL:

      • nodes(): used in node query, update and deletion
      • n(): used in template query (a type of path query)
      • nf(): used in template query
      • src(): used in non-template path query
      • dest(): used in non-template path query
      • node_filter(): used in non-template path query

      Describe Edges

      Chart4: Describing edges

      Take e() as an example to see how edges can be described:

      e()									// any edge in the graph
      e({@workAs})						// edges of schema 'workAs'
      e({since == 2012})					// edges whose property 'since' is '2012'
      e({@workAs.since == 2012})			// edges of schema 'workAs' whose property 'since' is '2012'
      e(as b)								// any edge in the graph, and give these edges an alias 'b'
      e({@workAs} as b)					// ...
      ...
      

      Similar with describing nodes using n(), describing edges using e() has below features:

      • An empty e() sets no particular requirements on edges
      • Filtering schema requires symbol @
      • Schema and property can be filtered in combinition or separately
      • Assigning alias to the found edges requires keyword as (note: e() does not always supports defining alias)

      All parameters that can describe edge(s) in UQL:

      • edges(): used in edge query, update and deletion
      • e(): used in template query
      • le(): used in template query
      • re(): used in template query
      • edge_filter(): used in non-template path query

      Describe Paths (Template)

      Chart5: Describing paths

      Paths described using n() and e() are template:

      // any 1-hop path in the graph
      n().e().n()
      
      // any 2-hop path in the graph
      n().e().n().e().n()
      n().e()[2].n()
      
      // 1-hop paths 'Person-workAs-waiter'
      // give these Person an alias 'individual', give these paths an alias 'career'
      n({@Person} as individual).e({@workAs}).n({@Job.title == "Waiter"}) as career
      
      // 2-hop paths 'Areith-workAs-Job-workAs-Person'
      // give these Job an alias 'job', give these Person at the end an alias 'other'
      n({@Person.name == "Areith"}).e({@workAs}).n({@Job} as job).e({@workAs}).n({@Person} as other)
      
      ...
      

      Features of path template:

      • Path templates are as intuitive as how they are visualized in a graph
      • Alias can be assigned for a single node, edge, as well as the whole path
      Chart6: Same graph data described as different templates

      Are the two paths described in Chart6 the same? As paths in Ultipa are composed and parsed from left to right, the two templates are not the same, but they do describe the same graph data.

      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写