Developer beta 0.1.0-beta.1 documentation. These pages describe the beta as built and tested on Linux x86-64. See the beta page for what is available today.

Studio

Studio is HolaDB’s web interface: a page in your browser for running SQL and looking at tables, in the way phpMyAdmin or pgAdmin are used with other databases. It is part of the holadb command; there is nothing extra to install.

Starting it

Studio is a client of a running server. Start the server, then Studio:

holadb serve ./hotel                               # the database server
HOLADB_PASSWORD=… holadb studio holadb://admin@127.0.0.1:7433

Open http://127.0.0.1:7480/. --listen ADDR chooses another loopback address or port.

The URL names the user only. The password comes from the HOLADB_PASSWORD variable, --password-file <file> or --password-stdin; a URL that contains a password is refused. A holadbs:// URL connects to the database with TLS (--tls-ca <file> for a private authority).

What it does

Tab What you can do
SQL Write and run statements; see each statement’s result or error. Explain shows the plan of one statement and runs nothing
Browse Pick a table and page through its rows (25, 50, 100 or 500 per page); open the table in the SQL tab
Storage Rows, segments and the bytes of data, index and log per table, with totals

Things to know:

  • A result shows at most 1,000 rows, with a note when there were more. Use LIMIT, or Browse, for large tables.
  • Each run is one database session. A run that ends inside an open transaction is rolled back, and Studio says so on each statement.
  • Large integers are shown exactly, including values beyond what a browser number can hold.
  • The page works on narrow screens: the table list folds away behind a button.

With the hotel example:

CREATE TABLE hotel_rooms (room_id INTEGER PRIMARY KEY, room_type TEXT, price INTEGER);
INSERT INTO hotel_rooms VALUES (101, 'double', 120), (102, 'single', 80);
SELECT * FROM hotel_rooms;

Run it in the SQL tab, then open hotel_rooms in Browse.

Who can reach it

Studio has no login of its own: it uses the credentials it was started with for every request. Anyone who can open the page on that machine runs SQL with those credentials, so start it with a user that has only the privileges the work needs.

Studio listens on a loopback address only and refuses any other. To use it from another machine, forward the port:

ssh -L 7480:127.0.0.1:7480 your-server

More detail is in Security.

Limits

  • No user management in Studio: use holadb users or the shell.
  • No schema designer, import or export screens; use SQL and the backup commands.
  • Tested in Chromium at phone, tablet and desktop widths. Other browsers and screen readers have not been tested.