Tables are the basic building blocks of a database. Explore how to create and maintain them in SqlDBM
Tables on the diagram
SqlDBM allows users to see tables and their columns on the canvas
A table will display certain metadata and identifiers:
• Schema name
• Table name
• Line of Primary key indicator
• Column name
• Datatype
• Primary or Foreign key indicators
• Null Indicator
Create table
Create a new table using:
1. The top bar. Click on the "Add Table" icon
2. Clicking on an existing table. Click on the icon near a table. The icon by the left of the table creates a child table. An icon by the right of the table creates a parent table.
3. Using the explorer context menu
4. Using the explorer bottom bar
5. Using the Shortcuts. Use Insert key
6. Using the diagram context menu. Right-click on any empty space on the canvas.
Edit mode
For creating or editing columns, use the edit mode. You can call it by double-clicking on the table or pressing the Enter key.
Notice that In edit mode, all columns that are represented above the solid line are considered Primary keys.
Table in Explorer
You can find all tables, along with other database objects, in the Diagram explorer and Database explorer panels. The table icons may be colored if the color indicator was set in the Table properties.
Common Table Properties
Use the table properties to configure your tables. The properties will depend on your database/project type, where applicable. These are the general properties that can be set regardless of table type and database type:
• Table
• Columns
• Indexes and constraints (or clusters, indexes and keys)
• Postscript
• Description
• Format
• Related objects
Table
Type:
• Schema name,
• Logical table name
• Physical table name
Use the Override button to make the physical name identical to the logical one. Pay attention to naming conventions, they will determine what types of names are permitted.
Columns
Here you can see the full list of columns. You also may create, remove, and copy them using the Column bottom bar.
Click on the column name to be redirected to column properties.
Indexes and constraints
This tab is dedicated to indexes, primary keys, foreign keys, alternative keys, clustering keys and partitioning keys. Click on the Key icon to hide or show Foreign keys.
Click the Clustering key icon to create it (available for Snowflake project only).
Post Script
You may add a post-deployment script into specific input (up to 10000 characters). It will be injected after CREATE TABLE script section. This is useful for granting privileges after a table is created.
Description
Add a description to make your database more understandable for other team members. It will be injected as a comment in the generated script, and you also will description in "Database Documentation" option.
Format
Use a specific palette to colorize the table. Then you can see the same color for icon that near the object name in the Explorer panel. Notice, by default, the table has the same color indicator as the related schema.
Related objects
This option helps users bring parent and child tables if they were hidden from the current diagram. You also can easily navigate to them to understand clearer relations in your projects.
Visibility
Affects the table's visibility in:
Different view modes
Import to the Logical Project
DDL generated during forward engineering (FE)
Refer to the table below to understand how the selected visibility settings affect the table. Visibility can also be assigned at the column level; table-level visibility takes precedence in case of a conflict.
Visibility | View in (view mode) | Included in Logical Project Import | Generated in Forward Engineering (FE) |
Physical & Logical | All | Yes | Yes |
Logical only | Logical, Conceptual | Yes | No |
Physical only | Physical, Descriptions, Pk/Ak, Keys | No | Yes |
See also:
• Explorer