
💹 Fintech & Capital Markets · Database ERD
Tables for a loan book: borrowers, loan products, loans, repayment schedules, payments and collection actions.
Drawing diagram…
Loan management database: borrowers take loans of a loan product; each loan has instalments (due date, principal, interest); payments are recorded and allocated to instalments; overdue instalments have collection actions (call, SMS, field visit).
erDiagram
BORROWER ||--o{ LOAN : takes
LOAN_PRODUCT ||--o{ LOAN : "offered as"
LOAN ||--|{ INSTALMENT : "repaid in"
LOAN ||--o{ PAYMENT : receives
PAYMENT ||--o{ ALLOCATION : "split into"
INSTALMENT ||--o{ ALLOCATION : "paid by"
INSTALMENT ||--o{ COLLECTION_ACTION : "followed up by"
BORROWER {
int id PK
string name
string pan
string mobile
}
LOAN_PRODUCT {
int id PK
string name
decimal interest_rate
int tenure_months
}
LOAN {
int id PK
int borrower_id FK
int product_id FK
decimal principal
date disbursed_on
string status
}
INSTALMENT {
int id PK
int loan_id FK
date due_date
decimal principal_due
decimal interest_due
string status
}
PAYMENT {
int id PK
int loan_id FK
decimal amount
string mode
date paid_on
}
ALLOCATION {
int id PK
int payment_id FK
int instalment_id FK
decimal amount
}
COLLECTION_ACTION {
int id PK
int instalment_id FK
string action
date action_on
}A digital lending app that takes a loan application from KYC to disbursal in minutes, using credit bureau data, bank statement analysis and e-mandates for repayment.
How a lender gets a customer's bank statements through India's Account Aggregator network: consent request, approval in the AA app, and encrypted data sharing.
How a Buy Now Pay Later option decides at checkout whether to approve a shopper and splits the purchase into instalments.
The states of a stock market order in a broking app, from placement through exchange matching to partial and full fills.
Where a stock broking platform runs: low-latency order systems co-located near the exchange, and customer apps and back office in the cloud.
How a monthly SIP in a mutual fund works behind an investment app: mandate debit, order to the exchange platform, NAV allotment and units credited.