SQL Browser

The SQL Browser lets you open SQLite and PostgreSQL databases, explore their schemas and execute SQL statements. The databases run directly in your web browser.

Using the browser

SQL Browser with labelled controls

  1. Click the Open Database folder icon at the top.
  2. Under Load database from catalog, choose a database and, where available, one of its offered files. Alternatively, select a file from your device under Open file.
  3. Confirm with Open. The database appears in a new tab.

Use the tabs to switch between open databases. The catalog follows the selected language. Find more descriptions and downloads in the database collection.

Each database tab contains three panels:

  • SQL. Enter an SQL statement, or several statements separated by semicolons, and click Execute.
  • Results. Executed SQL statements appear here with their result tables or error messages. New results appear at the top. The cross on a result removes its display; it does not undo database changes.
  • Schema. View the tables and columns of the loaded database. Primary keys are underlined, and foreign keys are marked with an upward arrow.

Drag panel headings to rearrange the panels, or drag their dividers to resize them. Use Switch Layout at the top right to choose Desktop or Mobile for the active database tab. Nearby controls let you change the language and switch between light and dark themes.

SQL statements such as INSERT, UPDATE, DELETE and CREATE TABLE can also change data and create tables. These changes affect only the open session. The SQL Browser has no function to save or export the modified database. The original file remains unchanged; closing the database tab or reloading the page discards your changes, SQL input and results. Copy any SQL statements you want to keep into your own text file.

Use Cancel to stop a running SQL execution. This resets the database to its initial state, also discarding earlier database changes in that session.

Supported databases

The SQL Browser supports the following file formats:

Format File extension Description
SQL script .sql
A UTF-8 text file with statements such as CREATE TABLE and INSERT that create a database when the file is opened. SQLite and PostgreSQL are supported. Without Eskuel metadata (see below) at the beginning of the file, the script runs as SQLite.
SQLite database .sqlite, .sqlite3, .db, .db3, .s3db, .sl3 A binary database file in the SQLite file format.
Eskuel database package .eskueldb A package containing an SQLite or PostgreSQL initialization script, or an SQLite database file, together with database information, provenance and licensing details. The package specifies the database system. Click Licenses beside the database title to view the package information.

Preparing your own SQL scripts

Write an SQL script in a text editor and save it as a UTF-8 file with the extension .sql. A PostgreSQL script needs both Eskuel comment lines at the beginning of the file to specify the database system and its minimum version. For example:

-- eskuel:system=postgresql
-- eskuel:systemMinVersion=14.0.0

CREATE TABLE note (id INTEGER PRIMARY KEY, text TEXT);
INSERT INTO note VALUES (1, 'Hello!');

Open the saved file in the SQL Browser, then query its contents with SELECT * FROM note. For SQLite, omit both comment lines or explicitly specify system=sqlite and systemMinVersion=3.0.0. The minimum version must match the SQL syntax used; a script requiring a newer version than the available database engine is rejected when opened.