You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say you have categories and links and one category can contain several links. Your table structure would be something like this:
58
+
From the ``employees`` table :guilabel:`Structure` tab, open the :guilabel:`Relation view` (just below the menu bar). Select the ``department`` column
59
+
as the column to work with and ``departments`` table ``dept_id`` column as that is the referenced key.
60
+
We recommend using the native constraints where possible, but there is an :guilabel:`Internal relationships` area for usage when
61
+
the table type does not support these natively.
47
62
48
-
- `category.category_id` (must be unique)
49
-
- `category.name`
50
-
- `link.link_id`
51
-
- `link.category_id`
52
-
- `link.uri`.
63
+
If you now browse the ``employees`` table, the ``department`` field will be a clickable hyperlink to the proper category record. It will still show the
64
+
``dept_id`` instead of the label. A tooltip appears when hovering over the values with the referenced label.
53
65
54
-
Open the relation view (below the table structure) page for the `link` table and for `category_id` field, you select `category.category_id` as master record.
66
+
.. image:: images/pma-relations-links.png
55
67
56
-
If you now browse the link table, the `category_id` field will be a clickable hyperlink to the proper category record. But all you see is just the `category_id`, not the name of the category.
68
+
To further improve this, open the :guilabel:`Relation view` of the ``departments`` table and in the drop down at the bottom, select
69
+
``department_name`` (in some cases, this may already be the default setting).
57
70
58
71
.. image:: images/pma-relations-relation-name.png
59
72
60
-
To fix this, open the relation view of the `category` table and in the drop down at the bottom, select "name". If you now browse the link table again and hover the mouse over the `category_id` hyperlink, the value from the related category will be shown as tooltip.
73
+
Go back to the :guilabel:`Browse view` for the ``employees`` table and expand the :guilabel:`Extra options` then select
74
+
:guilabel:`Display column for relationships`. This shows the text from the referenced table instead of the integer value.
0 commit comments