db-logical-design

Logical database design workflow for table structure, key strategy, constraints, and relational consistency. Use when durable schema semantics must be defined before physical tuning; do not use for query-only optimization tasks.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "db-logical-design" with this command: npx skills add kentoshimizu/sw-agent-skills/kentoshimizu-sw-agent-skills-db-logical-design

DB Logical Design

Overview

Use this skill to define schema semantics that preserve integrity and support maintainable application behavior.

Scope Boundaries

  • New domain models must be translated into relational schema.
  • Existing schema suffers from integrity drift or unclear constraints.
  • Teams need consistent key and relationship semantics.

Core Judgments

  • Primary and alternate key strategy.
  • Nullability and optionality semantics.
  • Referential integrity rules and cascade behavior.
  • Audit and lifecycle columns (created/updated/deleted/effective time).

Practitioner Heuristics

  • Model constraints in the database when they are universal invariants.
  • Use explicit unique constraints to encode business identity rules.
  • Avoid ambiguous nullable fields that represent multiple meanings.
  • For dynamic-language apps, define explicit typed schema mappings to avoid broad object payloads and repetitive casts at repository boundaries.

Workflow

  1. Map conceptual entities to relational structures.
  2. Define keys, uniqueness, and relationship cardinality rules.
  3. Specify integrity constraints and lifecycle semantics.
  4. Validate design against expected write/read workflows.
  5. Identify migration implications and compatibility constraints.
  6. Document deferred trade-offs and boundary assumptions.

Common Failure Modes

  • Business identity handled only in application code.
  • Soft-delete semantics conflict with uniqueness and reporting.
  • Overloaded JSON columns hide core relational structure.

Failure Conditions

  • Stop when key strategy cannot guarantee entity identity.
  • Stop when critical invariants rely on informal conventions.
  • Escalate when logical model conflicts with required consistency semantics.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

requirements-definition

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

architecture-clean-architecture

No summary provided by upstream source.

Repository SourceNeeds Review
Security

security-authentication

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

sqlalchemy-orm-patterns

No summary provided by upstream source.

Repository SourceNeeds Review