Sqlism
Loading…
Learning path

Become a Database Administrator with SQL

A DBA's job isn't to write clever queries — it's to keep the database itself healthy: fast, consistent, secure, and recoverable. This path moves past confident querying into the operational SQL DBAs run every day — integrity, indexes, transactions, permissions, and diagnostics.

8 Modules
~6 hrs, self-paced
2 Portfolio Projects
0 of 8 modules complete

Where an analyst mostly reads data, a DBA is accountable for the database itself — that queries stay fast as tables grow, that a bad write can't corrupt the data, that only the right people can touch the right things, and that a failure can always be recovered from. This path assumes you can already write a SELECT; it's built around the decisions and diagnostics that come after — constraints, indexes, transactions, privileges, and the operational habits that keep a production database trustworthy.

  1. 1

    SQL Fundamentals for Diagnostics

    20 min

    A DBA's day often starts with a vague complaint — "the app feels slow" or "this number looks wrong" — and ends with a precise SELECT, WHERE and ORDER BY that pins down exactly what's happening. Fast, targeted diagnostic queries are the tool you'll reach for before touching anything structural.

    SELECT name, department_id, salary
    FROM employees
    WHERE salary > 60000
    ORDER BY salary DESC;
    Resist SELECT * on large diagnostic queries — pulling only the columns you actually need keeps investigation queries fast and readable.
  2. 2

    Constraints & Data Integrity

    30 min

    Constraints are the database enforcing your data model instead of trusting every application, script and ad-hoc query to get it right. PRIMARY KEY, FOREIGN KEY, UNIQUE and CHECK are a DBA's first line of defense against bad data — decided once, enforced on every write forever after.

    CREATE TABLE accounts (
        id INT PRIMARY KEY,
        email VARCHAR(255) NOT NULL UNIQUE,
        balance DECIMAL(12,2) NOT NULL CHECK (balance >= 0)
    );
    A constraint decided at table-creation time prevents a whole category of bad data from ever landing — far cheaper than cleaning it up later.
  3. 3

    Indexes & Reading Execution Plans

    45 min

    An index turns a full table scan into a targeted lookup — but only if it matches how the table is actually queried, and only if you can prove it. Reading EXPLAIN output is how a DBA stops guessing and starts confirming whether a query is using an index or silently scanning millions of rows.

    CREATE INDEX idx_employees_department
    ON employees (department_id);
    
    EXPLAIN SELECT * FROM employees WHERE department_id = 1;
    More indexes isn't free — every index speeds up reads but slows down every write to that table. Index for real query patterns, not preemptively.
  4. 4

    Transactions, Locking & Isolation Levels

    40 min

    Production databases take concurrent writes from dozens of connections at once, and things fail mid-write. Transactions and ACID guarantees are what keep a partially-failed operation from leaving data in a half-updated state. Isolation levels are the DBA's dial for trading consistency against concurrency — a decision with real performance consequences.

    BEGIN TRANSACTION;
    UPDATE accounts SET balance = balance - 500 WHERE id = 1;
    UPDATE accounts SET balance = balance + 500 WHERE id = 2;
    COMMIT;
    A lower isolation level buys throughput by allowing more concurrent access — but it can also let one transaction see another's in-progress work. Choose deliberately, not by default.
  5. 5

    User & Privilege Management

    30 min

    GRANT and REVOKE are how a DBA controls exactly who — and what application service account — can read, write, or alter each piece of the database. The guiding principle is least privilege: every account gets only the access it actually needs, nothing "just in case."

    GRANT SELECT, INSERT ON orders TO 'app_service'@'%';
    REVOKE DROP, ALTER ON orders FROM 'app_service'@'%';
    If an application's database account is ever compromised, its blast radius is limited to exactly what you granted it — least privilege turns a breach into a contained incident instead of a catastrophe.
  6. 6

    Stored Procedures, Triggers & Automation

    30 min

    Stored procedures let a DBA encapsulate maintenance and business logic inside the database itself; triggers fire automatically on inserts, updates or deletes — invaluable for audit trails and enforcing invariants no application layer can be trusted to remember every time.

    CREATE TRIGGER trg_salary_audit
    AFTER UPDATE ON employees
    FOR EACH ROW
    INSERT INTO salary_audit (employee_id, old_salary, new_salary)
    VALUES (OLD.id, OLD.salary, NEW.salary);
    Triggers are powerful for audit trails and invariants, but logic hidden inside one is logic no application developer can see by reading their own code — use them deliberately, and document them well.
  7. 7

    Monitoring, Slow Queries & Tuning

    35 min

    "It was fast last month" is one of the most common tickets a DBA gets. Understanding how the query optimizer picks a plan — and the common anti-patterns that quietly defeat an index, like wrapping a column in a function inside WHERE — turns that ticket from a mystery into a checklist.

    WHERE YEAR(order_date) = 2026 can silently prevent an index on order_date from being used — wrapping a column in a function is one of the most common accidental performance killers.
  8. 8

    Backup, Recovery & Integrity Checks

    25 min

    A backup you've never tested restoring isn't a backup, it's a hope. Beyond backups, routine data-quality queries — orphaned foreign keys, unexpected duplicates, row-count drift — catch integrity problems while they're small, before they surface the hard way in a report or a failed migration.

    TRUNCATE resets a table fast and is typically minimally logged; DELETE removes rows individually and can be filtered or rolled back — knowing which one you actually want matters before you run either.

Practice on real projects

These projects use the exact integrity and modeling discipline a DBA relies on, on realistic datasets.

Get interview-ready

DBA interviews lean on performance tuning, transactions, and troubleshooting scenarios — exactly what this path covered.

Validate what you've learned

25 questions covering everything above. Score 80% or higher to earn your Database Administrator badge on your dashboard.

Upgrade to Sqlism Pro to take the validation quiz

25 questions · pass at 80%+ to earn your Database Administrator badge on your dashboard. One-time payment, lifetime access.

Get Sqlism Pro