6 Replies Latest reply on Aug 29, 2012 7:43 AM by Brad Tuckett ----Oracle

    Containment relationship

      I have few question around containment relationships:

      1. What is the use of containment relationship?
      2. Why it is necessary to define containment relationship?
      3. Can there be instance of an entity without the containment relationship?
      4. In which scenario such a case is possible?
      5. As given here an example - http://docs.oracle.com/html/E20340_01/toc.htm
      why cant we create a containment relationship between "the child" and "the friend" entity. Why the containment relationship is created from "global" to "the friend" and similarly for "the school" entity , the containment is with the global entity. Also, one child can go to only one school. So the criteria for containment relationship "to-one" is satisfied from "the child" to "the school"


      Edited by: RP on Aug 26, 2012 3:11 AM

      Edited by: RP on Aug 26, 2012 3:17 AM
        • 1. Re: Containment relationship
          For question 1

          The following topics in Oracle Policy Modeling User's Guide are helpful

          "Understand containment relationships and entity completion" where the concept of an entity needing to be complete is determined via the use of containment relationships.

          "Reason across multiple entities" where the containment relationship needs to be known to determine the scope of an entity.

          "Use multiple properties files on a multi-developer project" where the containtainment relationship used to connect separate property files.

          Version 10.4 of OPM automatically creates a default containment relationship.

          For question 5 I believe your question is in regards to topic "Define a data model"; your link brings us to the home page.
          1 person found this helpful
          • 2. Re: Containment relationship
            I have read the OPM documentation... but It doesnt give me a clear idea.

            For question 5 the question is in regards to topic "Define a data model"
            1 person found this helpful
            • 3. Re: Containment relationship
              Brad Tuckett   ----Oracle
              For (3) - no, every entity must be contained by another entity - you can only create an entity instance if you have the containing entity instance. This is what I call the "brain-attic" axiom - you shouldn't store knowledge if it is unrelated to the scenario being modelled.

              For (5) - you can create a containment relationship between "the child" and "the friend", and that is what the example is illustrating - only "the child" has the containment relationship from the global entity.

              (For the meaning of "brain-attic", see http://www.literature.org/authors/doyle-arthur-conan/study-in-scarlet/part-01/chapter-02.html)
              1 person found this helpful
              • 4. Re: Containment relationship
                Thanks Brad.. However for the point 5.. the OPM helps says..

                "Containment relationships are also required for the Friend and School entities, since the above relationships for these entities are not suitable "to-one" relationships. We would define:

                Global entity and Friend (the friends): this is a one-to-many containment relationship.
                Global entity and School (the schools): this is a one-to-many containment relationship. "
                • 5. Re: Containment relationship
                  Davin Fifield-Oracle
                  As you point out, if there is always a strict -to-one relationship, you can model it using a straightforward containment relationship.

                  I.e. if a child can always ever go to one school, then you can contain children in schools.

                  However, if there is ever a situation where the relationship between children and schools is more nuanced - e.g. they can move between schools over time, or can attend more than one school - and you don't want to duplicate the child into each school they are in - then you will need to have both the children and the schools be contained by the Global entity, and build a relationship, or set of relationships, between them to reflect the actual situation.
                  • 6. Re: Containment relationship
                    Brad Tuckett   ----Oracle
                    Davin has already answered this, so I'll just point out that the example is merely one way to implement a set of containment relationships, and it is up to the rule modeller to decide what the most appropriate source and target entities are for each containment relationship. The global entity is usually chosen as the source entity of a containment relationship because this allows other entities to define many-to-many relationships involving the entity.