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 numbers in the picture mark these parts:
| Number | Part | What it is for |
|---|---|---|
| 1 | Menu bar | Every command of DbSchema, grouped in menus. Each menu has a section below. |
| 2 | Toolbar | The commands that you use most often |
| 3 | Structure | A tree of the schemas, tables, views and other objects of the model |
| 4 | Diagram tabs | One tab for each open diagram. Press + to add a diagram. |
| 5 | Diagram | The tables and the foreign keys between them |
| 6 | History | The SQL statements that DbSchema ran in the database |
| 7 | Perspective | A small preview of the whole diagram. Drag the frame inside it to move around the diagram. |
| 8 | AI Assistant | A side bar where you ask an AI model about your schema, or ask it to write SQL |
| 9 | Model checks and search | The 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.
- Press Editor in the toolbar and choose SQL Editor from its menu. You can also choose Query → SQL Editor, or press Ctrl+E.
- Type a query and press Run.
- The result shows in a grid under the query.
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 database | Database → Add Connection |
| Switch to another connection, or work offline | Database, then the connection, or Offline (connect later) |
| See or edit all saved connections | Database → Manage Connections |
| Add or update a JDBC driver | Database → Manage Connections → JDBC Drivers |
| Read changes from the database into the model | Database → Refresh Model from Database, or Selective Refresh Model Schemas from Database (F5) |
| Create or change the tables in the database from the model | Database → Create or Upgrade Model in the Database |
| Compare the model with another model file | Model → Compare Model with Other Model From File |
| Export HTML5 or PDF documentation | File → Export As... → HTML5/PDF Documentation (Ctrl+D) |
| Export the schema as an SQL script | File → Export As... → Export Schema & Data (F2) |
| Save the diagram as an image | File → Export As... → Diagram Image |
| Use Git | File → Git Collaboration |
| Change the settings | Edit → Settings |
| Write and run SQL | Query → SQL Editor (Ctrl+E) |
| Browse and edit data | Query → Data Explorer (Ctrl+R) |
| Build a query with the mouse | Query → Query Builder (Ctrl+B) |
| Fill tables with random data | Database → Data Generator |
| Import data from CSV, XML or Excel files | Database → Data Importer |
| Manage the database's users, roles and grants | Database → Users & Roles |
| Check the model for problems | Model → Model Validation |
| Choose what an AI may do in this model | File → Properties |
| Register a license | Help → Register License |
| Check for a new version | Help → Software Updates → Check For Updates |
| Change the theme | View → Appearance → Theme |
| Make the text and icons larger | View → Appearance → UI Scale |
| See the keyboard shortcuts | Help → 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.
| Item | What it does |
|---|---|
| New Model | Starts a new model, the same way as the Welcome Screen |
| Open Model from File (.dbs), Reopen Model from File | Open a saved model file. Opening a saved model needs DbSchema Pro. |
| Save Model to File | Saves the model file. Saving a model needs DbSchema Pro. |
| Import Model from SQL or Data Files | Builds 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 |
| Properties | Shows 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 Collaboration | Shares the model file through a Git repository (Git) |
| Close | Closes 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.
View
How the diagram and the window look.
| Item | What it does |
|---|---|
| Zoom In, Zoom Out, Zoom 100%, Choose Zoom... | Zoom the diagram |
| Diagram Display | Shows or hides the data types, the schema name, the dot grid and more |
| Foreign Keys | Changes the symbols and the text on the foreign key lines |
| Appearance | Holds Theme, Language and UI Scale |
| Window | Switches to full screen, and lists the open DbSchema windows |
Diagram
Add diagrams, and add shapes and notes to them.
| Item | What it does |
|---|---|
| New Diagram, New Empty Diagram, Duplicate Diagram, Diagram Properties | Add 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 Tables | Add shapes, notes and groups to the diagram |
| Generate Flow Diagram, Refresh Flow from SQL | Show which tables the procedures, triggers and scripts read or change. Both need DbSchema Architect. |
| Auto Arrange Tables | Lays out the tables again |
Model
The objects of the schema, and the tools that check it.
| Item | What it does |
|---|---|
| Create Table, View... | Opens a submenu to create tables, columns, foreign keys, views, procedures and the other objects |
| Quick Table Editor | Edits several tables at once (Quick Table Editor) |
| Model Validation, Find Virtual Foreign Keys, Find Cyclic Dependencies | Check the model |
| Compare Model with Other Model From File | Compares this model with another .dbs file |
| Comment Tags, Groups | Organize the tables |
| Convert Model | Converts 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 |
| Dictionaries | Opens the Conversion Dictionary and the Naming Dictionary, which set how data types and names are converted |
| Naming Rules | Options 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.
| Item | What it does |
|---|---|
| Add Connection | Connects to another database. See Connect to a database. |
| Manage Connections | Lists your saved connections. Its JDBC Drivers button opens the JDBC Drivers Manager. |
| Refresh Model from Database | Compares the model with the database, and updates the model with the changes from the database |
| Selective Refresh Model Schemas from Database | Does the same for the schemas that you choose |
| Create or Upgrade Model in the Database | Applies the model to the database. Shows each SQL statement before it runs (Schema Synchronization). |
| Synchronization Settings | Sets the options of the comparison |
| Data Importer, Data Generator | Fill tables with data from files, or with random data |
| Users & Roles | Creates a plan of the database's users, roles and permissions. Then synchronizes the plan with the database. |
| Plugins | Holds Database Locks, Running Queries, Space Usage and User Management |
Query
Write queries, and browse and edit data.
| Item | What it does |
|---|---|
| SQL Editor, Query Builder, Data Explorer | Open an editor to write SQL, to build a query with the mouse, or to browse data |
| SQL Editor from DDL File | Opens an SQL file in the editor |
| Reopen | Lists the editors saved in the model, so you can open one again |
| Search Data, CSV Editor, Automation Scripts | Search the data, edit CSV files, and run scripts |
Help
Learn DbSchema, get support, and manage the license.
| Item | What it does |
|---|---|
| Help Contents, Quick Tour, Tips & Tricks, SQL Tutorial, Video Tutorials | Help you learn DbSchema |
| Report a Bug, Output Logs | Send a bug report, and read the log |
| Register License, Unregister License, Purchase or Renew License | Manage the license |
| Hotkeys | Lists the keyboard shortcuts |
| Software Updates → Check For Updates | Checks for a new release |
| About DbSchema | Shows 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.