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

      Constraints

      Overview

      Constraints enforce rules on the property values of nodes and edges in the graph. Any attempt to insert or update data that violates these rules will result in an error.

      The following constraints are supported:

      Showing Constraints

      To retrieve all constraints created on node properties in the current graph:

      SHOW NODE CONSTRAINT
      

      To retrieve all constraints created on edge properties in the current graph:

      SHOW EDGE CONSTRAINT
      

      The information about constraints is organized into the _nodeConstraint or _edgeConstraint table, including the following fields:

      Field
      Description
      name Constraint name.
      type Constraint type.
      schema The node or edge schemas where the constraint applies.
      properties The node or edge properties where the constraint applies.
      status Constraint status, which can be DONE or CREATING.

      Creating Constraints

      You can define constraints when creating a graph, defining a graph type, or within an existing graph. The examples below demonstrate how to create constraints in an existing graph using the ALTER NODE or ALTER EDGE statements. In these cases, constraint creations execute as a job, you may run SHOW JOB <id?> afterward to verify its success. To learn how to include constraints during graph or graph type creation, see Graph.

      Note that creating a constraint in a large, active graph may take time, as the system must scan all existing data to ensure compliance. The creation will fail if any existing data violates the constraint. To maintain data consistency, all other data modification operations are temporarily suspended during the constraint creation process.

      NOT NULL

      The NOT NULL constraint enforces a property cannot have null values, ensuring that a value is always provided. Note that a NOT NULL constraint can be defined only on a single property of a single schema.

      To create a NOT NULL constraint on the property name of the user nodes:

      ALTER NODE user ADD CONSTRAINT NOT NULL ON name
      

      To create a NOT NULL constraint on the property weight of the link edges:

      ALTER EDGE link ADD CONSTRAINT NOT NULL ON weight
      

      These constraints can only be successfully created when there is no null values exist in the specified property.

      EDGE KEY

      An EDGE KEY constraint designates one or multiple edge properties as the unique identifier for all edges in the graph, ensuring that these properties are both non-null and unique. When multiple properties are specified, it is also referred to as a composite EDGE KEY.

      Details

      • Only one EDGE KEY can be defined per graph - either a single-property EDGE KEY or a composite EDGE KEY.
      • EDGE KEY doesn't apply to properties of the type LIST.
      • EDGE KEY properties are automatically cached to accelerate query performance.
      • When the EDGE KEY is created, uniqueness is enforced within each shard. Duplicates may exist across shards at creation time, but all subsequent data modifications must comply with global uniqueness.

      Single-Property EDGE KEY

      ALTER EDGE * ADD CONSTRAINT EDGE KEY ON eID INT32
      

      To successfully create the EDGE KEY:

      • All edge schemas in the graph must possess an eID property of type INT32.
      • eID doesn’t contain existing null or duplicated values.

      When the property value type is not specified, it defaults to STRING:

      ALTER EDGE * ADD CONSTRAINT EDGE KEY ON tag
      

      In this case, all edge schemas must have a tag property of type STRING.

      Composite EDGE KEY

      ALTER EDGE * ADD CONSTRAINT EDGE KEY ON eID INT32, tag STRING
      

      To successfully create the EDGE KEY:

      • All edge schemas in the graph must possess an eID property of type INT32 and a tag property of type STRING.
      • Neither eID nor tag may contain existing null values.
      • The combination of eID and tag must not contain any duplicated values.

      Using IF NOT EXISTS

      The IF NOT EXISTS clause is used to prevent errors when attempting to create a constraint that already exists. It allows the statement to be safely executed.

      ALTER NODE user ADD CONSTRAINT IF NOT EXISTS NOT NULL ON name
      

      This creates the constraint only if there is no existing NOT NULL constraint on the name property of user nodes. If such a constraint already exists, the statement is ignored without throwing an error.

      Dropping Constraints

      A constraint can be dropped with the ALTER NODE or ALTER EDGE statement.

      To drop the EDGE KEY constraint from the current graph:

      ALTER EDGE * DROP EDGE KEY
      

      To drop the NOT NULL constraint on the name property of user nodes:

      ALTER NODE user DROP CONSTRAINT NOT NULL ON name
      

      Restrictions on Properties with Constraints

      Renaming Properties

      Properties with the NOT NULL constraints can be renamed. However, renaming properties with an EDGE KEY constraint is not allowed.

      Dropping Properties

      A property with a constraint cannot be dropped until all the related constraints are deleted.

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

      Copyright © 2019-2025 Ultipa Inc. – All Rights Reserved   |  Security   |  Legal Notices   |  Web Use Notices