本文へ移動
cccskills
無料GitHub で公開

database-systems-expert

Expert-level database systems theory covering relational model, query processing and optimization, transaction management, concurrency control, recovery, and NoSQL systems.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.6 KB
  • .gitkeep0 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Database Systems Expert

Before Starting

  1. Relational or NoSQL?
  2. OLTP or OLAP workload?
  3. Theory or implementation focus?

Core Expertise Areas

Relational Model

Relations: tables with rows and columns, schema defines types. Keys: superkey, candidate key, primary key, foreign key. Relational algebra: select, project, join, union, difference, rename. Normalization: 1NF, 2NF, 3NF, BCNF — eliminate redundancy and anomalies. Functional dependencies: X -> Y means X determines Y.

Query Processing

Query parsing: SQL to parse tree to logical plan. Query optimization: logical to physical plan, cost-based optimizer. Join algorithms: nested loop, hash join, sort-merge join. Index types: B-tree (range queries), hash index (equality), bitmap (low cardinality). Query plan: EXPLAIN output, seek vs scan, index usage.

Transaction Management

ACID: atomicity, consistency, isolation, durability. Isolation levels: read uncommitted, read committed, repeatable read, serializable. Anomalies: dirty read, non-repeatable read, phantom read. MVCC: multi-version concurrency control — readers do not block writers.

Concurrency Control

Two-phase locking: growing phase acquires locks, shrinking releases. Deadlock: detection via waits-for graph, prevention via ordering. Optimistic concurrency: read, validate, write — no locks during read. Timestamp ordering: each transaction gets timestamp, conflicts resolved by order.

Recovery

Write-ahead logging: log record before data page — guarantee durability. ARIES algorithm: analysis, redo, undo phases after crash. Checkpoints: reduce recovery time by limiting log replay. Shadow paging: copy-on-write alternative to logging.

Best Practices

  • Always analyze query plans before deploying to production
  • Choose isolation level based on actual consistency requirements
  • Index foreign keys to avoid full table scans on joins
  • Monitor long-running transactions and lock waits

Common Pitfalls

PitfallFix
N+1 query problemUse joins or eager loading
Missing index on join columnAlways index foreign keys
Using serializable isolation unnecessarilyProfile and choose appropriate level
Not handling transaction rollbackAlways handle errors and rollback explicitly

Related Skills

  • postgresql-expert
  • distributed-systems-cs-expert
  • sql-analytics-expert

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Expert-level abstract algebra knowledge. Use when working with groups, rings, fields, modules, Galois theory, representation theory, or algebraic structures. Also use when the user mentions 'group', 'ring', 'field', 'homomorphism', 'isomorphism', 'normal subgroup', 'quotient group', 'Sylow theorem', 'Galois theory', 'polynomial ring', 'ideal', 'module', 'vector space', or 'representation theory'.

日本語の概要は準備中です。原文の説明を表示しています。

luokai0/ai-agent-skills-by-luo-kai122026年5月6日 更新

Expert-level acoustics knowledge. Use when working with sound waves, acoustic propagation, resonance, standing waves, Doppler effect, room acoustics, ultrasound, noise control, musical acoustics, or architectural acoustics. Also use when the user mentions 'sound wave', 'decibel', 'frequency', 'resonance', 'standing wave', 'Doppler effect', 'acoustic impedance', 'reverberation', 'ultrasound', 'noise control', 'harmonics', or 'sound intensity'.

日本語の概要は準備中です。原文の説明を表示しています。

luokai0/ai-agent-skills-by-luo-kai122026年5月6日 更新

Expert-level aerodynamics covering subsonic and supersonic flow, lift and drag, airfoil theory, boundary layers, compressible flow, and CFD methods.

日本語の概要は準備中です。原文の説明を表示しています。

luokai0/ai-agent-skills-by-luo-kai122026年5月6日 更新

Expert-level air quality engineering covering pollutant sources, atmospheric dispersion, air quality standards, emission controls, and air quality modeling.

日本語の概要は準備中です。原文の説明を表示しています。

luokai0/ai-agent-skills-by-luo-kai122026年5月6日 更新

Expert-level aircraft structures covering structural design philosophy, wing and fuselage analysis, fatigue and damage tolerance, composite structures, and certification.

日本語の概要は準備中です。原文の説明を表示しています。

luokai0/ai-agent-skills-by-luo-kai122026年5月6日 更新

Expert-level algorithms and complexity theory covering sorting, searching, graph algorithms, dynamic programming, greedy algorithms, NP-completeness, and algorithm design paradigms.

日本語の概要は準備中です。原文の説明を表示しています。

luokai0/ai-agent-skills-by-luo-kai122026年5月6日 更新

luokai0 のスキルをすべて見る

このスキルの問題を報告する