In relational databases, a schema is a named container that groups tables, views, sequences, and other objects. Think of it as a namespace — a schema can contain only one table with a given name. DbSchema displays schemas in the tree panel on the left; expanding a schema reveals all its objects.
A table is a collection of data focused on a specific topic — for example customers, orders, or products. Tables are made up of columns (which define what data can be stored) and rows (the actual data records). Each row is uniquely identified by its primary key.
Right-click the diagram canvas and choose New Table, or use the toolbar button. Give the table a name and press Enter. The table appears on the canvas and is immediately listed in the tree panel.
Double-click the table header on the diagram to open the Table Dialog. From here you can:
age > 14 OR with_parents = true
The Options tab covers engine, charset, tablespace, and other settings specific to your database.
Every column holds one specific type of data. To add or edit a column, open the Table Dialog and go to the Columns tab, or double-click any column directly in the diagram.
Each column must have a data type — for example VARCHAR(100), INTEGER, BOOLEAN, or TIMESTAMP. For numeric types you can also specify precision (total digits) and scale (decimal digits).
NULL is not allowedtrue for booleans, 0 for numbers, current_date() for datesAUTO_INCREMENT; PostgreSQL and SQL Server use IDENTITYA primary key uniquely identifies each row in a table. It is defined on one or more columns and implies NOT NULL plus UNIQUE constraints. Primary key columns are highlighted with a key icon in the diagram.
To set the primary key, open the Table Dialog and go to the Indexes tab, then flag the relevant column(s) as the primary key.
Indexes speed up queries by letting the database locate rows without scanning the whole table. Each index is built on one or more columns.
DbSchema supports three index types:
Manage indexes in the Indexes tab of the Table Dialog.
Foreign keys create enforced references between tables — for example, every order.customer_id must match a row in the customers table. For full details on creating, editing, and working with foreign keys (including virtual foreign keys and composite keys), see the Foreign Keys page.