- Primary Key
- Unique
- Not Null
- Auto Increment
- Default Value
Canvas Overview
The editor canvas is the heart of ChartDB, providing real-time visual editing of your database schema.Drag & Drop
Move tables and organize your layout
Visual Relationships
See connections between tables in real-time
Inline Editing
Edit tables, fields, and relationships directly on canvas
Multi-Select
Select and manipulate multiple tables at once
Node Types
The canvas supports multiple node types for different diagram elements:Table Nodes
Table nodes are the primary elements representing database tables:- Structure
- Visual Indicators
- Editing Mode
Each table node displays:
- Table name and schema
- Column list with types
- Primary key indicators
- Foreign key badges
- Index information
- Relationship handles
Area Nodes
Group related tables together using area nodes:Note Nodes
Add documentation directly to your diagram:Edge Types
The canvas supports multiple edge types for different relationships:Relationship Edges
Visual representation of foreign key relationships:Cardinality Indicators
Cardinality Indicators
Relationships show cardinality at both ends:
- One: Single line endpoint
- Many: Crow’s foot endpoint
- One-to-Many
- Many-to-One
- One-to-One
- Many-to-Many
Relationship Labels
Relationship Labels
Edges display:
- Constraint name
- Source/target fields
- Cardinality symbols
Interactive Editing
Interactive Editing
Click a relationship edge to:
- Change cardinality
- Edit constraint name
- Delete relationship
- View relationship details
Dependency Edges
For view dependencies and table relationships:Canvas Controls
Background and Grid
The canvas includes a customizable background:MiniMap
Navigate large diagrams with the minimap:Zoom Controls
Built-in zoom and pan controls:Table Editing
Field Management
Edit fields directly in table edit mode:Constraints
Set field constraints in edit mode:Data Types
ChartDB supports all major database data types:- Numeric:
INT,BIGINT,DECIMAL,NUMERIC - String:
VARCHAR,TEXT,CHAR - Date/Time:
TIMESTAMP,DATE,TIME - Boolean:
BOOLEAN - JSON:
JSON,JSONB - Arrays:
TEXT[],INT[](PostgreSQL) - Binary:
BYTEA,BLOB
Creating Relationships
Visual Relationship Creation
Create relationships by connecting table fields:Relationship Validation
ChartDB validates relationships in real-time:Table Context Menu
Right-click any table to access quick actions:Edit Table
Edit Table
Opens the table in edit mode
Duplicate
Duplicate
Creates a copy of the table with all fields
Delete
Delete
Removes table and all associated relationships
Add Field
Add Field
Quickly add a new field to the table
Change Color
Change Color
Set a custom color for visual organization
Canvas Navigation
Keyboard Shortcuts
- Selection
- Editing
- Tools
Cmd/Ctrl + A- Select all tablesCmd/Ctrl + Click- Multi-select tablesShift + Drag- Box selection
Mouse Controls
- Left Click: Select/deselect
- Double Click: Edit table
- Right Click: Context menu
- Drag: Move selected items
- Scroll: Zoom in/out
Layout Management
Auto Layout
ChartDB provides automatic table positioning:perSchema: Groups tables by schemasingle: All tables in one group
Manual Positioning
Drag tables to arrange them manually:Alignment Tools
Align multiple selected tables:- Align left
- Align right
- Align top
- Align bottom
- Distribute horizontally
- Distribute vertically
Table Filtering
Filter tables on the canvas by various criteria:Canvas Filter Panel
The filter panel allows you to:Filter by Schema
Show/hide specific schemas
Search Tables
Find tables by name
Toggle Views
Show or hide database views
Filter Relationships
Show only related tables
Visual Customization
Table Colors
Customize table appearance:Theme Support
ChartDB supports light and dark themes:Advanced Features
Overlap Detection
ChartDB detects and highlights overlapping tables:Dynamic Table Sizing
Tables automatically resize based on content:Lost in Canvas Detection
Warning when you’re far from visible tables:Performance Optimization
The canvas is optimized for large diagrams:Virtualization
Virtualization
Only visible nodes and edges are rendered
Debounced Updates
Debounced Updates
Position updates are debounced to reduce re-renders:
Memoization
Memoization
Expensive calculations are memoized:
Edge Optimization
Edge Optimization
Edges are only recalculated when tables move
Accessibility
The editor includes keyboard navigation and screen reader support:- All actions accessible via keyboard
- Focus management for modals and panels
- ARIA labels for all interactive elements
- High contrast mode support
Next Steps
Export Options
Export your diagram to various formats
AI Migration
Use AI to migrate between databases
