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 Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
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

      Schema

      Overview

      In Ultipa, a schema represents a node or edge type. Schemas are integral to the graph structure and must be defined before any node or edge data can be inserted. Each node or edge is assigned to exactly one schema.

      In UQL, the operator @ denotes a schema. The expression @<schema> specifies a particular schema, such as @Account.

      Schema in UQL analogous a label in GQL.

      Default Schemas

      Each graphset comes with a built-in node schema and edge schema, both named default. The two default schemas are available for unrestricted use but cannot be deleted. Additionally, their names and descriptions cannot be altered.

      Showing Schemas

      To retrieve information about schemas in current graphset:

      // Shows all schemas 
      show().schema()
      
      // Shows all node schemas 
      show().node_schema()
      
      // Shows the specified node schema
      show().node_schema(@user)
      
      // Shows all edge schemas 
      show().edge_schema()
      
      // Shows the specified edge schema
      show().edge_schema(@transfers)
      

      The information about schemas is organized into different tables:

      • Node schemas: Stored in _nodeSchema (all schemas) and _nodeSchema_shard_N (schemas with data in shard N) tables.
      • Edge schemas: Stored in _edgeSchema (all schemas) and _edgeSchema_shard_N (schemas with data in shard N) tables.

      Each table includes fields that provide essential details about each schema:

      Field
      Description
      id The id of the schema.
      name The name assigned to the schema.
      description The description given to the schema.
      status The current state of the schema, which can only be CREATED.
      properties The custom properties of the schema, with each property contains fields: name, id, type, description, index, fulltext, nullable, and lte.

      There is another table _graphCount which gives an overview of node and edge counts across schemas. For example:

      type schema from_schema to_schema count
      total_nodes 304
      node account 120
      node movie 184
      total_edges 956
      edge rate account movie 568
      edge follow account account 388
      • The count of total_nodes is the sum of nodes across all the listed node schemas.
      • The count of each individual node schema is the total number of nodes belonging to that specific schema.
      • The count of total_edges is the sum of edges across all the listed edge schemas.
      • The count of each individual edge schema is the number of edges belonging to that specific schema while connecting a from_schema node to a to_schema node.

      Creating Schemas

      You can create one or more schemas using a single create() statement. Each schema is specified by chaining a node_schema() or edge_schema() method.

      create()
        .node_schema("<schemaName>", "<schemaDesc?>")
        .edge_schema("<schemaName>", "<schemaDesc?>")
        ...
      
      Method Param Description
      node_schema() or edge_schema() <schemaName> Name of the schema. Naming conventions are:
      • 2 to 64 characters.
      • Cannot start with a tilde (~).
      • Cannot contain backquotes (`) or the name of any system properties, system table aliases and system aliases (refer to Reserved Keywords).
      Names must be unique among node schemas and among edge schemas, but a node schema and an edge schema may share the same name.
      <schemaDesc?> Optional. Description of the schema.

      To create a node schema:

      create().node_schema("user", "Self-registeration")
      

      To create an edge schema:

      create().edge_schema("likes")
      

      To create multiple schemas:

      create()
        .node_schema("user", "Self-registeration")
        .node_schema("movie")
        .edge_schema("likes")
      

      Altering Name and Description

      You can modify name and description of a schema using the alter().node_schema().set() or alter().edge_schema().set() statement. The two default schemas cannot be altered.

      To alter both name and description of the node schema @user:

      alter().node_schema(@user).set({name: "User", description: "club users"})
      

      To alter name and remove description of the edge schema @join:

      alter().edge_schema(@join).set({name: "joins", description: ""})
      

      To alter name of the node schema @account:

      alter().node_schema(@account).set({name: "user"})
      

      To alter description of the edge schema @link:

      alter().edge_schema(@link).set({description: "the link between people and event"})
      

      Dropping Schemas

      You can drop one or more schemas using a single drop() statement. Each schema is specified by chaining a node_schema() or edge_schema() method. The schema dropping operation runs as a job, you may run show().job(<id?>) afterward to verify its completion.

      Dropping a schema deleting the schema along with any nodes or edges belonging to it from the database. Note that the deletion of a node leads to the removal of all edges that are connected to it. The two default schemas cannot be dropped.

      To drop the node schema @user:

      drop().node_schema(@user)
      

      To drop the edge schema @likes:

      drop().edge_schema(@likes)
      

      To drop multiple schemas:

      drop().node_schema(@user).edge_schema(@likes)
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写