Data Architecture
Summary
HR Suit uses PostgreSQL with a transitional ownership model: the monolith uses the default schema, extracted services use service-owned schemas, and the platform boundary manages shared tenant metadata and optional tenant database provisioning.
Audience
- Developers and QA engineers
- DevOps engineers
- Implementation partners
- Solution architects
Overview
The active monolith retains persistence in PostgreSQL’s default schema. Extracted services use separate EF Core contexts and service-owned schemas, creating logical ownership boundaries even where infrastructure is shared. Services apply EF Core migrations; the monolith still uses a transitional initialization mechanism.
The service-schema nodes are representative. They do not imply that only two service schemas exist. The optional database-per-tenant path is a platform capability and is not a universal storage model for every service.
Ownership and consistency
- The component that owns a schema is responsible for its data access and evolution.
- Cross-service state is exchanged through APIs or integration events rather than direct ownership of another service’s domain tables.
- Audit records capture selected business or administrative changes.
- Inbox or processed-event records support idempotent event handling.
- Transactional outbox records couple a domain change with an event awaiting publication.
- Payroll and document-related processing maintain selected local read models from other domains’ events.
Tenant-scoped access is enforced through a combination of application and persistence mechanisms. Implementation varies by boundary; multi-tenancy describes this without asserting one universal filter.
Documentation boundary
This page intentionally excludes table names, columns, indexes, connection configuration, migration commands, retention policy, and production topology. Those require later database and operations documentation with environment-specific review.
Related Articles
See Also
Keywords
- Data ownership
- Database migration
- Idempotency
Revision Information
- Last reviewed: 2026-07-14
- Owner: architecture-team
- Status: Draft