ChartDB provides a visual and intuitive way to add tables and fields to your database diagram.

Add New Tables

To add new tables, you can use the sidebar or interact directly with the canvas.

Click the 'Add Table' icon in the Sidebar

First, navigate to the Tables section in the ChartDB sidebar and click the ‘Add Table’ icon. This instantly creates a new table in your diagram with a randomly generated name and a single default field.

Duplicate Existing Table via Sidebar

  1. Access table actions by clicking the settings icon next to the table name in the sidebar.

  2. Select ‘Duplicate Table’ from the table actions menu.

Duplicate or Add Table via Right-Click on Canvas

You can also quickly add or duplicate tables directly on the canvas using the right-click context menu.

  1. Right-click anywhere on the canvas.
  2. Select ‘New Table’ to add a brand new table, or ‘Duplicate Table’ after selecting an existing table to clone it.

You can also edit table names directly on the canvas by double-clicking the table name. This provides a quick and intuitive way to rename tables as you are visualizing your diagram.

Managing Schemas

In ChartDB, tables are organized within Schemas. Schemas act like folders, providing a way to structure and group your tables, especially in databases like PostgreSQL and MSSQL that support them.

A diagram with multiple schemas

Schemas will only be displayed in the sidebar if your imported database is configured with schemas. By default, only the public schema is displayed when schemas are present in your database. New tables added using the Add Table functionality will be placed within the currently active schema, which defaults to the public schema if not otherwise specified.

Add New Fields

Whether you’re refining your schema or adding new attributes, here’s how to add fields to your tables in ChartDB.

Click the 'Add Field' Button

  1. Scroll to the bottom of the specific table’s details section in the sidebar. 2. Click the ‘Add Field’ button.

Click the Fields section '+' Icon

  1. Expand the ‘Fields’ section for the specific table in the sidebar.

  2. Click the ’+’ icon next to the ‘Fields’ header.

Similar to tables, you can edit field names directly on the canvas by double-clicking the field name within a table. This allows for in-place editing of field names directly in your diagram.

This will instantly add a new field to your selected table with a default name (e.g., field_4) and a default data type.

Configure Field Attributes

Once you’ve added a new field or need to modify an existing one, ChartDB provides configurable field attributes.