Topic
2 replies Latest Post - ‏2013-08-13T11:42:16Z by SRIMORI
SRIMORI
SRIMORI
7 Posts
ACCEPTED ANSWER

Pinned topic JDBC Adapter - single-cardinality children contained without ownership

‏2013-08-08T08:59:46Z |

Hi,

Can any body Please help me on topic of   single-cardinality children contained without ownership with JDBC Adapter?

first of give more infomration  single-cardinality children contained without ownership in database?

Thanks in Advance

Srikanth

  • Vinod_Valecha
    Vinod_Valecha
    7 Posts
    ACCEPTED ANSWER

    Re: JDBC Adapter - single-cardinality children contained without ownership

    ‏2013-08-10T20:54:52Z  in response to SRIMORI

    Hi Srikanth,

    Below is the description of both the single cardinality and multiple cardinality contained without ownership:

    If a top-level business object has child business objects, it is the parent of its children. Similarly, if a child business object has children, it is the parent of its children. The parent/child terminology describes the relationships between business objects, and it may also be used to describe the relationship between application entities.

    There are two types of containment relationships between parent and child business objects:

    - Cardinality 1 containment-the attribute contains a single child business object.

    - Cardinality n containment-the attribute contains several child business objects in a structure called a business object array.

    In a typical table-based application, relationships between entities are represented by primary keys and foreign keys in the database, where the parent entity contains the primary keys and the child entity contains the foreign keys. An hierarchical business object can be organized in a similar way:

    - In a cardinality 1 type (single cardinality) of relationship, each parent business object relates to a single child business object. The child business object typically contains one or more foreign keys whose values are the same as the corresponding primary keys in the parent business object. Although applications might structure the relationships between entities in different ways.

    - In a cardinality n type (multiple cardinality) relationship, each parent business object can relate to zero or more child business objects in an array of child business objects. Each child business object within the array contains foreign key attributes whose values are the same as the corresponding values in the primary key attributes of the parent business object.

    The adapter handles single-cardinality children contained with ownership in one of the following ways:

    - If the child is present in both the source and the retrieved business objects, instead of updating the existing child in the database, the adapter deletes the existing child and creates a new child.

    - If the child is present in the source business object but not in the retrieved business object, the adapter recursively creates the child in the database.

    -If the child is present in the retrieved business object but not in the source business object, the adapter recursively deletes the child from the database.

    For single-cardinality children contained without ownership, the adapter attempts to retrieve every child from the database that is present in the source business object. If it successfully retrieves the child, the adapter populates the child business object but does not update it, because the adapter never modifies single-cardinality children contained without ownership.


    Thanks,
    Vinod Valecha

    • SRIMORI
      SRIMORI
      7 Posts
      ACCEPTED ANSWER

      Re: JDBC Adapter - single-cardinality children contained without ownership

      ‏2013-08-13T11:42:16Z  in response to Vinod_Valecha

      Hi Vinod,

      Thanks for sharing your ideas.

      Thanks,

      Srimori