The Ajax-based Designer offers a visually-driven way of managing relations (both internal and foreign key-based), and defining the display column for each table. It can also act as:
On the Designer workspace, we can work on the relations for all tables on the same panel. On the other hand, the Relation view shows the relations for only a single table at a time.
We access this feature from the Database view by clicking on the Designer menu tab.
If this menu tab does not appear, it's because we are yet to install the phpMyAdmin configuration storage as described in Chapter 1.
The Designer page contains the main workspace where the tables can be seen. This workspace will dynamically grow and shrink, depending on the position of our tables. The following screenshot demonstrates the Designer interface containing our three tables and the relations between them:

A top menu contains icons whose description is revealed by hovering the mouse over them. The following table gives a summary of the goals for the top menu's icons:
|
Icon |
Description |
|---|---|
|
Show/Hide left menu |
To display or hide the left hand menu. |
|
Save position |
Saves the current state of the workspace. |
|
Create table |
Quits the Designer and enters a dialog to create a table; we should take care of saving the position of tables before clicking on this. |
|
Create relation |
Puts the Designer in a relation-creating mode. |
|
Choose column to display |
Specifies which column represents a table. |
|
Reload |
Refreshes the table's information in case their structure has changed outside of the Designer. |
|
Help |
Displays an explanation about selecting the relations. |
|
Angular links/Direct links |
Specifies the shape of relation links. |
|
Snap to grid |
Influences the behavior of table movements, relative to an imaginary grid. |
|
Small/Big All |
Hides or displays the list of columns for every table. |
|
Toggle small/big |
Reverses the display mode of columns for every table, as this mode can be chosen for each table with its corner icon V or>. |
|
Import/Export |
Displays a dialog to import from an existing PDF schema definition or to export to it. |
|
Move Menu |
The top menu can move to right and back again. |
A side menu appears when clicking on the Show/Hide left menu icon. Its purpose is to present the complete list of tables, so that you can decide which table appears on the workspace, and to enable access to the Structure page of a specific table. In this example, we choose to remove the book-copy table from the workspace as shown in the following screenshot:

If we want to remove it permanently, we click on the Save position top icon. This icon also saves the current position of our tables on the workspace.
Tables can be moved on the workspace by dragging their title bars, and the list of columns for a table can be made visible/invisible with the help of upper-left icon of each table. In this list of columns, small icons show us the data type (numeric, text, and date), and also tell us whether this column is a primary key.
As we have already defined a relation with the Relation view, we will first see how to remove it. The Designer does not permit a change in a relation. However, the Designer allows the relation to be removed and defined.
The question mark icon displays a panel that explains where to click, in order to select a relation for subsequent deletion.

Let us click on the relation line to select it. We get a confirmation panel on which we click on Delete.

We can then proceed to recreate it. To do this, we start by clicking on the Create relation icon:

The cursor then takes the form of a short message saying Select referenced key. In our case, the referenced key is the id column of the author table; so we bring the cursor on this column and click on it. A validation is done, ensuring that we chose a primary or unique key.
Next, having changed the cursor to Select foreign key, we bring it to the author_id column of the book table and click on it again. This confirms the creation of the relation. Currently, the interface does not permit the creation of compound keys (having more than one column).
On the workspace, the name column in author table has a special background color. This indicates that this column serves as the display column. We can simply click on the Choose column to display icon, and drag the short message Choose column to display onto another column—for example, the phone column. This changes the display column to this column. If we were to drag the message to an existing display column, we would have removed the definition of this column as the display column for the table.