cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Constraints - Check your understanding

renatospaka
Graph Voyager

Hello guys.

Does anyone help me find the correct answers for this online course

I am "checking my understanding" and failed every attempt, so the remaining answers do not make sense for me at all.
3X_6_2_62b4ed2d66d82b65033ff7b9d7f51fc584c980a8.png

Regards

4 REPLIES 4

It is possible to create a node key constraint based upon a single property,

Elaine

Good to know that one property defines a node key. I was pretty sure it should be at least two to create a node key.

Thanks Eliane

I was curious too and read about it.

And yes, I just test it, you can create a node key constraint with only one property because the node key is creating both a uniqueness AND an existence constrain on that property.

I guess when you are sure to need both of these constraints on a property it's better for performance reason to do it this way instead of applying both individually.

renatospaka
Graph Voyager

Makes sense, @tard.gabriel