Replace subject-based folder hierarchy with a document-type-based layout. Filesystem now establishes broad ownership and locality: - knowledge/ → concepts/ | technologies/ | methods/ - homelab/ → projects/homelab/plans/ | projects/homelab/guides/ - journal/ → records/journal/ - projects/ flat files → per-project sub-folders with overview.md - knowledge/parking-lot.md → inbox/ Deleted files: - Root-level Backend Residency operational files (AGENTS.md, CURRENT.md, ROADMAP.md, SKILLS.md, todo.md, todo.txt) — belong in backend-residency repo - docs/ directory entirely (ADRs belong in bitetrack-api, remaining files unused) - learning/ directory (backend-residency.md deleted; cicd guide moved to knowledge/methods/) - projects/README.md (replaced by individual project overview files)
17 lines
920 B
Markdown
17 lines
920 B
Markdown
# SQL & Relational Databases Notes
|
|
|
|
## ACID Properties
|
|
- **Atomicity:** All operations in a transaction succeed or all fail.
|
|
- **Consistency:** Database transitions from one valid state to another.
|
|
- **Isolation:** Concurrent transactions don't interfere with each other.
|
|
- **Durability:** Once committed, changes survive system failures.
|
|
|
|
## Indexes
|
|
- An index speeds up data retrieval operations (SELECT) at the cost of slower writes (INSERT, UPDATE, DELETE) and extra storage.
|
|
- **When to use:** Columns frequently queried in `WHERE` clauses, JOIN keys.
|
|
- **When NOT to use:** Columns with low cardinality (e.g. booleans), tables with very few rows, columns frequently updated.
|
|
|
|
## Joins
|
|
- **INNER JOIN:** Returns records with matching values in both tables.
|
|
- **LEFT JOIN (or LEFT OUTER JOIN):** Returns all records from the left table, and matching records from the right. If no match, right-side columns are NULL.
|