I am trying to decide on the schema of my Sharepoint lists and I was wondering if it better to use lookup fields in the lists to enforce the relationships or to join the data using numeric primary and foreign keys. Will using the lookup fields slow down the performance of Powerapps or will the manual filtering of the data based on IDs at the time there is a selection in Powerapps slow things down?
Firstly Lookup columns do not actually establish a "server side" relationship with the second list other than the field looked up and any specific "secondary" fields you name in the List Settings of the field. The downside of this field type (I never use them) is that they can cause unnecessary complications in reading from and writing to (they are a complex field type) and have some Delegation restrictions (you cannot Sort by them or use StartsWith() in a Filter). Exactly the same functionality (looking up the other list fields) is generally available directly in Power Apps.
One good option (in my experience anyway) is to link all "child" lists by a numeric field containing the ID of the "parent". You can also "link" on any common value text field and do the LookUp/Filter in Power Apps, which is fully Delegable. The concept of Primary and Foreign keys does not really apply with SharePoint as it is not a relational database.
Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like. MVP (Business Applications) Visit my blog Practical Power AppsBuy me a coffee
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.