Databases

Hands-on database skills: SQL, schema design, indexing, and working with an ORM.

Beginner

  1. What is a Database?: Software that stores data in an organized shape you can search, filter, and change directly.
  2. Tables, Rows & Columns: The spreadsheet-like grid that relational databases use to organize data.
  3. Primary Keys & Foreign Keys: How a database identifies one exact row, and how rows in different tables point to each other.
  4. Basic SQL Queries: The four core commands (SELECT, INSERT, UPDATE, DELETE) for reading and changing data.
  5. Filtering & Sorting: Pick the rows you want with WHERE, and set the order they come back in with ORDER BY.

Intermediate

  1. Joins: Combine matching rows from two or more tables into one result, using the foreign keys that link them.
  2. Aggregation: Turn many rows into a summary value, like a count, total, or average.
  3. Indexes: A lookup structure that lets the database jump to matching rows instead of scanning the whole table.
  4. Normalization: Organize tables so each fact is stored in exactly one place, not copied everywhere it's needed.
  5. Constraints: Rules on a table's columns that the database enforces, so invalid data can't be saved.
  6. Transactions & ACID: Group several operations into one all-or-nothing unit, so a failure never leaves data half-changed.
  7. ORMs: A library that lets your code work with database rows as objects and writes the SQL for you.
  8. PostgreSQL in Depth: PostgreSQL features beyond standard SQL: richer data types, auto-incrementing ids, and the psql client.
  9. Subqueries & CTEs: Nest one query in another, or name a step with WITH, to split a complex question into readable pieces.
  10. Pagination: Return a large result in smaller pages, using LIMIT/OFFSET or keyset pagination.

Advanced

  1. Database Migrations: Small, versioned scripts that change a schema over time, so every environment gets the same structure in the same order.
  2. Query Optimization: Read the database's plan for a query to find out why it's slow and how to speed it up.
  3. Connection Pooling: Keep a small set of open database connections to reuse, instead of opening a new one for every request.
  4. NoSQL Data Modeling: Shape documents around how they'll be read, often embedding related data instead of splitting it across tables.
  5. Window Functions: Calculate across related rows, like a running total or a rank, without collapsing them as GROUP BY does.
  6. Upsert & Conflict Handling: Insert a row, or update it if it already exists, in one atomic statement.