Skip to content
database-design logo

Data Modeling & Design Maintenance

database-design

Guidelines for designing, implementing, and maintaining high-quality data models, ensuring data integrity, performance, and scalability.

SKILL.md

Full skill instructions

Data Modeling & Design Maintenance

🎯 Purpose

To design, implement, and maintain high-quality data models that ensure data integrity, performance, and ease of use for downstream analytics and machine learning.

🏗️ Design Principles

1. Architectural Standards

  • Modular Design: Use a layered approach (e.g., Bronze/​Silver/​Gold or Staging/​Intermediate/​Mart).
  • Star Schema Preference: For BI layers, prioritize Fact and Dimension tables to optimize join performance and readability.
  • Idempotency: Every transformation must be repeatable. If run multiple times with the same input, it must produce the same output.

2. Technical Requirements

  • Primary Keys: Every table must have a defined Primary Key (composite or surrogate).
  • Naming Conventions: Use snake_case. Prefix tables based on layer (e.g., stg_, fct_, dim_).
  • Data Types: Use the most efficient types possible (e.g., INT vs BIGINT) and ensure consistent timestamp formats (UTC preferred).

🛠️ Implementation Workflow

Step 1: Requirements Gathering

  • Identify the grain of the table (e.g., "One row per transaction").
  • Define the business logic for every calculated field.

Step 2: DDL & Schema Design

  • Apply constraints where supported (NOT NULL, UNIQUE).
  • Document columns using descriptions within the code or yml files.

Step 3: Orchestration Integration (Airflow 3.x)

  • Dynamic Task Mapping: Use Airflow 3.x features to scale model processing across partitions.
  • Task Flow API: Use decorators for Python-based transformations to maintain clean, readable DAGs.
  • Retries: Configure sensible retry logic for transient failures during model builds.

🧹 Maintenance & Governance

Quality Assurance

  • Schema Tests: Run tests for null values, uniqueness, and referential integrity (e.g., using dbt tests or Airflow SQL sensors).
  • Volume Monitoring: Alert if row counts deviate significantly from historical averages.

Refactoring Logic

  • Impact Analysis: Use lineage tools to identify which downstream reports will be affected by a schema change.

📝 Quality Checklist

  • Is the grain clearly defined?
  • Are all columns documented?
  • Does the model handle incremental loads correctly?
  • Have you verified the join logic doesn't cause fan-out (duplicate rows)?

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View