NestJS Database Standards Priority: P0 (FOUNDATIONAL) Selection Strategy See references/persistence strategy.md for database selection matrix and scaling patterns (Connection Pooling, Sharding). Patterns - Repository Pattern : Isolate database logic. - TypeORM : Inject . - Prisma : Create comprehensive . - Abstraction : Services should call Repositories, not raw SQL queries. Configuration (TypeORM) - Async Loading : Always use to load secrets from . - Sync : Set in production; use migrations instead. Migrations - Never use in production. - Generation : Whenever TypeORM entity ( ) modified, mi…