Sign in to create and edit playbooks. Sign In Register

Define Data Architecture

DTA-5 Order: #5 Inception Has Dependencies

Updated 4 months ago

Guidance

Define Data Architecture

Objective

Choose database engine, define schema strategy, select data access patterns, and plan migration and caching approaches.


Decisions to Make

1. Database Engine

Choose one (or combination):
- SQLite — File-based, zero config. Best for: desktop apps, prototypes, single-user.
- PostgreSQL — Full-featured relational. Best for: production web apps, complex queries.
- MySQL/MariaDB — Relational, widely supported. Best for: standard web apps.
- Neo4j — Graph database. Best for: relationship-heavy data, graph traversals.
- MongoDB — Document store. Best for: flexible schemas, rapid prototyping.
- Combination — e.g., SQLite for FOB + Neo4j for HOMEBASE.

Document rationale: performance needs, data model fit, team expertise, licensing.

2. Schema Strategy

  • Migration tool: Django migrations, Alembic, Flyway, manual SQL
  • Versioning: How are schema changes tracked? Numbered migrations? Timestamps?
  • Seed data: How is initial/test data loaded? Fixtures, factories, management commands?
  • Schema evolution: How are breaking changes handled? Expand-contract pattern?

3. Data Access Patterns

Choose one:
- ORM — Object-Relational Mapping (Django ORM, SQLAlchemy). Best for: standard CRUD.
- Repository Pattern — Abstract interface over storage. Best for: storage-agnostic design, testability.
- Raw Queries — Direct SQL/Cypher. Best for: complex queries, performance-critical paths.
- Hybrid — ORM for simple CRUD + raw queries for complex operations.

4. Read/Write Separation & Caching

  • Is read/write separation needed? (CQRS pattern)
  • Cache strategy: application-level cache, query cache, HTTP cache
  • Cache invalidation approach
  • Connection pooling configuration

5. Scan Skills

Query Playbook Skills where capability_domain in:
- DB_RELATIONAL
- DB_GRAPH
- DATA_ACCESS

Report coverage and gaps.


Deliverables

  • Database engine chosen with rationale
  • Schema strategy defined (migrations, versioning, seed data)
  • Data access pattern selected
  • Caching strategy defined (if applicable)
  • Skill coverage assessed for this domain
  • Decision recorded for inclusion in SAO.md (DTA-18)
Details
Order:
#5
Phase:
Predecessor:
DTA-4 Define Code Organization
Created:
Apr 12, 2026
Last Updated:
May 21, 2026
Workflow
Define Architecture

Analyze ESM artifacts, make architectural decisions across 16 domains (application structure through documentation strategy), scan available Skills for coverage, and …

View Workflow
Assigned Agent
Dr. Dobbs v2

Cautious Developer Agent Guide Motto: "Code that's easy to prove correct is code that works" …

Required Skills

No skills linked

Rules

No rules linked.

Input Artifacts

No input artifacts

Output Artifacts

No output artifacts