Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Database Design?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sivaprasadreddy-database-design)
---
name: database-design
description: Design technology-independent data models and relational or non-relational schemas with integrity, query patterns, evolution, and lifecycle in mind.
---
# Database Design
## Purpose
Guide durable data modeling and schema design based on domain meaning, access patterns, and integrity requirements.
## When to use
Use when creating or changing entities, tables, collections, relationships, indexes, constraints, retention policies, or storage choices.
## Principles
1. Model business concepts and invariants, not merely screens or API payloads.
2. Understand read and write patterns before choosing structures and indexes.
3. Establish ownership and authoritative sources for each piece of data.
4. Enforce critical invariants as close to the data as practical, using constraints and transactional guarantees where supported.
5. Choose normalization or denormalization deliberately. Denormalize for demonstrated access or scale needs and define how consistency is maintained.
6. Use stable identifiers and explicit uniqueness rules.
7. Represent money, time, quantities, and state with appropriate semantics and precision.
8. Define nullability intentionally; distinguish unknown, absent, and inapplicable values.
9. Avoid storing derived values unless there is a clear performance or historical requirement.
10. Plan for data growth, retention, deletion, privacy, backup, and restoration.
## Workflow
1. Identify domain entities, value concepts, lifecycle, and invariants.
2. List important queries, filters, sorts, aggregations, and write paths.
3. Define relationships, cardinality, ownership, and deletion behavior.
4. Select storage technology based on consistency, query, scale, operational, and team needs.
5. Define keys, constraints, indexes, and concurrency expectations.
6. Decide where transactions are required and what atomicity they must provide.
7. Consider audit history, soft deletion, retention, and privacy requirements.
8. Validate the model against realistic examples and edge cases.
9. Estimate data volume and review likely expensive queries.
## Relational design guidance
- Use primary keys, foreign keys, unique constraints, check constraints, and appropriate nullability.
- Index actual access paths, including join keys and common filter/sort combinations.
- Avoid redundant indexes and indexes with no demonstrated use.
- Define deletion behavior explicitly; cascading deletion must be intentional.
- Avoid encoding multiple values into a single field when they need independent querying or integrity.
- Use transactions for related changes that must succeed or fail together.
## Non-relational design guidance
- Choose document, key-value, graph, or search storage based on access patterns and required guarantees.
- Define aggregate/document boundaries and update contention.
- Consider item size, partition/shard keys, hot partitions, secondary-index costs, and consistency semantics.
- Avoid treating a non-relational store as a schema-free substitute for data modeling.
## Review checklist
- Does the model represent domain invariants?
- Are ownership and relationship cardinalities clear?
- Are uniqueness and referential integrity protected?
- Do indexes support real queries?
- Are concurrent updates and transaction boundaries understood?
- Are time zones, precision, and null semantics explicit?
- Are retention, deletion, backup, and recovery addressed?
Provide a concise entity/relationship description and explain non-obvious constraints and indexing decisions. Do not prescribe a specific database without requirements.