> For the complete documentation index, see [llms.txt](https://program.hackyourfuture.dk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://program.hackyourfuture.dk/course-content/backend/databases.md).

# Databases

This module is part of the Backend specialism course and goes deep on databases, including SQL topics like CRUD, relationships and other advanced concepts like transactions, security, and deployment. It also covers different types of databases and their use cases.

| Week | Topic                                                                                   | Preparation                                                           | Lesson Plan                                                                           | Assignment                                                          |
| ---- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| 1.   | [Data Modeling and Relational Fundamentals](/course-content/backend/databases/week1.md) | [Preparation](/course-content/backend/databases/week1/preparation.md) | [Session Plan](/course-content/backend/databases/week1/session-plan.md) (for mentors) | [Assignment](/course-content/backend/databases/week1/assignment.md) |
| 2.   | [Database Security and Transactions](/course-content/backend/databases/week2.md)        | [Preparation](/course-content/backend/databases/week2/preparation.md) | [Session Plan](/course-content/backend/databases/week2/session-plan.md) (for mentors) | [Assignment](/course-content/backend/databases/week2/assignment.md) |

## Learning Goals

By the end of this module, you will be able to:

* [ ] Explain the purpose of databases in web applications
* [ ] Perform basic CRUD operations using SQL
* [ ] Understand and implement relationships between tables in SQL
* [ ] Write more complex SQL queries involving joins and aggregations
* [ ] Understand the use cases for different types of databases (SQL, NoSQL, Key-Value, Graph)
* [ ] Communicate the importance of database security
* [ ] Understand the most common security threats and how to mitigate them with best practices

## Prerequisites

You should have completed or understand the learning goals in the following modules before proceeding:

* [ ] [Foundation - Databases](/course-content/foundation/databases.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://program.hackyourfuture.dk/course-content/backend/databases.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
