Database Manager Screen

PostgreSQL database management with table browsing, SQL editor, views, triggers, functions, and import/export.


Layout

+------------------------------------------------------------------+
|  Database Manager   [PostgreSQL v16.2]   [Query] [Bookmarks]     |
+------------------------------------------------------------------+
|  ┌──────┐  ┌──────────────────────────────────────────────────┐ |
|  │ DBs  │  │  Tables │ Views │ Triggers │ Functions │ Indexes │ |
|  ├──────┤  ├──────────────────────────────────────────────────┤ |
|  │ app  │  │                                                  │ |
|  │ auth │  │  Table: public.users                             |
|  │ logs │  │  ┌────┬────────┬────────┬────────┬──────┐       │ |
|  │      │  │  │ ID │ Name   │ Email  │ Role   │ Date │       │ |
|  └──────┘  │  ├────┼────────┼────────┼────────┼──────┤       │ |
|            │  │ 1  │ admin  │ a@...  │ admin  │ Jul  │       │ |
|            │  │ 2  │ john   │ j@...  │ user   │ Jul  │       │ |
|            │  └────┴────────┴────────┴────────┴──────┘       │ |
|            └──────────────────────────────────────────────────┘ |
+------------------------------------------------------------------+
|  SQL Editor: [________________________________] [Execute]        |
+------------------------------------------------------------------+

Tabs

TabContent
TablesTable browser with data grid
ViewsSQL views
TriggersDatabase triggers
FunctionsStored functions
IndexesDatabase indexes
ExtensionsPostgreSQL extensions
ConnectionsActive database connections
PrivilegesUser privilege management
BookmarksSaved SQL queries
SearchCross-table search

Table Data Grid

ColumnDescription
SelectCheckbox for bulk operations
ColumnsDynamic based on table schema
ActionsEdit, Delete buttons per row

Grid Features

  • Sort: Click column headers to sort
  • Search: Filter rows by any column
  • Pagination: Navigate large datasets
  • Column Reordering: Drag columns to reorder
  • Inline Editing: Click cell to edit
  • Bulk Delete: Select multiple rows for deletion

SQL Editor

Full SQL editor with syntax highlighting (via Ace editor):

SELECT u.name, COUNT(o.id) as order_count
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.created_at > '2026-01-01'
GROUP BY u.name
ORDER BY order_count DESC;

Features

  • Syntax highlighting for PostgreSQL
  • EXPLAIN ANALYZE integration
  • Query presets (pre-defined queries)
  • Export results to CSV/JSON/SQL
  • Query history bookmarks

Actions

Table Operations

ActionDescription
Create TableDefine new table with columns
Drop TableDelete table (with confirmation)
Truncate TableRemove all rows
Rename TableRename table
Duplicate TableClone table structure and data
Vacuum TableReclaim storage
Analyze TableUpdate statistics

Row Operations

ActionDescription
Insert RowAdd new row with form
Edit RowModify existing row
Delete RowDelete single row
Bulk DeleteDelete multiple selected rows

Import/Export

ActionFormatDescription
ExportCSVComma-separated values
ExportJSONJSON array
ExportSQLSQL INSERT statements
ImportCSVImport CSV data
ImportJSONImport JSON data

Modals

  • Create Table (column definitions)
  • Edit Row (field editor)
  • Import Data (file upload + format selection)
  • SQL Query Results (tabular display)
  • Drop Table Confirmation
  • Privilege Editor

Event Delegation

All buttons use data-db-action attributes (within the database view).


CSS Classes

ClassPurpose
.db-headerModule header with title
.db-sidebarDatabase/table tree sidebar
.db-contentMain content area
.db-table-gridData grid container
.db-sql-editorSQL editor wrapper
.db-toolbarAction toolbar
.db-search-inputSearch/filter input
.db-tab-navTab navigation
.db-tab-contentTab content panel

API Calls

This module uses 55+ API endpoints. See Databases API for the complete reference.

Key endpoints:

MethodEndpointPurpose
GET/api/databases/listList databases
GET/api/databases/:db/tablesList tables
GET/api/databases/:db/table/:sch/:tbl/dataBrowse rows
POST/api/databases/:db/queryExecute SQL
POST/api/databases/:db/table/:sch/:tbl/rowInsert row
PUT/api/databases/:db/table/:sch/:tbl/row/:pk/:valUpdate row

Part of NexusPanel Documentation

← Back to Documentation