PyPIv0.2.0 Free software, GPL-2.0

A notepad. But only for databases.

Connect to a server and start typing. notepaDB suggests the real table and column names from that database, runs your SQL when you press F5, and shows the results in a grid.

pipx install notepadb
Source code

First install pipx and Tk: sudo apt install pipx python3-tk on Debian, Ubuntu or Mint. Fedora, Arch, openSUSE, macOS and Windows

  • EnginesSQL Server, PostgreSQL, MySQL, MariaDB, Oracle and SQLite
  • Runs onLinux, macOS and Windows
  • NeedsPython 3.9 to 3.14 with Tk
  • Asks forNo account. Sends no telemetry.
baseball1 • — notepaDB
Rowteam_idteam_namecityhome_stadiumfounded_year
11AstrosHoustonMinute Maid Park1962
22YankeesNew YorkYankee Stadium1903
33DodgersLos AngelesDodger Stadium1883
44CubsChicagoWrigley Field1876
55Red SoxBostonFenway Park1901
5 rows · 5 columns · 1 ms
5 rows · 1 ms Ln 1, Col 21 1 ms

Live demo. This window is a browser copy of notepaDB with a real SQLite database inside. Click into the editor, change the query and press F5.

Three keys from question to answer

  1. CtrlK

    Connect

    Pick SQL Server, PostgreSQL, MySQL, MariaDB or Oracle and a server, or a SQLite file. Each tab keeps its own connection.

  2. Type

    Tables after FROM and JOIN, columns after an alias and a dot, all read from the live schema.

  3. F5

    Run

    F5 runs the selection or the whole tab. Ctrl+Enter runs just the statement under the caret.

The real app, on GNOME

The window above is rebuilt in HTML so you can try it here. These are screenshots of the desktop app itself on GNOME 48, with GNOME's default fonts and settings. Switch this page between light and dark to see both themes.

notepaDB on GNOME. The schema sidebar shows baseball.db with the players table expanded. The editor holds two queries; the first result tab lists 8 rows of teams and players, with NULL in gray for the Cubs and Red Sox, who have no players. The status bar reads 12 rows across 2 result sets. notepaDB on GNOME. The schema sidebar shows baseball.db with the players table expanded. The editor holds two queries; the first result tab lists 8 rows of teams and players, with NULL in gray for the Cubs and Red Sox, who have no players. The status bar reads 12 rows across 2 result sets. Dark theme.
Two result sets from one batch, each in its own tab, with NULLs in gray

Made for the SQL you write every day

Quick lookups, one-off fixes, the script you run twice a week. notepaDB keeps the parts of a database IDE you use for that work, and it opens straight to an editor.

Autocomplete from the live schema

Suggestions come from the database you're connected to. Type FROM and pick a table; type an alias and a dot and pick one of its columns.

Every tab is its own session

Each tab has its own connection, schema sidebar and results, like query windows in SSMS. Tabs name themselves after their database.

Run exactly what you mean

Keep a dozen queries in one tab and run the one under the caret. Batches split on semicolons, but not the ones inside strings or comments.

One tab per result set

A script with five SELECTs gives you five result tabs. Messages keeps a timestamped log of row counts, timings and errors.

The whole server in a sidebar

Every database on the server, with a filter and type-to-jump. Double-click a database to switch to it, drag names into the editor, right-click a table for the usual jobs.

A command palette

Ctrl+Shift+P finds any command by name, opens any table, and switches databases, without leaving the keyboard.

History of what you ran

Your last 300 statements, with time, duration, rows and connection. Filter them, preview one with highlighting, and put it back in the editor, or run it again.

Saved connections

Save a connection under a name and pick it next time. Test connection checks the details first, and passwords are never written to disk.

Work that survives a crash

Unsaved tabs are autosaved every 30 seconds and offered back after a crash. notepaDB can also reopen your tabs on startup and reconnect the ones that need no password.

At home on a Linux desktop

notepaDB reads your desktop's settings when it starts, so on GNOME it matches the apps around it.

  • Light or dark, your choiceFollows the GNOME style setting, or stays light or dark: View → Theme.
  • Your fontsUses your interface and monospace fonts: Adwaita Sans and Adwaita Mono with GNOME 48's default settings, or Cantarell on Debian 13, which keeps the older font.
  • Adwaita colors and controlsGNOME's blue, rounded buttons and fields, underline tabs and thin scrollbars.
  • Sharp at any scaleIcons are drawn from vector shapes at startup, so they stay crisp at 200% scaling.
  • The GNOME file chooserOpen and Save use it through zenity, when zenity is installed.
  • X11 and WaylandTk draws through X11, so on a Wayland session notepaDB runs through XWayland, like other Tk apps.
The notepaDB window in its light theme, the left part of the comparison. The same window in its dark theme, the right part of the comparison.
LightDrag to compare the two themesDark

Five engines. One window.

Pick the engine in the Connect dialog. After that everything works the same way: the editor, autocomplete, schema sidebar, results and history. notepaDB writes the engine-specific SQL for you.

Driver
pyodbc with Microsoft's ODBC Driver 18 or 17 for SQL Server
Sign in
Windows authentication or SQL Server login, with Encrypt connection (TLS) and Trust server certificate
Databases
Lists every database on the server. Switching runs USE [db] on the same connection.
Cancel
Cancels the running statement through the ODBC cursor
Right-click a table → Select top 1000 rows
SELECT TOP 1000 * FROM [sales].[orders]
Explain plan Ctrl+L
SET SHOWPLAN_ALL ON;
SELECT * FROM orders WHERE id = 42;
SET SHOWPLAN_ALL OFF;

Coming from SSMS?

Your habits carry over. SQL Server Management Studio runs only on Windows, and Microsoft retired Azure Data Studio on February 28, 2026. notepaDB runs on Linux, macOS and Windows.

Prefer to work inside an editor? Microsoft points Azure Data Studio users to its MSSQL extension for VS Code, which also runs on all three. notepaDB is the small window you open for a quick query.

SSMS commands and their notepaDB equivalents
In SSMSIn notepaDB
Execute F5Run F5: the selection, or everything
Execute the current statementCtrl+Enter runs the statement under the caret
Display Estimated Execution Plan Ctrl+LExplain plan Ctrl+L, for all five engines
Select Top 1000 RowsRight-click a table → Select top 1000 rows, in a new tab
Script Table as → CREATE ToRight-click a table → Script as CREATE TABLE
Query windows, SQLQuery1.sqlTabs named after their database: Sales1, Sales2
Object ExplorerSchema sidebar with every database, a filter, type-to-jump and drag-and-drop
Messages tabMessages tab, with a timestamp on every line
Windows AuthenticationWindows authentication or SQL Server login, Encrypt connection (TLS), Trust server certificate

Keyboard first

F5 runs, the same key as in SSMS. Everything else has a shortcut too, and F1 in notepaDB shows this list.

Query

Run selection, or everything
F5
Run the statement at the caret
CtrlEnter
Run everything
CtrlShiftEnter
Stop the running query
CtrlBreak
Explain plan
CtrlL
Query history
CtrlShiftH

Connection

Connect…
CtrlK
Refresh schema
CtrlShiftR
Show or hide the schema sidebar
CtrlB

Editor

Find
CtrlF
Find next or previous
F3/ShiftF3
Replace
CtrlH
Toggle line comment
Ctrl/
Format SQL
CtrlShiftF
Go to line
CtrlG
Move line up or down
Alt↑/Alt↓
Indent or outdent the selection
Tab/ShiftTab
Accept a completion
TaborEnter
Zoom in, out, reset
Ctrl=/Ctrl-/Ctrl0

Tabs and files

New tab
CtrlT
Close tab
CtrlW
Next or previous tab
CtrlTab/CtrlShiftTab
Open a file
CtrlO
Save, or save as
CtrlS/CtrlShiftS
Command palette
CtrlShiftP
Full screen
F11
Keyboard shortcuts
F1

Small things that add up

  • NULLs are gray in the grid, so a NULL never looks like the text 'NULL'.
  • Copy cells with headers from the grid's right-click menu puts tab-separated rows and their column names on the clipboard.
  • CSV exports open cleanly in Excel, accents and Hebrew included, because they're written with a UTF-8 BOM.
  • Opens .sql files saved as UTF-8, Windows-1255 (Hebrew) or Windows-1252.
  • Format SQL uppercases keywords and re-indents the selection or the whole tab.
  • The grid shows the first 2,000 rows of a result and tells you when there are more.
  • Bracket matching, a highlighted current line, line numbers and word wrap.
  • Editor zoom with Ctrl+= and Ctrl+-, remembered between sessions.

Install

notepaDB is a regular Python package. pipx installs it into an environment of its own and puts the notepadb command on your PATH.

Installing brings the drivers for all five engines with it. A missing system library only matters when you connect with that engine.

$ sudo apt install pipx python3-tk
$ pipx ensurepath
$ pipx install notepadb
$ notepadb

Why not plain pip install? Debian, Ubuntu, Mint, Arch and openSUSE Tumbleweed mark the system Python as externally managed (PEP 668), so pip outside a virtual environment stops with error: externally-managed-environment. pipx makes that environment for you.

Using uv? uv tool install --no-managed-python notepadb runs it on your distribution's Python and Tk, which render fonts better on Linux than uv's own Python builds.

On Python 3.15, for example Fedora 45, the SQL Server driver pyodbc has no prebuilt package yet, so install on Python 3.14 with uv tool install --managed-python --python 3.14 notepadb.

  • SQL ServerNeeds Microsoft's ODBC Driver 18 for SQL Server (msodbcsql18). On Linux and macOS it comes from Microsoft's package repository and brings unixODBC with it: see the guides for Linux and macOS.
  • OracleRuns in thin mode, so there's no Instant Client to install.
  • SQLiteUses Python's built-in module. Nothing extra.

Small enough to read

About 7,400 lines of Python in five modules, built on Tkinter. Settings, history and autosaves are plain files on your computer, and the only connections notepaDB opens are to your databases.

What it isn't: there are no table designers, diagrams, schema compare or admin screens. Keep SSMS, DBeaver or your IDE for those.

# db_backends.py: a new engine is one subclass
class MyEngineBackend(DbBackend):
    label = "My Engine"

    def connect(self, server, database=None, **kwargs): ...
    def list_databases(self): ...
    def use_database(self, name): ...
    def list_schema(self, database=None): ...
    def execute(self, sql): ...

BACKENDS["myengine"] = MyEngineBackend

notepaDB is a spare-time project by Dror Maor, licensed GPL-2.0. If it saves you time, you can buy Dror a coffee.

Questions

Something else? Open an issue on GitHub.

Is notepaDB free?

Yes. It's free and open source under the GPL-2.0 license. If it saves you time, you can buy the author a coffee.

Which databases does it work with?

SQL Server, PostgreSQL, MySQL, MariaDB, Oracle and SQLite. Each tab connects on its own, so you can have several engines open side by side.

Does it run on Linux?

Yes. The screenshots on this page are from GNOME 48 on Debian 13. Install it with pipx after adding Tk from your distribution's packages, as shown under Install.

Why does pip install notepadb fail on Ubuntu or Debian?

Those distributions protect the system Python (PEP 668), so pip refuses to install into it and prints error: externally-managed-environment. Use pipx install notepadb, which creates a separate environment for the app.

Which Python versions work?

Python 3.9 to 3.14, with Tk. On 3.15, the SQL Server driver pyodbc has no prebuilt package yet, so installing would mean compiling it. The install steps above pin 3.14 wherever 3.15 is the default.

Does it run on macOS and Windows?

Yes. notepaDB is Python and Tk, and both run on macOS and Windows. It follows the system's light or dark setting there too, and on a Mac the menus move to the menu bar at the top of the screen. Install it with uv as shown above, and please report anything that looks wrong.

Does it store my passwords?

No. Saved connections, recent servers and restored sessions keep everything except the password. Tabs that use Windows authentication or SQLite reconnect on their own; the others ask you to connect again.

Where are my settings and history kept?

In files on your computer. notepaDB has no telemetry and no account, and it only connects to the databases you choose.

How many rows does the grid show?

The first 2,000 rows of each result set. The footer under the grid says how many rows the query returned, so you know when there are more. Export CSV under the grid saves the rows the grid shows; to export a whole table, right-click it in the sidebar and pick Export table to CSV, which writes up to 100,000 rows.

Is it a replacement for a full database IDE?

It covers writing and running SQL: autocomplete, results, explain plans and history. It has no table designers, diagrams or admin screens. Keep your IDE for those and open notepaDB for the quick work.

Is the demo on this page the real app?

It's a browser copy of the notepaDB window. The autocomplete follows the desktop app's rules, ported to JavaScript, and queries run on SQLite compiled to WebAssembly. The desktop app itself is Python and Tk; the screenshots show it on GNOME.

How do I report a bug?

Open an issue on GitHub with the engine, your OS and Python version, and the steps to reproduce it. Leave out real connection strings, hostnames and credentials.

Open it like Notepad.

Connect, type, press F5. That's the whole workflow.

pipx install notepadb
Star on GitHub
Esc