Database relationships allows you to link your tables (web-forms). You can set one to one, one to many or many to many relationships using our simple and easy to use interface
The instructions in this blog post deprecated, read new instructions here.
Creation of relationships between database forms in QuintaDB is easy.
To create relationship you don't need to use any additional fields or a code. Use simple drag-and-drop functionality.
Assume we have two database forms: Team and Player. We will add football teams to the first table Team, football players - to Players. Remember that linking fields in forms is possible only if you have at least two forms.
1) Go to the Forms menu and create two forms with the following fields: Name, City, Ranking (for the form Team) and Name, Number for the form Player.
2) Then click on button Relationships. On the new page you can start to create links between the forms. Select the needed web form, and then select the relationship type (has many, has and belongs to many, belongs to, has one) and select the linking column. In this example we will consider the following types: Belongs to (many to 1 or 1 to 1), Has and belongs to many (many to many), has one (1 to 1), has many (1 to many).
Select relationship type: belongs to for the form Player in the Forms menu. Also you need to select a relationship column (in this case it's Name). Many players belong to one team. Adding a new player, you can select for it only one team that is listed in the second form Team. The field with the team names will be represented by a dropdown list with only one element to choose.
Using this relationship type you can select several players for one team (when you submit form Team) and can select few teams submiting the form Players.
Form Team. We can see all columns in the spreadsheet plus one additional column Select Player (all entries are in the table as links).
When you add a new record to the form Player you can select all needed teams from another table.
When you add a new record to the form Team you can select all players you need from another table.
For this case we have created a new form Coach with two fields (Name and Salary). One team has one coach and for one coach we can select only one team.
So, select needed forms, relationship type and linking column (this column from the form Team will be shown on the spreadsheet Coach). In this example we will link the form Coach with the form Team using a linking column Name. For this form (Coach) you can select only one team.
You can see how the spreadsheet Coach looks like. In the spreadsheet new column Select Team has appeared.
You can see how the spreadsheet Team looks like. In the spreadsheet two new columns Select Player, Select Coach have appeared.
In order to show several columns from linked table just use Formula field as a Link column.
Please, see below how to do it.