Screens: ERD

Table detail panel

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.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1TabsThe Details, Data and DDL tabs. See 'Tabs' below.
2Close buttonCloses the panel. Click a table node again to reopen it.
3Basic informationSchema, Table Name, Logical Name, Comment and DBMS-specific options.
4Foreign KeysThe table's foreign keys. Add one with the Add Foreign Key... button and delete one with the button at the end of its row.
5IndexesThe table's indexes. Add one with the Add Index... button and delete one with the button at the end of its row.
6ConstraintsPrimary key, foreign key, UNIQUE and CHECK constraints (and EXCLUSION in PostgreSQL) in one table. Add one with the Add Constraint... button.
7NeoSQL PropertiesThe node's Color and Notes. They do not go to the database.

Tabs

TabWhat it does
DetailsThe basic information, foreign keys, indexes, constraints and properties described on this page.
DataQueries 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.
DDLShows 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

FieldDescription
DatabaseAppears only in DBMSs that keep databases and schemas separate (PostgreSQL, SQL Server and others). It cannot be edited.
SchemaThe schema the table belongs to. It cannot be edited.
Table NameThe table name. Same as editing it in the node header.
Logical NameThe 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.
CommentThe 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 optionsMySQL 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

  1. Click a table node on the canvas. The detail panel for that table opens below the canvas.
  2. Clicking another table switches the panel to it. Drag the divider to change the panel's height.
  3. 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.

  1. Click the Add Foreign Key... button in the Foreign Keys area (4).
  2. 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.
  3. Check the FK Name field and click the Add Foreign Key button. A relationship line appears on the canvas.

Adding an index

  1. Click the Add Index... button in the Indexes area (5).
  2. 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.
  3. Click the Add Index button at the bottom of the window.

Adding and editing constraints

  1. Click the Add Constraint... button in the Constraints area (6).
  2. Choose UNIQUE or CHECK in the Type field. In PostgreSQL you can also choose EXCLUSION.
  3. Type a name in the Name field, then choose the columns for UNIQUE, or type the condition in the Expression field for CHECK.
  4. In a DBMS that supports deferred checking, set DEFERRABLE and the initial checking time (INITIALLY IMMEDIATE, INITIALLY DEFERRED) in the Deferrable item.
  5. 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.
DBMSConstraints that can be deferrable
PostgreSQLForeign keys, UNIQUE, EXCLUSION
OracleForeign keys, UNIQUE
SQLiteForeign keys
Other DBMSsNone

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.

  1. Change the comment, foreign keys, indexes, constraints or options in the panel. An orange dot appears in the node header.
  2. Save with the Save button in the node toolbar or the Save button in the info panel.
  3. 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.