Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Image Modified

Image Removed

Image Removed

Image Removed

Image RemovedImage RemovedImage Removed

 

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.

Image Added

The figure below shows the list of ingredients.

Image Added

 

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

 

 

Image Added

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.

Image Added

This is table1 data.

Image Added

This is table2 data.

Image Added

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

View file
nameAPP_Many2Many-1-20180507154857.jwa
height250