Expand my Community achievements bar.

SOLVED

Usage of integrity attribute in schema definition in Adobe Campaign Classic

Avatar

Level 4

Hi All,

@Parvesh_Parmar ,@AkshayAnand 

,@isahore ,@AndreaBriceno,@ParthaSarathy

Just want to understand what will happen if we use below integrity in schema link definition

1)integrity=normal

2)integrity=own

3)integrity=define

 

Can anyone please explain me this taking example of recipient and Transaction schema, what is the purpose of using integrity attribute in schema link definition and difference it makes 

 

@Parvesh_Parmar ,@Denis_Bozonnet 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @DishaSharma ,

 

Please find the definition of Integrity:

 

 

  • integrity (optional): referential integrity of the occurrence of the source table to the occurrence of the target table.
    Possible values are:

    • define: it is possible to delete the source occurrence if it is no longer referenced by a target occurrence
    • normal: deleting the source occurrence initializes the keys of the link to the target occurrence (default mode), this type of integrity initializes all foreign keys
    • own: deleting the source occurrence leads to the deletion of the target occurrence
    • owncopy: the same as own (in case of deletion) or duplicates the occurrences (in case of duplication)
    • neutral: no specific behavior

Document URL: https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/schema-r...

 

Example:

Imagine you have two tables: Order Confirmation and Recipient. You can set up a link between them using code within the Order Confirmation table.

 

<element label="Recipient" name="recipient" integrity = "normal" revIntegrity="own" revLink="order" target="nms:recipient" type="link">
      <join xpath-dst="@id" xpath-src="@recipient-id"/>
    </element>

 

Parvesh_Parmar_0-1709641530114.png

 

 

1. Explanation:

  • This code creates a 1-to-1 link from the Order Confirmation table to the Recipient table.
  • The "integrity=neutral" setting ensures that deleting an Order Confirmation record won't affect the linked Recipient record.

 

Parvesh_Parmar_1-1709641762553.png

2. Reverse Link:

  • Adobe Campaign automatically creates a reverse link from the Recipient table back to the Order Confirmation table.
  • This link typically has an "integrity=own" setting, meaning deleting a Recipient record will delete all associated Order Confirmation records.

 

 

Parvesh_Parmar_2-1709644383468.png

 

Key Points:

  • "integrity=neutral": No action occurs on target records when source records are deleted.
  • "integrity=own": Deleting a source record triggers the deletion of linked target records.

Summary:

  • With "integrity=neutral," deleting an Order Confirmation record won't affect the linked Recipient.
  • With "integrity=own," deleting a Recipient record will delete all linked Order Confirmation records.

 

 

 

 

 

 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @DishaSharma ,

 

Please find the definition of Integrity:

 

 

  • integrity (optional): referential integrity of the occurrence of the source table to the occurrence of the target table.
    Possible values are:

    • define: it is possible to delete the source occurrence if it is no longer referenced by a target occurrence
    • normal: deleting the source occurrence initializes the keys of the link to the target occurrence (default mode), this type of integrity initializes all foreign keys
    • own: deleting the source occurrence leads to the deletion of the target occurrence
    • owncopy: the same as own (in case of deletion) or duplicates the occurrences (in case of duplication)
    • neutral: no specific behavior

Document URL: https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/schema-r...

 

Example:

Imagine you have two tables: Order Confirmation and Recipient. You can set up a link between them using code within the Order Confirmation table.

 

<element label="Recipient" name="recipient" integrity = "normal" revIntegrity="own" revLink="order" target="nms:recipient" type="link">
      <join xpath-dst="@id" xpath-src="@recipient-id"/>
    </element>

 

Parvesh_Parmar_0-1709641530114.png

 

 

1. Explanation:

  • This code creates a 1-to-1 link from the Order Confirmation table to the Recipient table.
  • The "integrity=neutral" setting ensures that deleting an Order Confirmation record won't affect the linked Recipient record.

 

Parvesh_Parmar_1-1709641762553.png

2. Reverse Link:

  • Adobe Campaign automatically creates a reverse link from the Recipient table back to the Order Confirmation table.
  • This link typically has an "integrity=own" setting, meaning deleting a Recipient record will delete all associated Order Confirmation records.

 

 

Parvesh_Parmar_2-1709644383468.png

 

Key Points:

  • "integrity=neutral": No action occurs on target records when source records are deleted.
  • "integrity=own": Deleting a source record triggers the deletion of linked target records.

Summary:

  • With "integrity=neutral," deleting an Order Confirmation record won't affect the linked Recipient.
  • With "integrity=own," deleting a Recipient record will delete all linked Order Confirmation records.

 

 

 

 

 

 

Avatar

Level 4

Hi @Parvesh_Parmar 

thank you for detailed explAined

 

I have couple of asks here based on what u mentioned:

1)the below code is written in Order Confirmation and u mentioned below code will create 1to 1 link 

but my understanding says if we have to create 1to 1 linking we have to use 'revCardinality=single' in schema link definition no where I can see thAt

<element label="Recipient" name="recipient" integrity = "normal" revIntegrity="own" revLink="order" target="nms:recipient" type="link">
      <join xpath-dst="@id" xpath-src="@recipient-id"/>
    </element>

how this code is creating 1to 1 link please help to explain

also want to und here please confirm

AS mentioned by you

"This code creates a 1-to-1 link from the Order Confirmation table to the Recipient table."

but link from Recipient table.to Order Confirmation table should be Many to 1(N to1)

how and where code is written to maintain for this

please help me to und this

2)I  also want to understand as mentioned in post above what will happen if I use 

a)integrity=normal

b)integrity=define

c)integrity=owncopy

considering an example of Recipient schema and Transaction schema are 1to Many(1 to N) linked

 

please please help

Avatar

Community Advisor

Hello @DishaSharma ,

 

Please check the following points:

  1. The order confirmation to recipient table will have a 1-to-1 link. This means that one order is linked with only one recipient.

  2. The recipient to order confirmation will have a 1-to-N link. This implies that one recipient can be linked to multiple orders. For example, one recipient can place multiple orders.

  3. If you want the recipient to order confirmation table link to also be 1-to-1 (which is currently 1-to-N as mentioned in point 2), then you need to use 'revCardinality=single'. This way, each recipient can be linked with only one order.

I would suggest conducting some tests in your sandbox environment with test data. Also, try other integrity to see the differences.

Regarding your second point, I have provided the definition in my initial comment.

 

Thank you,

Parvesh