BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Appian Exam ACD101 Topic 1 Question 18 Discussion

Actual exam question for Appian's ACD101 exam
Question #: 18
Topic #: 1
[All ACD101 Questions]

You have two Custom Data Types (CDT): ACME_invoice and ACME_invoiceItem that have a flat relationship.

The invoice item table has a field that is a foreign key to the invoice table. You are leveraging the database to automatically generate their primary keys.

How should you structure the process model to add a new invoice and the new invoice items to the system?

Show Suggested Answer Hide Answer
Suggested Answer: C

When dealing with related data types where one has a foreign key to another, you must first create the record in the primary table (ACME_invoice) and then use the generated primary key to create related records in the secondary table (ACME_invoiceItem). This is why you first write to the ACME_invoice table, then update the foreign keys in a Script Task, and finally write to the ACME_invoiceItem table.


Appian Documentation: Relational Databases

Contribute your Thoughts:

Carlene
3 months ago
Options A and B both seem viable, but I can't help but wonder if there's a hidden joke about the ACME company. You know, the one from the Coyote and Roadrunner cartoons?
upvoted 0 times
...
Jutta
3 months ago
Tony's got a point, but I think the separation of concerns in Option B is the way to go. It's more robust and ensures data integrity. Plus, who doesn't love a good script task?
upvoted 0 times
Mauricio
2 months ago
Definitely, using a script task for updating foreign keys adds an extra layer of control.
upvoted 0 times
...
Gilberto
2 months ago
I think Option B is the most efficient way to handle adding new invoices and invoice items.
upvoted 0 times
...
Daron
2 months ago
Yeah, having separate steps for updating foreign keys makes the process clearer.
upvoted 0 times
...
Jarvis
2 months ago
I agree with you, Option B does seem like the better choice. It keeps things organized.
upvoted 0 times
...
...
Tony
3 months ago
Hmm, I don't know. Option A looks like it might be the easiest way to handle this. Why do we need to separate the writes? Seems like unnecessary complexity.
upvoted 0 times
Joseph
3 months ago
Separating the writes can help with data integrity and organization.
upvoted 0 times
...
Pansy
3 months ago
Option A looks like the best choice. It simplifies the process.
upvoted 0 times
...
...
Huey
3 months ago
I'm with Alayna on this one. Option B is the way to go. Separating the writes and updating the foreign keys in between is the best approach.
upvoted 0 times
...
Alberto
3 months ago
I personally prefer option C because it first writes to the invoice table before the invoice item table.
upvoted 0 times
...
Alayna
3 months ago
Option B seems like the most logical choice here. Writing to the invoice item table first, then updating the foreign keys, and finally writing to the invoice table ensures the data is consistent.
upvoted 0 times
Yvette
2 months ago
Then updating the foreign keys will ensure data integrity.
upvoted 0 times
...
Gerry
3 months ago
Yes, writing to the invoice item table first makes sense.
upvoted 0 times
...
Stephane
3 months ago
Option B seems like the most logical choice here.
upvoted 0 times
...
...
Ernest
3 months ago
I disagree, I believe option B is better as it ensures the foreign keys are updated correctly.
upvoted 0 times
...
Oretha
3 months ago
I think option A is the best choice because it writes to both data store entities in one step.
upvoted 0 times
...

Save Cancel