Skip to main content

Employee Data Ownership and Boundaries

Summary

Employee Service owns workforce master persistence for its extracted bounded context. Platform separately owns tenant and company control-plane data. The monolith retains Legacy workforce tables during transition, while downstream services own their own read models.

Audience

  • Solution architects and backend developers
  • DevOps engineers planning data boundaries

Ownership model

Confirmed boundaries

OwnerOwnsDoes not implySource
Employee ServiceEmployee aggregate, departments, designations, profile children, timeline, audit, outboxOwnership of company/control-plane datamicroservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
Platform ServiceTenant, company, and control-plane persistenceDirect table sharing with Employee Servicemicroservices/src/platform-service/Data/PlatformDbContext.cs
MonolithLegacy Labor and organization persistenceCanonical ownership after final cutoverData/AppDbContext.cs
Downstream servicesTheir service-specific Employee projections/read modelsWrite ownership of Employee master datamicroservices/src/payroll-service/Infrastructure/PayrollDbContext.cs, microservices/src/leave-service/Infrastructure/LeaveDbContext.cs

Aggregate and organization ownership

Employee, its owned employment value, and eight child collections share one aggregate persistence boundary. Department and Designation are separate aggregates inside the same Employee Service schema. Employee assignment fields reference those objects logically; the reviewed EF model does not configure cross-aggregate database foreign keys.

No shared-table assumption

Project references, separate contexts, and separate migrations establish independent persistence models. Integration or compatibility behavior must not be implemented by directly updating another service's tables. Any approved data replication should use an explicit integration or migration mechanism.

Transitional concerns

  • Final monolith-to-service system-of-record cutover is Requires confirmation.
  • Historical backfill and reconciliation ownership are Not implemented in Employee Service.
  • Downstream delivery and read-model freshness are covered by future event documentation, not by the existence of source tables alone.

Source References

  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
  • microservices/src/platform-service/Data/PlatformDbContext.cs
  • microservices/src/payroll-service/Infrastructure/PayrollDbContext.cs
  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • Data/AppDbContext.cs

See Also

Keywords

  • Data ownership
  • Bounded context
  • No shared tables

Revision Information

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