Cypher

unique constraint

A constraint that permits only one node or relationship with a given property value for its label or type.

Example

No two (:Movie) nodes may hold the same movieId.

cypher
CREATE CONSTRAINT Movie_movieId_unique IF NOT EXISTS
FOR (m:Movie) REQUIRE m.movieId IS UNIQUE

A write creating a second (:Movie) with a movieId already in the graph is rejected, and its transaction fails. A (:Movie) carrying no movieId at all is stored, because the constraint compares the values that exist.

Lessons that use this term

The lesson and course links below open in a new tab.

9 lessons use this term. Results are ordered by term density.

Using Neo4j with Python5 mentions

  • Handling Database ErrorsBest practicescommon scenario is dealing with constraint violations when inserting data. A unique constraint ensures that a property value is unique across all nodes with a specific4 mentions
  • Handling errorsBest practicesof the setup, you have added a unique constraint on the email property for the1 mention

Using Neo4j with .NET3 mentions

  • Error handlingBest practicescommon scenario is dealing with constraint violations when inserting data. A unique constraint ensures that a property value is unique across all nodes with a specific3 mentions

Using Neo4j with Java4 mentions

  • Handling errorsBest practicesof the setup, you have added a unique constraint on the email property for the1 mention
  • Handling Database ErrorsBest practicescommon scenario is dealing with constraint violations when inserting data. A unique constraint ensures that a property value is unique across all nodes with a specific3 mentions

Using Neo4j with LangChain3 mentions

  • Neo4jGraphNeo4j and LangChainUser: Has an index on name and a unique constraint on3 mentions

Importing CSV data into Neo4j2 mentions

  • Unique IDs and ConstraintsCreating Nodes, Properties, and Relationshipssyntax for creating a unique constraint on a property2 mentions

Importing Data into Neo4j Workshop1 mention

  • Unique IDs and ConstraintsNeo4j Data Importerthe unique ID for the Movie node to movieId, a unique constraint named movieId_Movie_uniq is created1 mention

Importing Data Fundamentals1 mention

  • Unique IDs and ConstraintsNeo4j Import toolthe unique ID for the Movie node to movieId, a unique constraint named movieId_Movie_uniq is created1 mention

All glossary terms