database-internals/SKILL.md
Deep database internals: B-tree storage, WAL/REDO logging, MVCC, buffer pool mechanics, transaction isolation, and distributed database concepts. Use when making database design decisions that require understanding how MySQL works internally —...
npx skillsauth add peterbamuhigire/skills-web-dev database-internalsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
database-internals or would be better handled by a more specific companion skill.SKILL.md first, then load only the referenced deep-dive files that are necessary for the task.Mental models from Database Internals (Alex Petrov, O'Reilly 2019) translated into practical design rules. Each section ends with a So what block — the actionable implication for real MySQL/SaaS work.
InnoDB organises every table as a B+-Tree index-organised table (IOT). The primary key is not a pointer to a row — it is the row. Leaf nodes of the clustered index hold the full row data.
Root
└─ Internal nodes (separator keys only)
└─ Leaf nodes (PK + all column data)
Every secondary index stores the primary key value, not a physical row pointer. A secondary index lookup therefore does two B-tree traversals:
A covering index contains all columns the query needs, so step 2 is skipped.
-- Two traversals: secondary index + clustered index
SELECT name FROM orders WHERE status = 'paid';
-- One traversal: status+name covering index eliminates the second lookup
SELECT name FROM orders WHERE status = 'paid'; -- with INDEX(status, name)
UUID vs AUTO_INCREMENT PK impact:
So what: Always use INT UNSIGNED AUTO_INCREMENT or BIGINT AUTO_INCREMENT as PK.
If UUIDs are required for business reasons, use UUIDv7 (time-ordered) or store the UUID
as a BINARY(16) with a separate auto-increment surrogate PK for the clustered index.
Extended guidance for database-internals was moved to references/skill-deep-dive.md to keep this entrypoint compact and fast to load.
Use that deep dive for:
2. Page Structure — The 16 KB Unit of All I/O3. Write-Ahead Log (WAL / Redo Log)4. Buffer Pool Mechanics — The Memory Manager5. MVCC — Consistent Reads Without Locking6. Transaction Isolation Levels — What Each Actually Does7. Lock Types and Interactions8. LSM Trees vs B-Trees — The Core Tradeoff9. Distributed Systems Concepts Applied to MySQL10. Index Structures Beyond B-Trees11. Write Amplification — Why SSDs Matter12. MySQL vs PostgreSQL Internals — Key Architectural Differences13. Design Rules Derived from Internalsdata-ai
Use when adding AI-powered analytics to a SaaS platform — semantic search over business data, natural language queries, trend detection, anomaly alerts, and AI-generated insights for dashboards. Covers embeddings, NL2SQL, and per-tenant analytics...
data-ai
Design AI-powered analytics dashboards — what metrics to show, how to display AI predictions and confidence, drill-down patterns, KPI cards, trend visualisation, AI Insights panels, export design, and role-based dashboard variants. Invoke when...
development
Use when designing, building, reviewing, or upgrading production software systems that must be secure, performant, maintainable, scalable, and user-centered. Apply before writing specs, code, architecture, APIs, databases, mobile apps, SaaS platforms, or ERP systems.
development
Professional web app UI using commercial templates (Tabler/Bootstrap 5) with strong frontend design direction when needed. Use for CRUD interfaces, dashboards, admin panels with SweetAlert2, DataTables, Flatpickr. Clone seeder-page.php, use...