Creating Uniqueness Constraints
In our Movie iFull 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 iFull 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 iFull 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.
Join GraphAcademy to keep learning
Create your account to unlock 80+ hours of hands-on Neo4j courses, track your progress, and earn a certificate when you complete the course.
Sign in or register