The table detail panel opens below the ERD canvas. Here you edit what does not fit in a node on the canvas, such as the table comment, foreign keys, indexes, constraints and DBMS-specific options, and view the table's data and DDL without leaving the canvas. Columns are edited in the Table node.
What's on the screen
| No. | Name | Description |
|---|---|---|
| 1 | Tabs | The Details, Data and DDL tabs. See 'Tabs' below. |
| 2 | Close button | Closes the panel. Click a table node again to reopen it. |
| 3 | Basic information | Schema, Table Name, Logical Name, Comment and DBMS-specific options. |
| 4 | Foreign Keys | The table's foreign keys. Add one with the Add Foreign Key... button and delete one with the button at the end of its row. |
| 5 | Indexes | The table's indexes. Add one with the Add Index... button and delete one with the button at the end of its row. |
| 6 | Constraints | Primary key, foreign key, UNIQUE and CHECK constraints (and EXCLUSION in PostgreSQL) in one table. Add one with the Add Constraint... button. |
| 7 | NeoSQL Properties | The node's Color and Notes. They do not go to the database. |
Tabs
| Tab | What it does |
|---|---|
| Details | The basic information, foreign keys, indexes, constraints and properties described on this page. |
| Data | Queries the table's data. It queries when you open the tab, and again for another table when you select one. It queries only on a connection with database access details. |
| DDL | Shows the table's CREATE statement. For a table in the database it shows the database's current definition, with a notice when there are changes not yet applied. For a virtual table it is built from the design. |
Fields of the basic information
| Field | Description |
|---|---|
| Database | Appears only in DBMSs that keep databases and schemas separate (PostgreSQL, SQL Server and others). It cannot be edited. |
| Schema | The schema the table belongs to. It cannot be edited. |
| Table Name | The table name. Same as editing it in the node header. |
| Logical Name | The logical name. On a connection with a data dictionary, the table name is generated from it, and when the name no longer matches the dictionary, the icon at the end of the field brings it back in line. See Data dictionary. |
| Comment | The table description. It is applied to the database as the table comment. In the node it shows on one line below the name when the table is not selected. |
| DBMS-specific options | MySQL and MariaDB have Engine, Character Set and Collation fields; PostgreSQL and Oracle have a Tablespace field. |
- Changing the Character Set field clears the Collation field and switches it to the collations of the chosen character set.
- There is no per-column character set field in this panel or in the node. It is in the column editor of the Table tab (MySQL and MariaDB).
Opening the detail panel
- Click a table node on the canvas. The detail panel for that table opens below the canvas.
- Clicking another table switches the panel to it. Drag the divider to change the panel's height.
- When you are done, click the close button (2).
- Clicking a table in the Included Tables list of the info panel also selects it on the canvas and opens the detail panel.
- Clicking a relationship line closes the detail panel.
- The View in Detail Tab button in the node toolbar does not open this panel; it opens a separate Table tab. The table tab is a work document tab of its own, used to edit more items, such as per-column character sets, on a larger screen.
Adding a foreign key
You can add the same foreign key here that drawing a relationship line on the canvas creates. Drawing relationship lines is explained in ERD canvas.
- Click the Add Foreign Key... button in the Foreign Keys area (4).
- Choose the parent table to reference, and in the Column Mapping item choose the columns of this table that pair with the parent's primary key. You can create a column that does not exist yet.
- Check the FK Name field and click the Add Foreign Key button. A relationship line appears on the canvas.
Adding an index
- Click the Add Index... button in the Indexes area (5).
- Type a name in the Index Name field, and choose the index kind in the Index Type field, whether it is Unique and which columns it contains. For index types that support sort order, choose Ascending or Descending for each column.
- Click the Add Index button at the bottom of the window.
Adding and editing constraints
- Click the Add Constraint... button in the Constraints area (6).
- Choose UNIQUE or CHECK in the Type field. In PostgreSQL you can also choose EXCLUSION.
- Type a name in the Name field, then choose the columns for UNIQUE, or type the condition in the Expression field for CHECK.
- In a DBMS that supports deferred checking, set
DEFERRABLEand the initial checking time (INITIALLY IMMEDIATE,INITIALLY DEFERRED) in the Deferrable item. - Click the Add Constraint button.
- Edit or delete UNIQUE, CHECK and EXCLUSION rows with the buttons at the end of the row. The primary key row is handled in the PK column of the grid and foreign key rows in the Foreign Keys area, so they cannot be edited in this table.
- Which constraints can be deferrable depends on the DBMS.
| DBMS | Constraints that can be deferrable |
|---|---|
| PostgreSQL | Foreign keys, UNIQUE, EXCLUSION |
| Oracle | Foreign keys, UNIQUE |
| SQLite | Foreign keys |
| Other DBMSs | None |
RLS and publications in PostgreSQL
On PostgreSQL and Supabase connections, two more areas appear below the Constraints area.
- Logical Replication: The publications the table belongs to and the events they replicate (INSERT, UPDATE, DELETE, TRUNCATE). It appears only for tables in a publication.
- RLS Policies: Row-level security (RLS). Turn it on and off with the switch on the right; when it is on, the policy list appears. For each policy, the Simulate... button tests which rows that policy shows. A change of the switch is run on the next apply, like any other change.
Setting NeoSQL Properties
The two items in the NeoSQL Properties area (7) are stored only in the NeoSQL project. They are not part of the DDL, so they are never applied to the database.
- Color: The color of the node header. Choose a preset, pick one in the color picker, or pick a color from the screen with the eyedropper. The × swatch clears the color. Colors you pick yourself stay in the color picker for later.
- Notes: A memo attached to the table. Unlike Comment, it does not go to the database.
Saving your changes
Changes made in this panel go into the same table design as the node on the canvas. The panel has no Save button of its own.
- Change the comment, foreign keys, indexes, constraints or options in the panel. An orange dot appears in the node header.
- Save with the Save button in the node toolbar or the Save button in the info panel.
- To create them in the database, click the Apply Changes to DB... button in the node toolbar. See Apply changes to the database.
Things to keep in mind
- Adding or deleting foreign keys, indexes and constraints in the panel does not change the real database. They reach the database only when you run the DDL with the Apply Changes to DB... button.
- For a table in the database, the DDL tab shows the database's current definition. Check the DDL that includes your changes in the preview of the Apply Changes to DB... button.
- Tables in a system schema are read-only. A notice appears at the top of the panel, and the fields and add and delete buttons cannot be used.
Related screens
- Table node: Edit the table name and columns on the canvas, and save, restore or apply.
- ERD canvas: Draw relationship lines to create foreign keys.
- Apply changes to the database: Preview and run the DDL for your changed design.
- Table tab: The separate tab opened by the View in Detail Tab button.
- Database reference: Differences in index types and DBMS-specific options.