# Databases

> >

- **Type:** Skill
- **Install:** `agentstack add skill-dojocodinglabs-code-sensei-databases`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [DojoCodingLabs](https://agentstack.voostack.com/s/dojocodinglabs)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [DojoCodingLabs](https://github.com/DojoCodingLabs)
- **Source:** https://github.com/DojoCodingLabs/code-sensei/tree/main/skills/databases
- **Website:** https://github.com/DojoCodingLabs/code-sensei

## Install

```sh
agentstack add skill-dojocodinglabs-code-sensei-databases
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Databases — CodeSensei Teaching Module

## What is a Database?
- **Analogy:** A super-powered spreadsheet that your app can read and write to automatically. Each "table" is like a sheet, each "row" is an entry, each "column" is a field.
- **Key insight:** Without a database, your app forgets everything when it restarts. Databases make data PERMANENT.

## SQL (Structured Query Language)
- **Analogy:** SQL is the language you use to talk to the database. Like asking a librarian: "Find me all books by this author, sorted by year."
- **Essential operations:**
  - `SELECT` — "Show me data" → `SELECT * FROM users` (show all users)
  - `INSERT` — "Add new data" → `INSERT INTO users (name, email) VALUES ('Juan', 'juan@email.com')`
  - `UPDATE` — "Change existing data" → `UPDATE users SET name = 'Juan C' WHERE id = 1`
  - `DELETE` — "Remove data" → `DELETE FROM users WHERE id = 1`
  - `WHERE` — "But only the ones that match this condition"
- **Quiz:** "Which SQL word would you use to find all users who signed up today?"

## Types of Databases
- **PostgreSQL** — the reliable all-rounder. Most vibecoded apps use this. Think of it as Excel but 1000x more powerful.
- **SQLite** — a lightweight database stored in a single file. Good for small projects. Like a notepad vs a full filing system.
- **MongoDB** — stores data as flexible documents (JSON-like) instead of rigid tables. Like storing folders of papers vs a spreadsheet.

## ORMs (Object-Relational Mappers)
- **Analogy:** An ORM is a translator between your code and the database. Instead of writing SQL directly, you write code in your programming language and the ORM converts it to SQL.
- **Prisma** (most common in vibecoded projects):
  - `prisma.user.findMany()` → becomes `SELECT * FROM users`
  - `prisma.user.create({ data: { name: "Juan" } })` → becomes `INSERT INTO users...`
- **Key insight:** ORMs make databases easier to work with, but the SQL is still happening underneath.

## Schemas & Migrations
- **Schema** — the blueprint of your database. Defines what tables exist and what columns each has.
- **Migration** — a change to the blueprint. Like remodeling a room — you write instructions for the change, then apply them.
- **Analogy:** The schema is your building's floor plan. A migration is the renovation permit that says "add a new room here."

## Relationships
- **One-to-Many:** One user has many posts. Like one author writing many books.
- **Many-to-Many:** Users can have many tags, and tags can belong to many users. Like students and classes.
- **Foreign Key:** The link that connects tables. Like a reference number that says "this post belongs to user #5."

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [DojoCodingLabs](https://github.com/DojoCodingLabs)
- **Source:** [DojoCodingLabs/code-sensei](https://github.com/DojoCodingLabs/code-sensei)
- **License:** MIT
- **Homepage:** https://github.com/DojoCodingLabs/code-sensei

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dojocodinglabs-code-sensei-databases
- Seller: https://agentstack.voostack.com/s/dojocodinglabs
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
