Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-28-2022 09:42 AM
I have an UML diagram that describe a classification tree with a three level hierarchy of classes
: Just imagine A
, B
and C
where A
is the top level class and B IS_A A
and C IS_A B
.
Each class has it's own properties and the classes at the lower level of the hierarchy inherits the properties of the parent class.
Which is the best way to implement this using neo4j?
My preferred is to create a node with label :A,
another with label :A:B
and the last with label :A:B:C
But it mixes up all the properties and I cannot see only the :A subset of properties of an A:B:C node.
Another approach is to create just one A nodes, one B nodes and one C nodes and relate them with an IS_A relationship.
Then I can create a new node named 'doe` and a relationship IS_ISTANCE_OF between this and A or B or C. But I don't like.
Any suggestion?
04-28-2022 11:26 AM
How are these nodes going to be used? What kind of queries or operations need to be performed on these nodes?
04-28-2022 11:33 AM
Well, the question is more complicated.
The tree, which is more complex, represent a list of hw devices: the top level is the provider, the second level is the device, the third level is the model, the fourth level is the version.
There is another tree: User and roles: a user can have multiple roles.
But Imagine I have three kind of roles: owner, employee, administrator
I want to associate to each type of fourth level devices a set of permission for each abstract role.
Then I want to connect a User with each of the possible roles he can cover.
Finally, I want to know what are the permissions of the user JohnDoe with a specific role, on a specific level4 device.
I hope to have explained the goal.
04-28-2022 02:34 PM
You are correct; there is a low to unpack there.
Questions:
04-29-2022 04:16 AM
05-05-2022 09:22 AM
Sorry, I have been sick for over a week. Are you still looking at this, or have you solved your problem?
05-05-2022 10:27 AM
Well, I'm working on it, but I have more substantial troubles, where the manual suggest a syntax but it returns an error. I'll post it. Stay well and recover!
And, if you want to give a look at this https://community.neo4j.com/t/auto-transaction-doesnt-run-as-described-in-the-manual/55847
05-05-2022 10:58 AM
I checked the link. Try this:
:auto LOAD CSV WITH HEADERS FROM 'file:///transactions.csv' AS row FIELDTERMINATOR ';'
WITH row WHERE row.id IS NOT NULL
CALL
{
WITH row
05-06-2022 08:52 AM
@ameyasoft : we are going ahead, check this thread if you like! Thank you! https://community.neo4j.com/t/auto-transaction-doesnt-run-as-described-in-the-manual/55847
All the sessions of the conference are now available online