SevyDevy

Design the database for a banking system

PremiumDatabase designHard

  • ACID transactions
  • KYC
  • Joint accounts

Quick answer

This database design interview question asks you to design the database for a banking system. Aim for a design that stores data correctly and serves its main queries well, then explain the schema, keys, indexes and trade-offs. Interviewers want to see how you model entities, choose keys and design for the real access patterns.

The problem

Design the database for a banking system: the customer-facing records of a retail bank. Customers pass KYC checks, open current, savings and fixed-deposit accounts (some jointly), get debit cards and receive monthly statements. The hard parts are card holds, joint ownership and an exact available balance.

Customers also pay by card against these accounts. The core ledger already exists: it records every posting with an entry ID, account ID, signed amount and timestamp, and returns the ledger balance of any account. Model the accounts and customer-facing records around it.

What must the database for a banking system do?

  • Open an account: Open a current, savings or fixed-deposit account for a verified customer, with its type settings: an overdraft limit (current) or an interest rate and maturity date (fixed deposit).
  • Onboard and KYC: Create a customer and record each KYC check (identity document, address proof, sanctions screening) with its result, date and a reference to the stored document.
8 more requirementsUnlock to see all

How well must it do it?

  • Isolation: Two concurrent authorisations on one account must never take the available balance below zero.
  • Compliance: No new account or card is created for a customer whose KYC is not verified and in date.
5 more requirementsUnlock to see all

What scale should you design for?

Use these numbers in your estimates.

The scale numbers unlock with this questionUnlock

Key concepts

  • ACID transactions
  • KYC
  • Joint accounts
  • Card holds
  • Idempotency
  • Audit trail

How you’ll practise

6 short steps · save and come back any time
  1. Access patterns
  2. Entities
  3. Schema
  4. Indexes and queries
  5. Scale and consistency
  6. Wrap-up

Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.

What do interviewers look for?

In any database design round.

  • Lists the entities and how they relate before writing tables
  • Designs the schema around the main access patterns
  • Chooses primary keys, foreign keys and indexes with reasons
  • Explains where to normalise and where to denormalise
  • Considers integrity, transactions and concurrent writes
  • Plans for growth: partitioning, archiving and migrations

Questions people ask about this interview question

Which design type is this question?
It is a database design question. You design the database for a banking system and explain your choices the way you would in an interview.
Is this question asked at entry level?
It is marked Hard. It suits engineers preparing for senior interviews, where you are expected to drive the discussion and go deep on trade-offs.
What should I cover first?
Start with the entities and the main queries the database must answer. Agree on scope with the interviewer before you design anything.
Can I practise it for free?
It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.

Related questions

Updated · Written by the SevyDevy team

Premium questionSign up free, then unlock it