Menus and Layout

This page shows what each part of the DbSchema window is for, and where every menu item sits. DbSchema 10.5 reorganized the menus, so a command that you knew may have moved. If you look for one command, go to Find a command.

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

The numbers in the picture mark these parts:

  1. Menu bar: every command of DbSchema, grouped in menus. Each menu has a section below.
  2. Toolbar: the commands you use most often. The connection button (PostgreSQL here) shows which database the model is connected to. Refresh compares the model with the database.
  3. Tree: the schemas, tables, views and other objects of the model. Right-click an object to edit it, open its data or add it to a diagram.
  4. Diagram tabs: one tab for each diagram. Press + to add a diagram.
  5. Diagram: the tables and their foreign keys. Double-click a table header to edit the table. See Diagrams.
  6. History: the SQL statements that DbSchema ran in the database while you edited the model.
  7. Perspective: a small picture of the whole diagram. Drag the frame in it to scroll the diagram.
  8. AI Assistant: a side bar where you ask an AI model to write SQL for you. See AI Assistant.
  9. Model checks and search: the triangle shows the result of model validation, the number of problems it found. The search box finds a table or another object by its name.

Everything you see in the window is saved in the model file (.dbs): the schema, the diagrams and the open editors.

Open the SQL editor and the data tools

Editors open under the diagram, in a pane of their own. Each editor has a tab, so several can stay open.

  1. Press Editor in the toolbar and choose SQL Editor. You can also choose Query → SQL Editor or press Ctrl+E.
  2. Type a query and press Run.
  3. The result shows in the grid under the query.
The SQL editor open under the diagram, with a query on the orders table and its result grid

The Data and Query toolbar buttons open the Data Explorer and the Query Editor the same way.

Look through the menus

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

The menus on this page are those of a relational database, such as PostgreSQL. With MongoDB, or with a model in logical design, some items have other names or are hidden.

File

The model file and what you make from it.

  • New Model, Open Model from File (.dbs), Reopen Model from File, Save Model to File: work with the model file. Saving the model needs DbSchema Pro.
  • Import Model from SQL or Data Files: build a model from a script of CREATE TABLE statements, or from data files.
  • Export As...: the HTML5/PDF Documentation, the SQL script of the schema (Export Schema & Data), and the diagram as an image (Diagram Image).
  • Git Collaboration: share the model file through a Git repository. See Git.

Edit

Undo, Redo, Find, and Settings. Settings holds the options of DbSchema: network and proxy, the SQL editor, the documentation, the software updates and more.

The DbSchema Settings dialog, with its sections listed on the left

View

How the diagram and the window look.

  • Zoom In, Zoom Out, Zoom 100%, Choose Zoom...
  • Diagram Display: show or hide the schema name, the column data types, the page borders and the deduced foreign keys.
  • Foreign Keys: the line style and the text on the foreign key lines.
  • Appearance: Theme, Language and UI Scale.
  • Window: full screen, and a list of the open DbSchema windows.

Diagram

New Diagram, Duplicate Diagram, Diagram Properties, and the shapes you add to a diagram: Create Shape, Create Callout, Create Group of Tables. Auto Arrange Tables lays out the tables again.

Model

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

  • Create Table, View...: tables, columns, foreign keys, views, triggers, functions, procedures, sequences and user data types.
  • Model Validation, Find Virtual Foreign Keys, Find Cyclic Dependencies: check the model.
  • Compare Model with Other Model From File: compare this model with another .dbs file.
  • Convert Model: convert the model to another database. Flyway Migrations..., Dictionaries and Naming Rules are here too.

Database

The connection, and the tools that read from or write to the database.

  • The first items are your connections, such as PostgreSQL here. Choose one to connect to it. Offline (connect later) disconnects, so your edits stay in the model only.
  • Add Connection: connect to another database. See Connect to a database.
  • Refresh Model from Database: compare the model with the database, and bring the database's changes into the model.
  • Create or Upgrade Model in the Database: deploy the model to the database. See Schema synchronization.
  • Data Importer and Data Generator: fill tables with data from files, or with random data.
  • Users & Roles and Plugins: the database's users, locks, running queries and space usage.
  • Manage: Edit Active Connection, Schema Mapping, Connections Manager and JDBC Drivers Manager.

Query

SQL Editor, Query Editor (the visual query builder), Data Explorer, Search Data, CSV Editor and Automation Scripts. SQL Editor from DDL File opens an SQL file in the editor.

Help

Help Contents, Quick Tour, Video Tutorials, Report a Bug and Output Logs. The license is here too: Register License, Unregister License and Purchase or Renew License. Software Updates checks for a new release.

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 Manager
Add or update a JDBC driverDatabase → Manage → JDBC Drivers Manager
Read changes from the database into the modelDatabase → Refresh Model from Database (F5 for selected schemas)
Deploy or upgrade 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 Editor (Ctrl+B)
Fill tables with random dataDatabase → Data Generator
Import data from CSV, XML or Excel filesDatabase → Data Importer
Check the model for problemsModel → Model Validation
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 Refresh button in the toolbar also holds Create or Upgrade Model in the Database, Compare Model with Other Model From File, Git Collaboration and Export Schema & Data.

Common problems

I can't find Connections

There is no Connections menu any more. The connections are in the Database menu: Add Connection for a new one, and Manage → Connections Manager for all of them.

Where is Settings?

Edit → Settings.

There is no Git option under Model

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

I don't see the Deploy option

Deploying is called Create or Upgrade Model in the Database, in the Database menu and under the Refresh toolbar button. DbSchema first lists the differences between the model and the database, so you choose what to deploy.

Next steps