Interview prompt
Problem context
Skills being evaluated
Use the sequence below to surface constraints, choose boundaries, test failure behavior, and defend trade-offs. Concrete numbers are interview assumptions, not claims about a real production system.
Clarify the decision
- Decompose the overloaded entity into facts and decisions: legal identity, billing account, credentials, support relationship, and sales profile may have different owners. Identify shared invariants and consumers.
Establish scale assumptions
- Map change frequency, cross-team edits, direct writes, query patterns, and incident ownership. The primary bottleneck may be decision ambiguity rather than database throughput.
Functional and non-functional requirements
- Each fact and command has one accountable owner, consumers receive stable read contracts, unauthorized writes stop, and physical migration can happen later without changing semantics again.
High-level architecture
- Create domain services or modules that own commands and publish canonical facts, while a composed customer view serves cross-domain reads. Enforce database roles, API contracts, and an ownership catalog even if storage remains shared initially.
Data model and flow
- Commands route to the owning domain; domain events update composed projections. Shared identifiers link facts without giving every team permission to mutate the aggregate.
Consistency and transaction boundaries
- Keep shared-table transactions where necessary during transition, but make cross-domain invariants explicit and assign a coordinator. Derived views are eventually consistent with freshness contracts.
Failure modes and recovery
- If a domain owner is unavailable, reject or queue its mutation rather than allowing another team to write tables directly. Projections reconcile from source facts and expose stale status.
Security and privacy
- Database and service permissions follow fact ownership, tenant context, and purpose. Support tools issue domain commands rather than privileged direct updates.
Observability and SLOs
- Track cross-owner code changes, direct writes, contract usage, projection lag, denied mutations, and decision lead time. Ownership is effective only if incidents and roadmap questions route correctly.
Capacity and cost
- Logical ownership yields organizational value before paying for data duplication. Split physical stores when scale, failure, compliance, or delivery benefit exceeds synchronization cost.
Alternatives and trade-offs
- One canonical mega-entity feels simple but centralizes every decision; full duplication gives autonomy but creates conflicting truth. Own individual facts and compose views.
Evolution and migration
- Publish the fact map, assign owners, wrap writes, revoke direct access, build projections, then move storage domain by domain only where justified.
What Staff and Principal candidates should emphasize
- Staff candidates separate semantic ownership from physical placement. They reduce coordination by assigning decisions, not by blindly copying shared data into every service.
Decision trade-offs
Shared entity
Option A
One team owns the entire customer aggregate
Option B
Domains own distinct facts with composed views
Recommendation:Split ownership by business fact and decision while maintaining a composed customer experience and stable identifiers.
Storage timing
Option A
Separate databases before changing APIs
Option B
Enforce logical authority in shared storage first
Recommendation:Establish command and access boundaries first; physical separation then becomes an implementation change rather than another semantic redesign.
Follow-up interview questions
- 01Who owns the customer display name?
- 02How are cross-domain invariants enforced?
- 03Can teams still join the shared tables?
- 04When should a domain receive its own database?
Common weak answers and mistakes
- 01Assigning the whole overloaded entity to one central platform team.
- 02Duplicating customer state into every service and accepting conflicting truth.
- 03Changing org charts without enforcing write access technically.
- 04Splitting databases before defining commands, facts, and identifiers.
Interviewer evaluation rubric
Moves tables between teams but cannot decompose business facts, decisions, or invariants.
Defines fact owners, command APIs, events, composed views, database roles, and explicit coordinators.
Adds support tooling, projection freshness, ownership metrics, staged access revocation, and selective storage criteria.
Reshapes team decision rights and technical authority together while preserving coherent customer and data semantics.