SqlOtter
← All featuresManage objects

Manage objects

See how keys and indexes shape your data.

Inspect existing indexes and relationships, create supported indexes, and review foreign-key changes with engine-specific limits.

Current-development draft, source-reviewed and supplemented with three authentic owner originals on 2026-10-18. Four exact lossless crops show Index context, Add Index, Add Foreign Key and the matching pre-Execute preview. Execution, fresh metadata, enforcement, physical shortcuts, complete engine workflows and named-release acceptance remain pending.

How it works

Open Edit table structure for the selected existing table. Index shows Name, Type, Fields and Unique; Relations shows local/reference endpoints and actions. Relational Add Index/OK and Delete Index execute independently, while Relations additions/deletions wait for the parent save and SQL Preview. Docs now follows the captured test.test_docs example: idx_review_note on review_note, then id → test2.admin_menus.parent_id in a separate staged relationship and matching pre-Execute preview.

A quick walkthrough

  1. Check the connection, database/Schema and selected object-tree table. F6 opens read-only structure; Alt+Enter / ⌥+Enter opens editing where supported.
  2. Inspect indexes and full server definitions. The captured Add Index form checks review_note, names idx_review_note, selects BTREE and leaves Unique unchecked. Review before OK; relational OK and Delete Index directly attempt their database operations.
  3. For a supported single-column foreign key, use Relations → Add to choose both endpoints, name and actions. The captured id → test2.admin_menus.parent_id form and matching preview both use RESTRICT for update/delete. Add/Delete stages changes; use Save Changes directly to review editable SQL Preview.
  4. Cancel an unsubmitted form/preview or deliberately Execute the reviewed commands. Read the outcome and reopen the target to check actual metadata and enforcement; parent Cancel cannot undo an applied index change.
Index editor for test.test_docs showing PRIMARY / BTREE / id / Yes and the complete Add Index form for idx_review_note, with review_note checked and Unique Index unchecked.
Owner capture of test.test_docs before Add Index / OK. The existing row reads PRIMARY, BTREE, id, Unique = Yes. The form prepares idx_review_note on review_note with BTREE and Unique Index unchecked; id is unchecked. Parent Save Changes is disabled. This is configuration before submission; index creation and fresh metadata are not shown. Historical screenshot; UI icons have been updated.

Default shortcuts

Main-window bindings are configurable. Dialog keys depend on focus; use explicit Index/Relations buttons for their actions.

Default shortcuts
ActionWindows / LinuxmacOSFocus and effect
Show Structure (read-only)F6F6Main workspace, current table context. Configurable; opens metadata rather than the Index/Relations editing dialog.
Edit table structureAlt+Enter⌥+EnterMain workspace; select the intended object-tree table first. Configurable default.
Edit from the focused object treeCtrl+Enter / Alt+Enter⌘+Enter / ⌥+EnterFixed tree handler. The tree-filter input has its own opening behavior.
Add IndexNo dedicated defaultNo dedicated defaultClick Index → Add Index, review the form, then OK immediately submits the relational index.
Refresh indexes and available fieldsNo dedicated defaultNo dedicated defaultClick Index → Refresh. Reloads server metadata; it does not undo changes.
Delete IndexNo dedicated defaultNo dedicated defaultSelect its row and click Delete Index. Direct drop attempt with no parent preview or separate confirmation.
Add a relationNo dedicated defaultNo dedicated defaultClick Relations → Add, fill Add Foreign Key, then Add stages the definition.
Delete a relationNo dedicated defaultNo dedicated defaultSelect the relation and click Delete. Stages an existing drop or removes a pending addition.
Refresh relationsNo dedicated defaultNo dedicated defaultUse Relations → Refresh or its row context menu. Pending additions/deletions are not cleared.
Focus structure searchCtrl+F⌘+FStructure dialog; searches controls/values within the current top-level and nested tab.
Start / next search matchEnterEnterFocused structure-search input; starts or advances search without executing DDL. Use the previous button to go back.
Review staged changesCtrl+Enter / Ctrl+Return⌘+Enter / ⌘+ReturnParent structure dialog, enabled Save Changes. Prepares review; does not defer already-applied relational Index actions.
Execute the previewCtrl+Enter / Ctrl+Return⌘+Enter / ⌘+ReturnSQL Preview text editor only. Invokes Execute; do not blindly repeat the parent review chord.
Activate a default buttonEnterEnterFocus-dependent. Parent Save Changes is the enabled default; Add Foreign Key defaults to Add; SQL Preview defaults to Cancel when its text editor does not consume Enter. Read the active button.
Cancel / close the current layerEscEscActive search or a cell/popup can consume it first. Parent Cancel may open Unsaved Changes; no rollback of executed actions.
Reset Auto IncrementNo dedicated defaultNo dedicated defaultIndex button opens a separate counter-value input. This changes a counter, not an index draft reset or undo.
  • Settings → Shortcuts shows configurable bindings; customized keys take precedence. Fixed dialog keys and mouse gestures may be managed by their own controls.
  • On macOS, ⌘ means Command and ⌥ means Option. Function keys may require Fn. Delete means forward delete (often Fn+⌫ on a compact Mac keyboard); use the menu when Insert is unavailable.
  • Ctrl+N, Ctrl++ / Ctrl+=, Delete and Ctrl+- in the relational parent are field actions, not universal index/relation add/delete shortcuts. Use labeled tab buttons; there is no Ctrl+S structure-save default established here.
  • Keyboard/focus behavior is source-reviewed; physical-keyboard acceptance is still pending.

Objects in this workflow

  • ordinary index
  • unique index
  • Primary key
  • unique constraint
  • Foreign key
  • CHECK definition

What to know

  • Ordinary/unique indexes, primary/unique constraints, foreign keys and CHECK are distinct. Unique = Yes is not a complete constraint description; this surface has no dedicated CHECK editor or composite-foreign-key form.
  • Generic type/action choices do not establish per-engine support. SQLite Relations add/drop currently emits rebuild comments only. Snowflake structure editing is unsupported and standard-table foreign keys are informational; Redis relational concepts are not applicable.
  • MongoDB uses a separate staged Index flow with createIndex/dropIndex, Unique/Sparse/key/TTL semantics. TTL can expire documents; relational Index timing does not apply there.
  • Relations Refresh does not clear its pending changes. Constraint dependencies, missing DDL, disabled/validated state and failed batches need actual server review; metadata, archived declarations and diagram links alone do not establish enforcement.
  • The supplied relationship images stop before execution. Referenced-key eligibility, types, data and storage engines are unverified; Document formatted is formatter feedback. Use the captures to follow configuration and review, then verify your own target before submission.

Try it now

Put database work back into one focused workspace.

Start a Personal trial ↗