Menus and Layout

The DbSchema window holds a menu bar, a toolbar, the tree of your model, and the diagrams. This page explains each part of the window, and what the commands of each menu do. If you look for one command, go to Find a command.

Two words are used throughout this page. The model is your DbSchema project: the tables, columns and diagrams that you see in DbSchema. The database is the real database on the server. Database Terms explains these and the other words of database design.

The DbSchema window with the shop model, with numbered markers on the menu bar, the toolbar, the Structure tree, the diagram tabs, the diagram, the History and Perspective panes, the AI Assistant side bar and the model checks

The numbers in the picture mark these parts:

NumberPartWhat it is for
1Menu barEvery command of DbSchema, grouped in menus. Each menu has a section below.
2ToolbarThe commands that you use most often
3StructureA tree of the schemas, tables, views and other objects of the model
4Diagram tabsOne tab for each open diagram. Press + to add a diagram.
5DiagramThe tables and the foreign keys between them
6HistoryThe SQL statements that DbSchema ran in the database
7PerspectiveA small preview of the whole diagram. Drag the frame inside it to move around the diagram.
8AI AssistantA side bar where you ask an AI model about your schema, or ask it to write SQL
9Model checks and searchThe number of problems that the model checks found, and a box to find a table on the open diagram

In the toolbar, the connection button shows the database that the model is connected to, here PostgreSQL. Refresh compares the model with the database and updates the model with the changes from the database. The arrow beside Refresh opens a menu with more commands.

In the Structure tree, right-click an object to edit it, open its data or add it to a diagram. Click the Structure tab on the left edge to hide or show this side bar.

On the diagram, double-click a table header to edit the table. See Diagrams. Click the model checks button to see the problems. The AI Assistant page covers the side bar.

The model file (.dbs) keeps the schema, the diagrams and the editors that you open on each diagram. Query → Reopen opens these editors again.

Open the SQL Editor and the data tools

Editors open in a separate area below the diagram. Each editor has a tab, so several can stay open.

  1. Press Editor in the toolbar and choose SQL Editor from its menu. You can also choose Query → SQL Editor, or press Ctrl+E.
  2. Type a query and press Run.
  3. The result shows in a grid under the query.
The SQL Editor open under the Main Diagram, with a query that counts the orders by status and its result grid

The Data and Query toolbar buttons have menus too. Choose Data Explorer under Data to open the Data Explorer, or Query Builder under Query to open the Query Builder.

Find a command

I want to…Menu path
Connect to a databaseDatabase → Add Connection
Switch to another connection, or work offlineDatabase, then the connection, or Offline (connect later)
See or edit all saved connectionsDatabase → Manage Connections
Add or update a JDBC driverDatabase → Manage Connections → JDBC Drivers
Read changes from the database into the modelDatabase → Refresh Model from Database, or Selective Refresh Model Schemas from Database (F5)
Create or change the tables in the database from the modelDatabase → Create or Upgrade Model in the Database
Compare the model with another model fileModel → Compare Model with Other Model From File
Export HTML5 or PDF documentationFile → Export As... → HTML5/PDF Documentation (Ctrl+D)
Export the schema as an SQL scriptFile → Export As... → Export Schema & Data (F2)
Save the diagram as an imageFile → Export As... → Diagram Image
Use GitFile → Git Collaboration
Change the settingsEdit → Settings
Write and run SQLQuery → SQL Editor (Ctrl+E)
Browse and edit dataQuery → Data Explorer (Ctrl+R)
Build a query with the mouseQuery → Query Builder (Ctrl+B)
Fill tables with random dataDatabase → Data Generator
Import data from CSV, XML or Excel filesDatabase → Data Importer
Manage the database's users, roles and grantsDatabase → Users & Roles
Check the model for problemsModel → Model Validation
Choose what an AI may do in this modelFile → Properties
Register a licenseHelp → Register License
Check for a new versionHelp → Software Updates → Check For Updates
Change the themeView → Appearance → Theme
Make the text and icons largerView → Appearance → UI Scale
See the keyboard shortcutsHelp → Hotkeys

The arrow of the Refresh toolbar button opens some of these commands too. It holds Create or Upgrade Model in the Database, Compare Model with Other Model From File, Git Collaboration and Export Schema & Data.

Look through the menus

The clip opens each menu in turn, from File to Help.

This page shows the menus that DbSchema has for a relational database, such as PostgreSQL. With MongoDB, or in a logical design, some menu items have other names or are hidden.

File

Create, open, save and export models.

ItemWhat it does
New ModelStarts a new model, the same way as the Welcome Screen
Open Model from File (.dbs), Reopen Model from FileOpen a saved model file. Opening a saved model needs DbSchema Pro.
Save Model to FileSaves the model file. Saving a model needs DbSchema Pro.
Import Model from SQL or Data FilesBuilds a model from a script of CREATE TABLE statements, or from data files
Export As...Exports the documentation, the SQL script of the schema, or the diagram as an image
PropertiesShows the model's name, database type and comment. It also shows the AI Tool Preset, which sets what an AI may do in this model (AI Permissions).
Git CollaborationShares the model file through a Git repository (Git)
CloseCloses the model and shows the Welcome Screen

Edit

Undo, Redo, Copy as SQL, Paste from SQL, Find and Settings. In Settings, you set the options of the SQL Editor, the documentation, the AI, the network and proxy, the software updates, the graphics and more.

The DbSchema Settings dialog with the Projects page open and the other pages listed on the left, from Language and Formats to Graphics

View

How the diagram and the window look.

ItemWhat it does
Zoom In, Zoom Out, Zoom 100%, Choose Zoom...Zoom the diagram
Diagram DisplayShows or hides the data types, the schema name, the dot grid and more
Foreign KeysChanges the symbols and the text on the foreign key lines
AppearanceHolds Theme, Language and UI Scale
WindowSwitches to full screen, and lists the open DbSchema windows

Diagram

Add diagrams, and add shapes and notes to them.

ItemWhat it does
New Diagram, New Empty Diagram, Duplicate Diagram, Diagram PropertiesAdd or change a diagram
Restore...Lists every diagram of the model, so you can open one that you closed
Create Shape, Create Callout, Create Group of TablesAdd shapes, notes and groups to the diagram
Generate Flow Diagram, Refresh Flow from SQLShow which tables the procedures, triggers and scripts read or change. Both need DbSchema Architect.
Auto Arrange TablesLays out the tables again

Model

The objects of the schema, and the tools that check it.

ItemWhat it does
Create Table, View...Opens a submenu to create tables, columns, foreign keys, views, procedures and the other objects
Quick Table EditorEdits several tables at once (Quick Table Editor)
Model Validation, Find Virtual Foreign Keys, Find Cyclic DependenciesCheck the model
Compare Model with Other Model From FileCompares this model with another .dbs file
Comment Tags, GroupsOrganize the tables
Convert ModelConverts the model to another database type
Flyway Migrations...Writes the next migration file from the differences between the model and a folder, a database, a revision or another model
DictionariesOpens the Conversion Dictionary and the Naming Dictionary, which set how data types and names are converted
Naming RulesOptions that you tick: Prefix Table Name with Schema Name, Enforce DBMS Preferred Letter Cases, and, where a query names both the database and the schema, Prefix Schema Name with Database Name

Database

The connection, and the tools that read from the database or write to it. The first items are your connections, such as PostgreSQL here. Choose one to connect to it. Offline (connect later) disconnects. Your edits then stay in the model only.

ItemWhat it does
Add ConnectionConnects to another database. See Connect to a database.
Manage ConnectionsLists your saved connections. Its JDBC Drivers button opens the JDBC Drivers Manager.
Refresh Model from DatabaseCompares the model with the database, and updates the model with the changes from the database
Selective Refresh Model Schemas from DatabaseDoes the same for the schemas that you choose
Create or Upgrade Model in the DatabaseApplies the model to the database. Shows each SQL statement before it runs (Schema Synchronization).
Synchronization SettingsSets the options of the comparison
Data Importer, Data GeneratorFill tables with data from files, or with random data
Users & RolesCreates a plan of the database's users, roles and permissions. Then synchronizes the plan with the database.
PluginsHolds Database Locks, Running Queries, Space Usage and User Management
The Database Connections dialog with the saved PostgreSQL connection to shopdb and the buttons Add, Import, Export, JDBC Drivers, Connect and Cancel

Query

Write queries, and browse and edit data.

ItemWhat it does
SQL Editor, Query Builder, Data ExplorerOpen an editor to write SQL, to build a query with the mouse, or to browse data
SQL Editor from DDL FileOpens an SQL file in the editor
ReopenLists the editors saved in the model, so you can open one again
Search Data, CSV Editor, Automation ScriptsSearch the data, edit CSV files, and run scripts

Help

Learn DbSchema, get support, and manage the license.

ItemWhat it does
Help Contents, Quick Tour, Tips & Tricks, SQL Tutorial, Video TutorialsHelp you learn DbSchema
Report a Bug, Output LogsSend a bug report, and read the log
Register License, Unregister License, Purchase or Renew LicenseManage the license
HotkeysLists the keyboard shortcuts
Software Updates → Check For UpdatesChecks for a new release
About DbSchemaShows the version, the license and the memory that DbSchema uses

Common problems

I can't find Connections

The connections are in the Database menu: Add Connection for a new one, and Manage Connections for all of them. The connection button in the toolbar lists them too.

Where is the JDBC Drivers Manager?

Choose Database → Manage Connections, then press JDBC Drivers at the bottom of the dialog.

There is no Git option under Model

Git is in the File menu: File → Git Collaboration.

I don't see the Deploy option

To deploy the model, use Create or Upgrade Model in the Database. It is in the Database menu, and under the Refresh toolbar button. DbSchema first lists the schemas and tables to create. Then it shows each SQL statement, and runs it when you press Execute.

Where is the Query Editor?

The Query Editor is called Query Builder now: Query → Query Builder, or Ctrl+B.

Next steps