Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français

Training: administer a relational database

  • 10 min

By updated

Improve this page

This training teaches you to run a relational database in production: set it up, control who connects to it, back it up and restore it, observe it, maintain it and replicate it. It is aimed at Linux administrators and SREs at an intermediate level who have never administered a DBMS (database management system). The common thread is PostgreSQL 18, and MySQL 8.4 LTS is offered as an option, with the same tasks. Every task is checked against a result you can observe yourself: a refused connection, a restore that matches the original, a measured replication lag.

Who is this training for, and what should you know first?

The training assumes two things you already know, and it does not teach them again. The first is Linux server administration: managing a systemd service, installing a package from a repository, reading the logs. The Linux training covers them. The second is the SQL language: reading a schema, writing a SELECT with a join, understanding a transaction. The SQL training (in French) teaches them on PostgreSQL, and nothing it covers is repeated here.

Other skills help without being required: remote access over SSH, disk management, the firewall and the basics of TLS. An observability training (in French) is recommended before level 2, because monitoring a database plugs into a chain of metrics and alerts that this training does not rebuild. To place the database building block in a complete system (transactions, critical state, backup, replication) before you administer it, read Relational databases: reading the building block that keeps critical data (in French).

How is the training organised?

Three levels follow one another, each with a result you can check. Level 1 has you put a safe database into service: install the engine from its vendor's repository, connect to it through the local socket and over the network, make the memory, connection and log settings effective, then close the accesses (authentication rules, least-privilege roles, TLS enforced). This level currently ends on hardening the accesses: it has no closing step yet with a restored backup, because the logical backup lesson is not attached to the training (see the box above).

Level 2 teaches you to protect and operate: physical backup and log archiving up to point-in-time recovery (PITR), monitoring of sessions and expensive queries, and maintenance (reclaiming the dead space left by outdated rows, keeping statistics and indexes up to date). Level 3 has you replicate and fail over: stream a standby (a copy that follows the primary continuously), measure its lag, promote it when the primary goes down, then bring the old primary back.

Three orientation lessons, with no administration task, serve as waypoints: the first, before level 1, has you choose a relational engine; the second (to come) will set out the backup policy before level 2; the third (to come) will cover high availability before level 3.

PostgreSQL or MySQL: which option should you follow?

The default path is PostgreSQL 18. It carries the lessons, the hands-on lab work and the assessments to come. The lessons of the MySQL 8.4 LTS option repeat the same tasks, engine by engine: discover InnoDB (MySQL's storage engine), configure, control accounts, back up, monitor, replicate. They are optional and flagged as such in the course outline.

One gap is worth knowing before you choose. The labs validated so far cover PostgreSQL only: the MySQL option can be read and replayed by hand, but no MySQL lab verifies it yet. If your job requires MySQL, the training is still useful; if you have no constraint, follow PostgreSQL. The lesson on choosing an engine gives the criteria that separate the two, as well as SQLite.

Where do you practise?

The tasks are practised on three Debian 13 virtual machines (db1.lab, db2.lab, db3.lab), using the bdd-dsoxlab-training lab repository. A virtual machine rather than a container, because putting a database server into service also means touching systemd, disks and the network, which only a full machine reproduces faithfully. Three machines are needed as soon as you move on to replication, which requires a primary and at least one standby.

These labs are linked to the lessons as they are rewritten: the PostgreSQL connection and configuration lessons already carry theirs, and the others can be followed from their repository. The training does not count them in its progress yet.

What does this training not cover?

This training deliberately stays within the relational server, and it sends elsewhere whatever belongs to another job or another platform.

  • Writing queries and optimising them: that is the SQL training, which also covers index design and reading a plan with EXPLAIN. Here, you tune the server and maintain existing indexes, without rewriting the queries.
  • Managed cloud databases: they have their own module in the Cloud training (in French), because neither the system nor the backups are administered the same way there.
  • NoSQL, vector databases and search engines: these are not relational databases. NoSQL databases (in French) are placed within their architecture, and vector databases (in French) have their own reference page.
  • Kubernetes (CloudNativePG), partitioning, sharding (Citus, Vitess) and MariaDB with Galera: another platform, another audience, or an engine that has diverged from MySQL.
  • SQLite: nothing to administer on the server side, the SQLite guide (in French) is enough.

Is this project useful to you?

The guides, courses, quizzes and labs stay free. If you use them regularly, you can contribute to their upkeep and development.

Become a supporting member (new tab) One-time support (new tab) Learn more

Follow the project on LinkedIn