Implementing Many to Many Relationships in Ap...

(Tyson Carmichael (FlyTy)) #1

Implementing Many to Many Relationships in Appsheet

Hey All,

I read this previous post (https://plus.google.com/114694135177293864876/posts/Vr111bdGUkz)

on the topic of many to many relationships between tables.

I understood the principle. What I would like is guidance on the method to make it operational. Using the case of the Student table and the courses table,

1 student can enroll in many courses and 1 course can be taken by many students.

When I create the bridge table called student enrollment, how do I link them?. Is this a case of using

a ref plus IsApartof ?

Additional, how would I display a student’s enrollment record?

Thanks

(Suvrutt Gurjar) #2

Hi +Tyson Carmichael.As per my understanding, please to refer to following sample app “Order Capture” for bridge example.

For your query on linking the tables, in the sample , “Customers” (through Orders table) and “Products” tables are bridged in the table “Order Details”. "Orders"is another intermediate table ,that is optional /or can be done away with in other apps.

For your query on “IsPArtOf” assignment, you can have both or one or none references as"IsPArtOf" depending on business logic.

“IsPartOf” will delete all child records if referenced master record is deleted.

Finally on displaying students enrolment records, you can display those in the enrolment table(bridge table) by grouping records by student name or ID.

appsheet.com - Order Capture - An app for managing customers, products, and orders.

Order Capture - An app for managing customers, products, and orders. appsheet.com