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.

What's the point to have an additional identification property if you never use it in a query?

The main question say everything.

While I was reading the Graph Data Modelling Core Principles chapter in the Graph Data Modeling for Neo4j online course, I found this citation interesting:

Here, we have added a geolocation property to do so. The geolocation property will likely never be used in a query, but it can be used to differentiate nodes.

The point to differentiate nodes is to be able to anchor or Traverse the graph more efficiently? So why adding properties in a node to create a unique node key if you never use it?

1 ACCEPTED SOLUTION

@tard.gabriel it is used to enforce uniqueness of nodes without need to use multiple properties to constrain uniqueness. The creation of the node may be the only operation that checks the value.

Elaine

View solution in original post

4 REPLIES 4

@tard.gabriel it is used to enforce uniqueness of nodes without need to use multiple properties to constrain uniqueness. The creation of the node may be the only operation that checks the value.

Elaine

clem
Graph Steward

I think you can't necessarily know that geolocation will never be used.

It's better to have and not need (less memory is an issue) than need and not have.

I think the beauty of Neo4J it is flexible about your data so that you are freer to make queries you hadn't thought about previously.

I read a little bit more carefully the chapter and it said basically it can help if only needed for uniqueness if there is no other way.

So it won't be use for read query but it will be used for index, constraint, merge query to make sure the graph is coherence and clean. Duplicates can be deadly for application like fraud detection.

The geolocation property will likely never be used in a query.
I would change this by:
The geolocation property will likely never be used in a read only query.

Thank you @tard.gabriel and @clem .

I will make the wording more precise in the course.

Elaine

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online