I'm building a node-based application using Neo4j as the database to manage nodes and edges. I want to know if it is possible to store multiple users' node and edge data in Neo4j, considering it lacks the traditional RDBMS structure that other non-graph databases support.
You could store a user id property on every node to identify the owner of the node. You will need to include this property in all you queries to limit results to the correct user.
If you have the enterprise enterprise edition, you could store each user’s data in a separate graph. You will need to track each user’s graph and switch to that graph in your query.
Is this what you meant ?
Yes, @glilienfield, that's exactly what I mean. Your idea of adding a user ID property provides a clear solution to my problem. However, I have a question about this approach: as the user's data grows, won't it become more complex to manage? Could this complexity be addressed by creating separate graphs for each user, even if their data becomes increasingly complicated?
If you have the enterprise enterprise edition, you could store each user’s data in a separate graph. You will need to track each user’s graph and switch to that graph in your query.
@glilienfield Could you please tell more about this feature?
Also, I found this answer: Best way to store multiple graphs for different users - #2 by glilienfield
- Store each user’s graph in a separate database. You can have the database automatically selected for the user by using ‘home databases’ or maintain your own mapping and specify the database when you create the session.
Isn't it too heavy to create a new database for each dedicated user? Is there any information on how each db may affect performance / consume resources?