Hi all, please consider the following example. There are about 1000 User nodes with their properties like password and so on and about the same number of roles which can be associated with the users to indicate that the specific user is allowed to use the role. Since i found some postings in the mailing list from people having performance issues with REFERENCE properties, my question is what would be the best method linking the users to the roles?
1. REFERENCEs: The worst-case scenario is that every user is linked to every role which means 1000 * 1000 = 1M REFERENCE properties. If a role shall be deleted, the REFERENCE property of all 1000 users has to be found by back-referencing (very fast i think) and removed programmatically, since there is no cascaded delete available. What are the operations performed on the database regarding the REFERENCEs if operations are performed on the user or role nodes? 2. Bi-directional PATHs, UUIDs as String: Every user stores the PATHs or the UUIDs of the associated roles in a String property. To allow efficient back-referencing to all users associated with a role (for deleting the linking properties from the users), every role would additionally have to keep the UUID or PATH of all associated roles. This potentially means that every user has 1000 PATHs or UUIDs as well as each role -> 1000 * 1000 + 1000 * 1000 = 2M PATH or UUID properties. /content |--users |----user1 | +allowedroles[MULTIVALUED REFERENCE/PATH/STRING] |----user2 | +allowedroles[MULTIVALUED REFERENCE/PATH/STRING] |.... |----user1000 | +allowedroles[MULTIVALUED REFERENCE/PATH/STRING] ------------ /content |--roles |----role1 | +allowedroles[MULTIVALUED PATH/STRING] only in case of option 2 |----role2 | +allowedroles[MULTIVALUED PATH/STRING] only in case of option 2 |.... |----role1000 | +allowedroles[MULTIVALUED PATH/STRING] only in case of option 2
