Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-08-2022 05:12 AM
I am working on a project where it could be useful to use triggers to update nodes and their associated relationships. In the context of this project there will be around 200.000 nodes and about 150 triggers.
Updates occur at least once per day on the nodes and for each update all triggers start, later maybe also once per hour.
My questions:
First, is it smart to use triggers for extensive operations on the database in a live scenario regarding inconsistencies?
Is it even traceable/auditable which trigger made a certain change afterwards and is it easy to rollback the change?
Is it best practice for live environments in regards of consistency? We are afraid it isn’t and moreover performance will drop.
Alternatively, we think about a classification mechanism which classifies our nodes according to some rules. What is better?
08-09-2022 06:22 AM
No I don't think it's a good idea to use triggers for this. If you have an explicit operation for these updates, just have a job or script to execute these updates in a consistent manner.
If you want auditing and more traceability, then using a tool like neo4jmigrations or liquibase for neo4j to execute these updates and then increment the db-version might make more sense.
08-11-2022 01:16 AM
Thanks for your answer, i will look into the two tools you mentioned.
Another approach we were thinking about is using node classification with gdsl maybe, so we would use a training set to train a model how to classify our nodes. Do you think that this is a viable alternative ?
All the sessions of the conference are now available online