Beginner's guide
This page is for people who have never set up a database. It explains each step and each word. If you are a developer, the documentation is the faster route.
What HolaDB is
A database is a program that keeps records safe and finds them again quickly. Think of a hotel's room list: which rooms exist, what type each is, what it costs. A spreadsheet can hold that list. A database holds it in a way that many programs can read and change at the same time without losing or mixing up anything.
HolaDB is such a program. You give it instructions in a language called SQL, which reads almost like English: "select the rooms where the price is under 100".
Before you start
- HolaDB is a beta. It is for trying out, not for information you cannot afford to lose.
- The program cannot be downloaded yet. This guide shows what the steps will be. The beta page says what is available today.
- You need a computer running Linux (for example Ubuntu 24.04). This beta does not run on Windows, and it has not been checked on a Mac.
- You will type commands. HolaDB is used from the terminal, the window where you type instructions to the computer. On Ubuntu, press Ctrl+Alt+T to open it. Type each command exactly as shown and press Enter.
Step 1. Unpack the download
The download is one compressed file, like a zip. This unpacks it into a folder and moves you into that folder:
tar -xzf holadb-0.1.0-beta.1-x86_64-unknown-linux-gnu.tar.gz
cd holadb-0.1.0-beta.1-x86_64-unknown-linux-gnu Step 2. Check that the files are genuine
This compares every file with a list of fingerprints that came with it. Each line should end in "OK". If one does not, stop and download the file again.
sha256sum -c SHA256SUMS Step 3. Install
This copies HolaDB to the place where your computer keeps programs. It will ask for your password, because installing a program needs permission.
sudo ./install.sh Check that it worked. You should see a version number:
holadb version Step 4. Create your first database
A HolaDB database is simply a folder. This creates one called hotel in the place you are now:
holadb init ./hotel Step 5. Make a table and put records in it
A table is a list with fixed columns, like one sheet of a spreadsheet. This makes a table of rooms with three columns (a room number, a type and a price) and adds two rooms:
holadb query ./hotel "CREATE TABLE hotel_rooms (room_id INTEGER PRIMARY KEY, room_type TEXT, price INTEGER)"
holadb query ./hotel "INSERT INTO hotel_rooms VALUES (101, 'double', 120), (102, 'single', 80)" PRIMARY KEY means the room number identifies the room: no two rooms may share one.
Step 6. Ask a question
Which rooms cost less than 100?
holadb query ./hotel "SELECT room_id, room_type, price FROM hotel_rooms WHERE price < 100" HolaDB answers with room 102.
Step 7. See it in your web browser
If you prefer clicking to typing, HolaDB includes a page called Studio. Start the database so other programs can reach it, and leave that terminal window open:
holadb serve ./hotel --listen 127.0.0.1:7433 Open a second terminal window and start Studio:
holadb studio holadb://127.0.0.1:7433 Now open http://127.0.0.1:7480/ in your browser. Under "Browse" you can click on hotel_rooms and see your two rooms. Only your own computer can open this page. More in Studio.
Step 8. Make a safety copy
A backup is a second copy of your database that you can go back to. First stop the database: click the terminal window where holadb serve is running and press Ctrl+C. Then:
holadb backup ./hotel ./hotel-backup
holadb verify-backup ./hotel-backup The second command checks that the copy is complete.
Words used on this site
| Word | Meaning |
|---|---|
| Database | A program that stores records and finds them again; also the stored records themselves |
| Table | One list inside a database, with fixed columns |
| Row, record | One line of a table: one room, one booking |
| SQL | The language used to ask a database for things |
| Query | One question or instruction in SQL |
| Server | The database running and waiting for programs to connect to it |
| SDK | A ready-made piece of code that lets a program written in a certain language talk to HolaDB |
| Transaction | Several changes that either all happen or none do |
| Backup | A safety copy |
| Beta | An early version, shared so people can try it and report problems |
If something goes wrong
- Read the message. HolaDB says what it refused and why.
- Look in Troubleshooting.
- Write to us and include the command you typed and the message you got: contact and feedback.
Where next
The tutorial continues from here with more questions, changing records, user accounts and using HolaDB from a program.