Reputation: 131
I'm attempting to use Neo4J to model user mobile devices. However, I'm a complete newbie with graph databases and I'm a little confused on how to make the connections.
For example:
I need to be able to query the following information rapidly:
What is confusing me is that I want to connect users with the same device together (ie: Device 1), however, the devices are slightly different (ie: carriers). If I attempt to use the same node, I will lose the information on which path is for which user.
What is the best practice when modeling a graph database? Should I just create different device nodes for different device configurations? Is it bad practice having multiple "Device 1" nodes?
Thanks in advance...
Upvotes: 0
Views: 246
Reputation: 72
I'm a newbie as well, but the best thing to do is to start. This book is a great resource for best practices.
I think that you could have different device nodes with properties such as 'os:os1'. And these devices would have a relationship to a carrier node.
For example: (A) --owns--> (Device 1 os:os1) --uses--> (Carrier1)
Each device would be its own node. Best thing is to play around with it. A good resource for this is to use the cypher console. You can test ideas and share them.
Hope this helps
Upvotes: 1