Creating Uniqueness Constraints
2.3 · Challenge

Creating Uniqueness Constraints

In our Movie Full definition for data model (opens in a new tab)The labels, relationship types and properties chosen to represent a domain., we want to ensure that Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. are unique. In your real application, you would create uniqueness 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. for nodes prior to loading the data. For this course, we already have the data loaded, but we still want to constrain the graph so that nodes are unique.

In the previous lesson, you executed code to create a uniqueness constraint for Movie nodes. In this Challenge, you will create three more uniqueness constraints in the graph.