You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

In this article, we will discuss how to design a many to many form/record relationship based on the sample app.

There are 3 tables needed in total in order to form a many-to-many relationship:-

  • Many2Many_table1
  • Many2Many_table2
  • Many2Many_joiner

where the last table mentioned will act as the junction table.

In this generic sample app, we are treating "Form 1" as ingredients and "Form 2" as a recipe.

The figure below shows the list of recipes.

The figure below shows the list of ingredients.

A recipe requires multiple ingredients and an ingredient is used by multiple recipes. The following figure depicts the "joiner" records.

And, here's how the joiner table records look like. Observe c_id_form1 and c_id_form2. They are the foreign key to table1 and table2 respectively.

This is table1 data.

This is table2 data.

The app is created using simple select box and form grid. You may study its design by downloading the sample app below.

APP_Many2Many-1-20180507154857.jwa

  • No labels