ERD structure, looping? Yay or Nay?

Hey guys I’m doing a pretty straightforward Inventory app that generates PURCHASE ORDERS and LINE ITEMS based on STOCK ITEMS from Vendors.

If I include a ref column in the LINE ITEMS to both the original STOCK ITEM and PURCHASE ORDER does this loop create issues? It seemed odd to me to have the line item only refer to the PURCHASE ORDER and only be able to access the STOCK ITEM columns with a Select expression rather than a deref.

I found an ERD article from Oracle that actually has the exact same structure which makes sense to me but I have heard occasionally that loops are a no no. My database knowledge is minimal so I thought someone might chime in on whether Appsheet will be angry with me or nice. Article link here: (Developing an Application)

I’d love some feedback on this. Thank you guys for any help.

0 2 832
2 REPLIES 2

Hey @Ethan_U, im working in a very similar app, and as far as i know there won’t be any problems with “looping”, since all that you’re doing in appsheet with references is “linking” rows from a table with another from a different table, this allows you to easily pull data when needed.

Of course, that doesn’t mean you should just add references to everything, that would eventually turn your app into a clusterduck of innecesary data, you should try to keep your app as minimalistic as possible to maximize performance and ease of edition later on.

You should try to visualize how you’re going to present your data, for example, eventually you may want to generate a PDF document that sums up a purchase order, and you’re going to need that reference to the line items in order to easily use that reference in a workflow Start expression, and to allow users to see and add line items from the detail view of the purchase order.

Clusterduck!!! I love it, you sir are an instant legend.

Thank you so much for the reassurance. Yeah before entering the ref column to the STOCK ITEM on the LINE ITEM I was doing Select expressions to get the data which I would assume would eventually cause performance issues when the number of rows gets higher.

Thank you so much

Top Labels in this Space