Creating Uniqueness Constraints
2.2 · Video Lesson

Creating Uniqueness Constraints

A best practice is to identify a Full definition for property (opens in a new tab)A named value stored on a node or a relationship. for all Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. in the graph that make them unique. In our movie graph, these Full definition for constraint (opens in a new tab)A rule the database enforces on every node or relationship with a given label or type, rejecting any write that breaks it. are:

  • Movie nodes use movieId.
  • Person nodes use tmdbId.
  • User nodes use userId.
  • Genre nodes use name.