Hi Scott, About Master/child, I am not sure about graph, but with document database, you could use Embedded / EmbeddedSet for 1:1 / 1:n composition, and EmbeddedList / EmbeddedMap are bonus. You could use LINK / LINKSET for 1:1 / 1:n / n:1 association or aggregation, and LINKLIST / LINKMAP are bonus. An embedded instance will not have an identity so that no one could reference to it, but it can. Any embedded instances will be deleted automatically with its parent. By default, all associations are uni directional and independent, so that if you need bi-directional, you will need to add an association both side.
About your data visibility model, I am afraid that that's application design level, and none of database supports it. What is your problems to implement that one? My Best, Hung Tran On Wednesday, January 27, 2016 at 9:35:24 PM UTC+7, scott molinari wrote: > > What is the best or recommended way to set up a master/ child relationship > between two classes/ vertices, where if one master vertex is deleted, all > linked children would also be automatically deleted? Must this be done at > application level or is there a feature in ODB to allow this type of > relationship? > > If there were millions of users in the database and a class is using > oRestricted, would there be millions of user ids stored in the _allow* > fields for a single record, if all the millions of users should be allowed > to view that record? > > If I understand roles properly, there isn't a way to share data between > roles. The role feature is more for CRUD control than data visibility. > > For instance, say we have a role hierarchy as follows, with roles A, B, C, > D, E and F: > > A > | | > C E > | | > D F > > I'd like to have users in role A be able to see all records from users > with roles C, D, E and F. > > Users with role C can see data from users with role D, but not from users > with roles E and F. > > The same goes with users with the role E. They can see data from the users > with role F, but not from users with roles C and D. > > Is there a way to model this with ODB? If not, is there a recommended way? > > Scott > > > > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
