advancedTop 15 Database Design Questions
Design a financial transaction system supporting multiple currencies and audit compliance.
accounts(id, user_id FK, currency CHAR(3), balance DECIMAL(18,4), version INT) — @Version for optimistic locking transactions(id UUID PK, from_account_id FK, to_account_id FK, amount DECIMAL(18,4), currency, exchange_rate, status, created_at, idempotency_key UUID UNIQUE) transaction_entries(id, transaction_id FK, account_id FK, debit_amount, credit_amount, created_at) — double-entry bookkeeping au
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
Design a financial transaction system supporting multiple currencies and audit compliance.