Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-05-2020 12:40 AM
Hey Everyone. I am building my first production project that is going to use Neo4j.
I am trying to model the organization Data.
Things I care about are:
So Basically my questions are
02-05-2020 01:22 AM
I would store an Employee node with the current parameters and store all changes in EmployeeChange nodes with relation to the Employee node. This "change" node can have the changed properties and a DateTime.
It would create very dense nodes though, hence the change nodes could benefit from also having a property with the employee id, and a composite index with DateTime and id, so you can do a range query for changes over a specific time period. Range queries with composite indexes are supported in Neo4j 4.0.
02-06-2020 01:32 AM
Thanks for your answer Thomas,
Is using DateTime as a property in the EmployeeChange/EmployeeState node has a benefit over saving a ValidFrom/ValidTo properties on the HAS_STATE edge { (:Employee)-[:HAS_STATE]->(:EmployeeChange)
02-06-2020 02:15 AM
Yes! As properties on edges (relationships) cannot be indexed. If they are indexed on the node instead, you can do indexed range queries 🙂
05-07-2022 02:02 AM
Hi @shahar, have you implemented EmployeeChange and if you can please share your experiences.
All the sessions of the conference are now available online