One to One, One to Many, Many to One & Many to Many relation in CDT

I am a new comer in Appian, please help me with steps to implement One to One & One to Many relations.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    One to One is simply achieved by one CDT or the other having a reference to the other CDT, most likely the reference of the CDT will be the ID or primary key.  In a one to one relationship it doesn't really matter which one is the one with the reference to the other.  If you make one of the members of the CDT a CDT itself (nesting), Appian will automatically generate the foreign key reference.

    If there's a Many to One relationship, meaning the parent table with the reference can have multiple rows referring to the same row of the child table, the reference is stored in the parent.  Appian will automatically make the references.  In essence, you just nest a singular CDT in the parent CDT and Appian won't really care if some references are the same.

    If there's a One to Many relationship, which occurs when you nest a list of CDT in a parent CDT, then the reference to the parent is stored in each of the children.  Appian will do this automatically.

    If there's a Many to Many relationship, that generally requires a separate lookup table [id, fk 1, fk 2], which database experts should more than likely build this directly in the DBMS and configure the CDTs afterward.

Reply
  • 0
    Certified Lead Developer

    One to One is simply achieved by one CDT or the other having a reference to the other CDT, most likely the reference of the CDT will be the ID or primary key.  In a one to one relationship it doesn't really matter which one is the one with the reference to the other.  If you make one of the members of the CDT a CDT itself (nesting), Appian will automatically generate the foreign key reference.

    If there's a Many to One relationship, meaning the parent table with the reference can have multiple rows referring to the same row of the child table, the reference is stored in the parent.  Appian will automatically make the references.  In essence, you just nest a singular CDT in the parent CDT and Appian won't really care if some references are the same.

    If there's a One to Many relationship, which occurs when you nest a list of CDT in a parent CDT, then the reference to the parent is stored in each of the children.  Appian will do this automatically.

    If there's a Many to Many relationship, that generally requires a separate lookup table [id, fk 1, fk 2], which database experts should more than likely build this directly in the DBMS and configure the CDTs afterward.

Children
No Data