SqlOtter
← All documentationManage objects

Manage objects

Explore database relationships

Inspect loaded table/field metadata and relational foreign keys, with scoped selection, search, layout and diagram-local navigation.

What this feature does

Open a database or current-table diagram, choose its displayed scope, inspect key/field pairs and arrange the loaded graph without editing the database. MongoDB references use a separate naming heuristic.

When to use it

Use a visual overview to understand available definitions and dependencies, then check exact namespace and constraints in their dedicated metadata views.

Real Database Diagram window with all text mosaicked at the owner request; table-node positions, grid and colored links remain visible.
All window-title, toolbar, tree and table-node text, including values and comments, is mosaicked at the owner request. The real node positions, grid and links remain visible. The private supplied original shows 25% and empty search 0/0; those labels are hidden in this public image. No exact target, engine/build, enforced relationship or completed workflow is established.

Before you start

An existing connection and verified database/Schema, access to the required metadata, and an engine whose diagram capability is available. Existing empty or partial states are valid; no new database, object, data or permission change is needed. All DM8 support depends on Python Wheel support from the DM8 vendor; follow-up is ongoing.

Default shortcuts and diagram controls

F3/F9 are configurable main-window actions. The remaining rows describe reviewed diagram-local handlers and visible controls; source review does not establish physical-key acceptance.

Default shortcuts and diagram controls
ActionWindows / LinuxmacOSFocus and effect
Database → Database DiagramF3F3Main workspace; verify the active/clicked database and Schema. Configurable Show Diagram action.
Table → Diagram / table-tree DiagramF9F9Main workspace; current or selected table, then same-prefix-group related view. Configurable Diagram action.
Choose the displayed scopeAll Tables / group / table clickAll Tables / group / table clickAll Tables draws all loaded objects; group-only and single-table selections have different relationship expansion rules.
Select several table rowsNative tree extended selectionNative tree extended selectionSeveral table rows can expand a full connected component beyond the selected rows. Avoid mixing group headings and table rows.
Focus diagram searchCtrl+F⌘FActive diagram or its child control; focuses and selects the search input.
Submit search / next unchanged queryEnterEnter / ReturnSearch input; a new query searches visible nodes, unchanged successful query advances. Typing alone does not search.
Previous matching table↑ Previous Match button↑ Previous Match buttonSearch results; wraps backward. Shift+Enter is not established as Previous Match.
Next matching table↓ Next Match button↓ Next Match buttonSearch results; wraps forward. Counter is current matching table / total matching tables.
Clear diagram search× Clear Search× Clear SearchClears text, counter and search highlighting; no metadata reload or node deletion.
Set match case / regexAa / .* buttonsAa / .* buttonsChoose before a fresh search; with unchanged text, clear/re-enter after changing mode. No separate diagram default is established here.
Reuse search historyHistory controlHistory controlSearch-input history; selecting an item runs diagram search, rather than opening a table.
Jump to a match markerCanvas scrollbar marker clickCanvas scrollbar marker clickCanvas vertical scrollbar; selects/centers the matching table. Left-tree markers also show positions.
Arrange visible nodesAuto Layout buttonAuto Layout buttonRepack, fit and center the loaded graph; no server metadata refresh or saved layout.
Layout from blank canvasCtrl+double-clickQt ControlModifier + double-clickCanvas area without a table; source uses Qt ControlModifier only. macOS physical mapping remains pending; Auto Layout is the reliable explicit control.
Move a table nodeLeft-drag a tableLeft-drag a tableMoves a graphic node and updates links; does not change a table definition.
Pan the canvasLeft-drag blank canvasLeft-drag blank canvasStart away from tables and relationship lines. Plain wheel input scrolls.
Set displayed zoomZoom slider / percentage boxZoom slider / percentage boxDisplayed control range 25–300%; adjusts the diagram only.
Zoom with the wheelCtrl+wheelCommand or Control + wheelPointer over canvas; both Qt Control/Meta modifiers are accepted. Physical boundary behavior remains to be checked.
Zoom in without ShiftCtrl+=⌘=Active diagram; use the unshifted equals key. A Shift-modified plus/equals can invoke reset instead.
Zoom out without ShiftCtrl+-⌘-Active diagram; Shift-modified minus/underscore is the separate reset handler.
Reset displayed zoom to 100%Reset 1:1 / Ctrl+Shift+= / Ctrl+Shift+-Reset 1:1 / ⌘⇧= / ⌘⇧-Active diagram; the Shift reset handler takes precedence over zoom-in/out. This is diagram zoom, not application UI zoom.
Expand / collapse fieldsExpand / Collapse; title double-clickExpand / Collapse; title double-clickNodes with more than ten fields; toggles visible columns. Labels remain English in the current graphics code.
Center a node and toggle zoomNode-body double-clickNode-body double-clickSeparate from title expansion; toggles 100% and remembered non-100% zoom when available.
Toggle gridShow Grid Lines checkboxShow Grid Lines checkboxVisual grid only; enabled on setup, with no snap-to-grid editing.
Toggle commentsShow Comments checkboxShow Comments checkboxStarts checked; redraws the current loaded scope and can replace manual display state.
Inspect a relationshipLeft-click a lineLeft-click a lineSelects linked field rows and transient endpoint details; shared segments can select several connections.
Locate the constrained FK fieldRight-click a selected lineRight-click a selected lineNavigates the first selected matching connection toward its constrained table/field; does not open a relation editor.
Open table contentTable row/node → Open TableTable row/node → Open TableRight-click an actual table, then verify the main workspace target. No dedicated diagram-local key is assigned.
  • Settings → Shortcuts controls the F3/F9 bindings; customized keys take precedence. The active diagram’s local handlers and mouse gestures are separate from those main-window bindings.
  • Ctrl/Command plus F, zoom keys and the wheel are accepted through Qt Control/Meta handling. The blank-canvas layout double-click tests Qt ControlModifier only; do not assume a physical macOS Control key. Use Auto Layout until physically checked.
  • Shift plus a modified +, =, - or _ is reset-to-100%, processed before zoom-in/out. Use unshifted = to zoom in; the physical + key can require Shift and therefore reset instead.
  • On macOS, ⌘ means Command and ⇧ means Shift; F3/F9 may require Fn or an OS keyboard setting. Native tree multi-selection, focus, keyboard layouts and OS-reserved keys remain pending live checks.
  • There is no reviewed diagram export, Save/Apply/Execute, remote Refresh, Delete relationship or Ctrl+0 reset binding in this window. A tooltip or menu label is not proof of a successful physical gesture.

How to use it

  1. Verify the main connection/database/Schema. Open Database → Database Diagram (F3), or the intended table’s Diagram entry (F9).
  2. Wait for metadata loading and inspect actual feedback. Choose All Tables, a prefix group or table rows using their different relationship-expansion rules.
  3. Read fields, key markers and endpoint details. For relational engines compare declared keys; treat MongoDB links as inferred references.
  4. Search the currently drawn table/field names and comments with Enter, visit matches, then use layout, panning, expansion and zoom to inspect them.
  5. Use Open Table only after checking the main workspace target. Keep structure/data editing and other export flows separate, and reopen for a new metadata-load attempt when needed.

Verify the database and Schema before opening

The diagram loads a database target and the main workspace’s current Schema context. Its left-hand groups are table-name groups.

  1. Activate the intended workspace, connection and database tab. Check the connection identity as well as the database name; another connection can contain a database with the same name.
  2. For a Schema-based engine, choose and verify the Schema in the main workspace before opening the diagram. The diagram has no independent Schema picker.
  3. Use Database → Database Diagram for the database view, or Table → Diagram / a table-tree Diagram entry for the current table. Prefer activating the target database first, especially when using a database context menu.
  4. Keep the connection, database, Schema, account and engine with your observations. A database name in the diagram title alone does not establish the full target.
  • The database command is Database → Database Diagram; the current-table command is Table → Diagram. Check the target before using either entry.
  • The window is non-modal. Changing the main workspace while it remains open does not turn its loaded metadata into a new target’s diagram.

Open the database diagram with F3

F3 and Database → Database Diagram enter the same database-diagram flow.

  1. With the target database active, choose Database → Database Diagram or press its configured F3 binding.
  2. Wait for the background metadata load and any loading/drawing progress to finish. The dialog is shown maximized and remains switchable with its owner workspace.
  3. Inspect the left All Tables entry and the graph. Select All Tables again if you need to draw all loaded objects, then use Auto Layout if the current view needs arranging.
  4. Read actual error or no-tables feedback before continuing. An enabled menu, a progress message or an opened window does not establish a complete successful metadata read.
  • No database selected produces a selection warning. No tables or collections found produces an information message and closes the diagram.
  • F3 is a configurable main-window action. Availability still depends on the engine, connection and metadata access.

Open a table’s related diagram with F9

The current-table entry uses the database metadata loader, then focuses a related neighborhood without running a text search.

  1. Select the intended table in its main table tree, or activate the intended table tab. Check its database and Schema first.
  2. Choose Table → Diagram, the table-tree Diagram item, or F9. If metadata is still loading, the table focus is deferred until the load finishes.
  3. Inspect the selected table and its incoming/outgoing relationship neighborhood. For one selected table, traversal stays within that table’s prefix group, including OTHER where applicable.
  4. Choose All Tables or an appropriate multi-table selection when investigating a relationship across prefix groups. A single-table view can omit a real link outside its allowed group.
  • This view can follow several relationship hops within the allowed group; it is not limited to direct neighbors or guaranteed to show every database dependency.
  • The opened-for-table toast is not proof that the intended node, Schema or full neighborhood was actually loaded. Verify the visible objects.

Choose All Tables, prefix groups or table rows

The tree controls what is drawn from the loaded snapshot; its section names are not database Schemas.

  1. Select All Tables to draw every loaded table or collection and relationships whose two endpoints are loaded.
  2. Select a prefix group to draw that group’s members and only links with both endpoints inside the selected group set. Grouping uses names and places ungrouped objects under OTHER.
  3. Select one table for its same-group related neighborhood. Use the tree’s native extended-selection gesture for several table rows when a broader relationship component is needed.
  4. Multiple table rows can recursively include connected tables beyond the selected rows and prefix groups. Do not interpret the selection as a strict allow-list.
  5. Keep group-only and table-row selections separate when choosing scope: a mixed selection follows the table-row path rather than simply combining all group members. Allow the short selection debounce to finish.
  • Clicking an already selected tree row forces a redraw of that scope. It does not issue a fresh server metadata load.
  • Names, singular/plural variants and shared prefixes can affect grouping. A group label is not evidence of ownership, permissions or namespace identity.

Understand declared relational links and their direction

Relational diagrams read foreign-key metadata; they do not infer business links from similarly named fields.

  1. Treat a relational line as a relationship returned by the engine’s metadata loader. Both endpoint tables must be available in the loaded and displayed scope.
  2. Read the detail direction as referenced_table.key → constrained_table.foreign_key. The arrow text runs from the referenced key to the child’s constrained field.
  3. A composite foreign key can appear as several field-pair lines. These are visual pairs from one definition, not evidence of separate independently enforced constraints.
  4. For missing or unexpected links, compare the actual definition in table structure / relations and the current Schema. The canvas is not a complete cross-Schema or cross-database identity model.
  • The graph is keyed by table names, and normalized diagram records do not retain a full namespace identity for every endpoint. Same-named objects and cross-namespace references need independent checking.
  • MongoDB uses a separate heuristic reference path described below. Its links must not be described as declared relational foreign keys.

Select a line and locate its foreign-key field

Relationship interactions inspect and navigate existing graph items without editing a constraint.

  1. Left-click a relationship line to select it, highlight its linked field rows and show the referenced-key → constrained-field detail panel.
  2. At a shared bus segment, more than one relationship can be selected and listed. Read each endpoint instead of assuming the segment identifies one constraint.
  3. Right-click a selected line at that segment to navigate toward the constrained table’s foreign-key field. The field is expanded when necessary and the left tree follows the target.
  4. Move or interact elsewhere to dismiss the transient details; click a table or blank canvas to clear the relationship selection.
  • When several selected connections overlap, right-click navigation uses the first matching selected connection. Check the resulting table and field.
  • Dragging, selecting or right-clicking a line does not create, alter, drop or validate a foreign key.

Visit, wrap and clear search matches

Search navigation moves the view and tree selection while retaining the drawn graph.

  1. After a successful search, press Enter again with unchanged text to move to the next matching table. The ↓ Next Match button does the same.
  2. Use ↑ Previous Match to move backward. Navigation wraps at either end; reaching the last match on the forward path can show a wrap notice.
  3. Click a match marker on the canvas’s vertical scrollbar to select that matching table and center it. The left tree also displays match markers and keyword highlights.
  4. Use × Clear Search to remove text, the result counter and search highlighting. Clearing search does not delete nodes or reload server metadata.
  • The dialog’s Enter handler is not a general previous-match binding: Shift+Enter is not established as Previous Match. Use the ↑ button.
  • Search selects and centers a table; it does not open its data or guarantee that every matched field in a collapsed node is visible.

Arrange the visible graph with Auto Layout

Auto Layout repacks the displayed nodes to the viewport, adjusts fit and updates connections.

  1. Choose the table scope first. Use Auto Layout when table panels overlap or the current arrangement is hard to follow.
  2. The implementation tiles name groups using the rendered panel sizes and available width, then adjusts zoom and centering. It does not expose a selectable force-directed or hierarchical algorithm.
  3. Drag a node to adjust its position for inspection. Links update with the node; a later Auto Layout or redraw can replace that manual arrangement.
  4. The empty-canvas double-click gesture with Qt ControlModifier also invokes layout and centering. Use the Auto Layout button when the platform’s physical modifier mapping is uncertain.
  • Auto Layout uses the loaded metadata snapshot; it does not re-query the server, repair a Schema, save a layout or guarantee a crossing-free diagram.
  • The grid is a visual aid; this path does not implement snap-to-grid editing.

Pan and zoom without moving database objects

Canvas panning, node dragging and zooming have different focus and modifier rules.

  1. Left-drag from blank canvas to pan. Starting the drag on a table moves that table instead; a relationship is also not blank canvas. Ordinary wheel input scrolls the view.
  2. Use the Zoom slider or percentage box for the displayed 25–300% range. Reset 1:1 returns the displayed zoom to 100%.
  3. Over the canvas, Ctrl or Command plus the mouse wheel zooms. In the active diagram, unshifted Ctrl+= / ⌘= zooms in and Ctrl+- / ⌘- zooms out.
  4. Ctrl/⌘+Shift with a plus, equals, minus or underscore key is handled as reset-to-100% before zoom-in/out. On a layout where typing + needs Shift, prefer unshifted = or the slider for zoom-in.
  5. Double-click the node body to center it and toggle between 100% and the remembered non-100% zoom. With no remembered alternate zoom, centering can occur without a zoom change.
  • These are diagram-local handlers. A browser zoom key, SQL Editor key, native text-input behavior or a function key captured by the OS is a different context.
  • The displayed range and modifier handling are source-reviewed; physical keyboards, boundary wheel steps and platform mappings still need live verification.

Expand fields and toggle comments or grid lines

These controls change the presentation of loaded nodes rather than database definitions.

Real Database Diagram window with all text mosaicked at the owner request; table-node positions, grid and colored links remain visible.
All window-title, toolbar, tree and table-node text, including values and comments, is mosaicked at the owner request. The real node positions, grid and links remain visible. The private supplied original shows 25% and empty search 0/0; those labels are hidden in this public image. No exact target, engine/build, enforced relationship or completed workflow is established.
  1. Use Show Grid Lines to hide or show the visual grid; it is enabled during dialog setup.
  2. Use Show Comments to include or suppress available table and field comments. It starts checked; toggling it rebuilds the current scope and can replace manual layout or expansion state.
  3. For a node with more than ten fields, click Expand / Collapse or double-click its title bar to toggle the field list. With ten or fewer fields, the title has no expansion to toggle.
  4. Double-clicking the body uses the center/zoom action instead. Keep the title, expansion control, body and blank-canvas gestures distinct.
  • Expand, Collapse and tooltip labels such as Table / Rows / Columns are literal English strings in this graphics implementation; the Chinese .ts entries do not imply that every node label is localized.
  • Showing comments, expanding fields and changing the grid do not fetch missing metadata or change stored comments.
  • The private supplied original shows grid/comments checked, 25% and empty search 0/0. All text is mosaicked in the public illustration at the owner request. A still does not establish toggling, resetting or searching.

Open table content from the diagram

A real table row or node has the shared Open Table context-menu action.

  1. Right-click a table node or an actual table row in the left tree, then choose Open Table. All Tables and group headings do not have this table-row action.
  2. The main workspace is raised and uses its table-tree/content-opening path. Double-clicking a node is the separate expand or center/zoom gesture.
  3. Before opening, restore the main workspace to the intended connection, database and Schema. The modeless diagram’s open path searches the main tree by name and can fall back to the main window’s current database.
  4. Verify the resulting tab and target. Opening table content can expose that grid’s normal editing commands; any later data edit has its own write boundary.
  • Open Table is the diagram table menu’s current action; it is not an Export, Edit Relationship or schema-designer menu.
  • A still-open diagram does not pin the main workspace target for later Open Table navigation. Same-name and changed-workspace contexts need extra care.

Keep diagram inspection, export and editing separate

The reviewed diagram window is read-only with respect to database structure and data.

  1. Use selection, search, layout, dragging and display controls for inspection. There is no diagram Save / Apply / Execute step, and closing the diagram does not commit a database change.
  2. The current toolbar, scene and table context menu expose no diagram PNG, SVG, PDF, SQL or layout-file export action. Do not look for an Export button in this window.
  3. Database/table/query-result exports are separate product flows with different scopes; their menu entries do not establish a diagram-export capability.
  4. Inspect or change actual fields and foreign keys in the dedicated Table Structure and Indexes / Constraints flows. Drawing or moving a connection here is not a DDL editor.
  • One authentic diagram still is included with all text mosaicked. The source review, not readable controls in this privacy-redacted image, establishes the absence of a diagram Export control; no export/edit/full-workflow result is shown.
  • Read-only does not mean no server work: metadata/statistics reads occur, and MongoDB field discovery can read collection contents. Screenshot/export privacy still depends on the actual names and comments shown.

Check relational, MongoDB and Redis limits

The capability matrix marks relational diagrams and MongoDB as partial; Redis is not applicable.

  1. For MySQL/MariaDB and related registered families, links come from available key metadata. PostgreSQL, SQL Server, Oracle/DM-family and other Schema-based engines also depend on the correctly resolved namespace, account and dialect loader.
  2. SQLite has no diagram Schema selector and reads its available table/foreign-key metadata. A displayed SQLite relationship is not proof that foreign-key enforcement is enabled.
  3. Snowflake can return declared key metadata even though the broader capability matrix does not promise foreign-key enforcement. A visible informational link is not an enforcement test.
  4. MongoDB discovers fields/types through metadata plus collection aggregation or sampling. Fields with id/ids naming patterns can be matched to collection-name variants and connected to _id. These are inferred references, not declared or validated foreign keys.
  5. Do not rely on a special line style to identify MongoDB inference; the graph is not a complete document schema or value-level reference check. Sparse fields, caches, permissions and name heuristics can omit or misidentify links.
  6. Redis does not support this relational diagram flow and is rejected or hidden by capability/action policies. A registered engine or visible menu is not proof of a supported successful run.
  • Partial status is not per-engine acceptance. Driver/server versions, account access, namespace resolution, full workflows, physical key/focus behavior and a named released build remain unverified for F17.
  • One authentic F17 diagram original is included, with build/engine and exact target unrecorded or pre-pixelated. No live desktop/database test is performed by this documentation pass; all 24 guides retain draft / release-pending status.

What to expect

The canvas presents the objects and field-pair links returned for the loaded/displayed scope. A nonempty canvas does not establish complete metadata, enforced relationships, a successful live workflow or release availability.

Limits and safety

  • Relational links come from declared metadata; cross-namespace and same-name identities can be incomplete. Single-table prefix limits and multi-table connected expansion differ.
  • MongoDB field discovery can read collection data and infer references from names; these are not validated foreign keys or a complete document schema. Redis diagrams are not applicable.
  • Search, tree redraw, grid/comments and Auto Layout reuse the snapshot. The reviewed window has no diagram-export or remote Refresh control and no schema/data commit action.
  • One authentic diagram original is integrated with all text mosaicked at the owner request. Physical-key, engine/namespace, complete workflow and named-release checks remain pending; all guides remain draft / release-pending.

If something goes wrong

  • Wrong or missing objects: verify connection/database/Schema, All Tables versus prefix selection, metadata permissions and source definitions. Do not treat the tree groups as Schemas.
  • Search 0/0: check the drawn scope, Aa / .* mode and regex validity; clear/re-enter after changing options. It counts matching tables, not field or row occurrences.
  • Unexpected zoom reset: use unshifted Ctrl+= / ⌘= or the slider. Shift-modified plus/minus/equals invokes reset to 100%.
  • No tables feedback can close the dialog; partial fields/keys/counts can remain after individual read failures. Preserve the actual state and reopen in the verified context rather than fabricating a complete diagram.