Skip to main content

LMS Database Documentation

Summary

Complete Draft persistence documentation for the source-backed Learning Management System model, including ownership, mappings, tenant isolation, evidence stores, outbox, migrations, query behavior, integrity, and testing.

Audience

Engineering, database and platform reviewers, QA, support, architecture, security, product, and implementation partners.

Overview

Training Service uses one EF Core DbContext with 19 persisted object sets. Fifteen domain types inherit the common tenant entity, audit and timeline have equivalent filters, and processed-event/outbox records use separate mappings. Configuration is inline in the DbContext; no separate entity-configuration classes or owned EF types were found.

Verified model evidence includes five enforced cascade relationships, 38 generated indexes with eight unique constraints, one migration, one designer, one current snapshot, a design-time factory, and development-only migration/seeding behavior.

Documentation map

  1. Database overview
  2. Ownership and boundaries
  3. Storage pages from Course through Trainer Reference
  4. Audit and timeline, outbox, and processed events
  5. Tenant isolation, migrations and seeding, and integrity and transactions
  6. Schema reference and database testing

Requires confirmation

Production migration ownership, retention, backup/recovery, authorization around persistence-backed diagnostics, processed-event lifecycle, outbox relay ownership, cross-tenant elevated access, concurrency policy, and external-document reconciliation require confirmation.

Source References

  • microservices/src/training-service/Infrastructure/TrainingDbContext.cs
  • microservices/src/training-service/Domain/TrainingEntities.cs
  • microservices/src/training-service/Infrastructure/Persistence.cs
  • microservices/src/training-service/Infrastructure/DevelopmentSeeder.cs
  • microservices/src/training-service/Infrastructure/Migrations/TrainingDbContextModelSnapshot.cs

See Also

Keywords

  • LMS persistence
  • Training DbContext
  • Tenant isolation

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly