ORIGINAL COMPANY-CONTEXT PRACTICE
Generate reproducible synthetic account statements
Original practice scenario: A fictional banking system receives backdated adjustments after a monthly statement is issued. How should its statement query support both original and corrected views?
Written for independent practice using company context; this is not a verified question from a company interview.
A REASONED APPROACH
Model answer.
Separate effective transaction time from knowledge time. Reproducing an issued statement requires the records known at issuance, while a corrected view may incorporate later accepted adjustments.
Work through it
- Store immutable event revisions with effective and recorded timestamps, and identify each statement by its cutoff and data snapshot.
- Apply accepted debit, credit and reversal rules within that snapshot, reconciling opening balance plus movements to closing balance in the account currency.
- Test late adjustments, timezone boundaries, duplicate events and a correction that changes a prior month; link corrected statements to the originals.
Tradeoffs to discuss
- Bitemporal histories cost storage and query complexity but allow both operational reporting and faithful historical reproduction.
Common pitfalls
- Do not overwrite the data that supported an issued statement.
- A transaction date and its ingestion date answer different reporting questions.