AI-Cohort-July-2025

ADR-003: Database Selection (SQLite)

Status

Accepted (Updated)

Context

AutoDevHub needs to store user stories, feature descriptions, generated Gherkin scenarios, and metadata about AI processing. Given the capstone project constraints and development timeline, the database must:

The application will store:

Decision

We will use SQLite as the primary database for AutoDevHub for both development and production deployment.

SQLite provides:

Consequences

Positive Consequences

Negative Consequences

Risks

Alternatives Considered

PostgreSQL

MongoDB

MySQL

In-Memory Database

Implementation Notes

Development Setup

Production Configuration

Schema Design

-- Core story storage
CREATE TABLE user_stories (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    feature_description TEXT NOT NULL,
    gherkin_output TEXT NOT NULL,
    metadata TEXT, -- JSON as TEXT in SQLite
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Future: User sessions and preferences
CREATE TABLE sessions (
    id TEXT PRIMARY KEY, -- UUID as TEXT
    user_id TEXT,
    preferences TEXT, -- JSON as TEXT
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Performance Considerations