RelashionShips in Appian do not reflect FOREIGN KEY definitions in a database

Hi!!!

  1. When we create a database and define there the relationships between tables using FOREIGN KEY... REFERENCES... all the systems can automatically retrieve those relationships and represent them, but Appian does not do so. Why Appian do not reflect the relations in the Record Types?
  2. If we define ONE relationship 1:N in a database, there are indeed two implicit relations: a relation from 1--->N and another form N-->1. Why Appian adds a direction for the relations? Is there a reason for that or any type of advantage to define specifically a direction for a relation?

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I think the reason is that Appian is trying to be data-agnostic.  It wants you to be able to form connections however you want, and if you should want to configure the connections the way they are in the database, great!  Since records are sort of read-only at this point, I don't think there's an urgent need to force constraints on views.  You're just attaching things together however you choose in order to look at them.  No harm if you don't need the FK in order to get the views you want.  It's actually kind of nice that Appian isn't forcing your hand.

    I think that it may come into a problem when you're trying to write to tables that have FK constraints that have to be maintained, but for now you have to use CDT to write to datastore anyway.  You can't use records for that.  This is good, because CDT's do collect the foreign key relationships correctly.

Reply
  • 0
    Certified Lead Developer

    I think the reason is that Appian is trying to be data-agnostic.  It wants you to be able to form connections however you want, and if you should want to configure the connections the way they are in the database, great!  Since records are sort of read-only at this point, I don't think there's an urgent need to force constraints on views.  You're just attaching things together however you choose in order to look at them.  No harm if you don't need the FK in order to get the views you want.  It's actually kind of nice that Appian isn't forcing your hand.

    I think that it may come into a problem when you're trying to write to tables that have FK constraints that have to be maintained, but for now you have to use CDT to write to datastore anyway.  You can't use records for that.  This is good, because CDT's do collect the foreign key relationships correctly.

Children
No Data