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.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Blaze (v4)

Standalone

Please complete this required field.

Please complete this required field.

Please complete this required field.

Please complete this required field.

Leave it blank if an HDC service is not required.

Please complete this required field.

Leave it blank if an HDC service is not required.

Please complete this required field.

Please complete this required field.

Mac addresses of all servers, separated by line break or comma.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Maximum Shard Services
Maximum Total Cores for Shard Service
Maximum HDC Services
Maximum Total Cores for HDC Service
Applied Validity Period(days)
Effective Date
Expired Date
Mac Address
Reason for Application
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
Change Password
Apply

You have no license application record.

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

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      HDC Graph Queries

      Overview

      To execute a query on an HDC graph, use the syntax:

      EXEC{
        <query>
      } ON <hdcGraphName>
      

      HDC graphs support queries that retrieve data from the database with enhanced efficiency, but do not allow operations that modify the graph structure or data.

      Example Graph

      Run the following statements on an empty graph to define its structure and insert data:

      ALTER GRAPH CURRENT_GRAPH ADD NODE {
        entity ()
      };
      ALTER GRAPH CURRENT_GRAPH ADD EDGE {
        link ()-[{weight float}]->()
      };
      INSERT (A:entity {_id: "A"}),
             (B:entity {_id: "B"}),
             (C:entity {_id: "C"}),
             (D:entity {_id: "D"}),
             (A)-[:link {weight: 1}]->(B),
             (A)-[:link {weight: 1.5}]->(C),
             (A)-[:link {weight: 0.5}]->(D),
             (B)-[:link {weight: 2}]->(C),
             (C)-[:link {weight: 0.5}]->(D);
      

      Queries on HDC Graphs

      To create an HDC graph hdcGraph of the entire graph:

      CREATE HDC GRAPH hdcGraph ON "hdc-server-1" OPTIONS {
        nodes: {"*": ["*"]},
        edges: {"*": ["*"]},
        direction: "undirected",
        load_id: true,
        update: "static",
        query: "query",
        default: false
      }
      

      To run a query on hdcGraph:

      EXEC{
        MATCH p = ({_id: "A"})-[]-{2}({_id: "C"})
        RETURN p
      } ON hdcGraph
      

      Result: p

      Limited Graph Traversal Direction

      If an HDC graph is created with the direction option set to in or out, graph traversal is restricted to incoming or outgoing edges, respectively. Queries attempting to traverse in the missing direction throw errors or yield empty results.

      To create an HDC graph hdcGraph_in_edges of the graph with nodes and incoming edges:

      CREATE HDC GRAPH hdcGraph_in_edges ON "hdc-server-1" OPTIONS {
        nodes: {"*": ["*"]},
        edges: {"*": ["*"]},
        direction: "in",
        load_id: true,
        update: "static",
        query: "query",
        default: false
      }
      

      This query attempts to traverse the outgoing edges from node A on hdcGraph_in_edges, but no result will be returned:

      EXEC{
        MATCH p = ({_id: "A"})-[]->()
        RETURN p
      } ON hdcGraph_in_edges
      

      Exclusion of Node IDs

      If an HDC graph is created with the load_id option set to false, it does not contain the _id values for nodes. Queries referencing _id throw errors or yield empty results.

      CREATE HDC GRAPH hdcGraph_no_id ON "hdc-server-1" OPTIONS {
        nodes: {"*": ["*"]},
        edges: {"*": ["*"]},
        direction: "undirected",
        load_id: false,
        update: "static",
        query: "query",
        default: false
      }
      

      This query utilizes _id to filter nodes on hdcGraph_no_id, error occurs as the HDC graph lacks nodes' _id:

      EXEC{
        MATCH p = ({_id: "A"})-[]-{2}({_id: "C"})
        RETURN p
      } ON hdcGraph_no_id
      

      Exclusion of Properties

      If an HDC graph is created without certain properties, queries referencing these properties throw errors or yield empty results.

      To create an HDC graph hdcGraph_no_weight of the graph, which includes all node properties but only the system properties of link edges:

      CREATE HDC GRAPH hdcGraph_no_weight ON "hdc-server-1" OPTIONS {
        nodes: {"*": ["*"]},
        edges: {"link": []},
        direction: "undirected",
        load_id: true,
        update: "static",
        query: "query",
        default: false
      }
      

      This query utilizes the weight property to filter edges on hdcGraph_no_weight, but no result will be returned since the HDC graph doesn't have the weight property:

      EXEC{
        MATCH p = ({_id: "A"})-[e]-() WHERE e.weight > 1
        RETURN p
      } ON hdcGraph_no_weight
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      Privacy Policy.
      Please agree to continue.