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

  • 0
    Certified Lead Developer

    My perspective on this is, that the database is only a integrated system like any other. Appian at its core does not need a relational database and the platform tries to limit dependencies on these integrated systems.

    I am building enterprise Appian applications for > 12 years now and try to keep the relational DB as dumb as possible. And I never had the urge to do more than a simple view or a stored procedure for ETL jobs.

    Low-Code with Appian gives you the opportunity to make the whole development a lot easier. Give it a try.

    This is just my humble opinion and there are other perspectives on this.

  • 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.