bankproductsSchema

bankproducts.info — Database Schema Guide for AI Agents

Self-contained reference for any project consuming bankproducts.db. Last updated 2026-06-05 (schema v2.8).

Schema v2.8SQLiteCC-BY-4.0420 banks · 2'571 products · 5'133 fees

What this database is

bankproducts.info is an open, schema-normalised database of all publicly published Swiss & Liechtenstein bank product prices — fees, interest rates, custody costs, transaction commissions. It covers 420 banks (~99 % of the FINMA-licensed universe) with 2'571 products and 5'133 fees as of 2026-Q2.

Every fee/rate links to a source_document row that cites the exact PDF or website URL it was extracted from, plus the source_page for PDF sources. Every claim is annotated verifiable: 1 (independently checkable) or 0 (self-reported).

Quick start — connecting

import sqlite3
conn = sqlite3.connect('bankproducts.db')
conn.row_factory = sqlite3.Row

# Example: cheapest current_account in Switzerland
for r in conn.execute("""
    SELECT b.name, p.name, f.amount, f.currency, f.frequency
    FROM product p
    JOIN bank b ON b.id = p.bank_id
    LEFT JOIN fee f ON f.product_id = p.id AND f.fee_type = 'account_mgmt'
    WHERE p.category = 'current_account'
      AND p.target_group = 'standard'
      AND b.country = 'CH'
    ORDER BY COALESCE(f.amount, 999) ASC
    LIMIT 10
"""):
    print(dict(r))

No installation needed beyond Python 3 + sqlite3 (stdlib). For TypeScript: better-sqlite3. For SQL CLIs: sqlite3 bankproducts.db.

The seven core tables

3.1 bank — the institution (420 rows)

CREATE TABLE bank (
    id          TEXT PRIMARY KEY,    -- lowercase slug: 'zkb', 'ubs', 'postfinance', 'lukb'
    name        TEXT NOT NULL,       -- 'Zürcher Kantonalbank'
    country     TEXT NOT NULL,       -- ISO 3166-1 alpha-2: 'CH' | 'LI'
    bank_type   TEXT,                -- cantonal_bank | universal_bank | cooperative_bank |
                                     -- private_bank | state_bank | neobank | regional_bank |
                                     -- fintech | retail_bank
    website     TEXT,
    bic         TEXT,                -- SWIFT/BIC code
    lei         TEXT,                -- GLEIF LEI (20 chars, 88% coverage)
    sic_iid     TEXT,                -- SIX Interbank Clearing participant number
    uid         TEXT,                -- Swiss UID (CHE-xxx.xxx.xxx)
    bpg         CHAR(12)             -- opaque permanent ID: 'BPG001...'
);
Key concept — three ID systems:
  • id — human-readable slug, can change in rare rename cases
  • bpg — permanent opaque ID, never re-used after assignment (atom #217 invariant)
  • lei — global standard (GLEIF), interoperable with PSD2/MiFID II/EMIR feeds

3.2 product — the bank's offering (2'571 rows)

CREATE TABLE product (
    id                 TEXT PRIMARY KEY,    -- '{bank_id}:{product_slug}', e.g. 'zkb:privatkonto'
    bank_id            TEXT REFERENCES bank(id),
    category           TEXT NOT NULL,       -- see "category enum" below (~28 values)
    name               TEXT NOT NULL,       -- bank's own product name
    currency           TEXT DEFAULT 'CHF',
    client_type        TEXT DEFAULT 'private', -- private | business | institutional
    target_group       TEXT,                -- standard | youth | children | senior | students |
                                            -- couples | ngo | wealthy | premium | platinum |
                                            -- private_only | high_net_worth
    description        TEXT,
    valid_from         TEXT,                -- YYYY-MM-DD
    source_document_id INTEGER,             -- FK to source_document(id)
    bpg                CHAR(12),            -- 'BPG003...'
    access_tier        TEXT DEFAULT 'free', -- free | pro | business (freemium gating)
    is_tailored        INTEGER,             -- 0 = published; 1 = on-request (UHNW); NULL = unknown
    notice_period_days INTEGER,             -- normalised withdrawal notice in days
    iso_account_type   CHAR(4),            -- ISO 20022 ExternalCashAccountType1Code
    product_type       TEXT                 -- v3.8: functional type, 48-value allowlist (see below); NULL = unclassified
);

Category enum (28 values, snake_case)

current_account, savings_account, term_deposit, deposit_account,
debit_card, credit_card, prepaid_card,
pillar_3a, vested_benefits, pension_account,
package, ebanking, check,
mortgage, personal_loan, leasing, guarantee,
wealth_management, securities_trading, self_directed_trading,
fiduciary_deposit, robo_advisory, fund_account,
financial_planning, personal_advisory,
metal_account, safe_deposit, digital_vault,
fx_subscription, loyalty_program

iso_account_type mapping (atom #308, 46 % coverage)

ISOInternal categoryn
CACCcurrent_account490
SVGSsavings_account440
LOANmortgage, personal_loan147
SACCterm_deposit, deposit_account83
NULLcards, mandates, CH-specific (3a/FZ), etc.1'369

product_type — functional type, closed allowlist (48 values, schema v3.8)

Since 2026-11-16 every product carries a functional type: the same concept has the same name at every bank, whatever the bank calls it and whichever category it was filed under. Demographics stay in target_group, the customer segment in client_type. Rule-based from name and description (db/product_type_backfill.sql), taxonomy with definitions in db/product_type_taxonomy.md. The MCP tool diff_banks and the product_type filters on /v1/banks/{id}/products and search_products build on it.

-- Konten
current_account, fx_account, savings_account, investment_savings_account,
gift_savings_account, rent_deposit_account, rent_collection_account,
capital_deposit_account, call_money_account, term_deposit, medium_term_note,
fiduciary_deposit, metal_account, crypto_custody
-- Vorsorge
pillar_3a_account, pillar_3a_securities, vested_benefits_account,
vested_benefits_securities, occupational_pension
-- Karten (Tier als Typ)
debit_card, credit_card_classic, credit_card_gold, credit_card_platinum, prepaid_card
-- Pakete & Kanaele
banking_package, ebanking_access, loyalty_program
-- Anlegen (Service-Level)
execution_only, advisory_mandate, discretionary_mandate, robo_advisory,
fund_savings_plan, private_banking, investment_fund, financial_planning
-- Kredit & Hypothek
fixed_rate_mortgage, saron_mortgage, variable_mortgage, construction_loan,
lombard_loan, consumer_loan, business_loan, leasing, bank_guarantee
-- Sonstiges
safe_deposit_box, cheque_service, capital_markets_service, b2b_banking_service

3.3 fee — what the customer pays (5'133 rows)

CREATE TABLE fee (
    id          TEXT PRIMARY KEY,    -- '{product_id}:{fee_type}'
    product_id  TEXT REFERENCES product(id),
    bank_id     TEXT REFERENCES bank(id),  -- denormalised
    fee_type    TEXT NOT NULL,       -- standardised key (see enum below)
    label       TEXT,                -- human-readable label from source PDF (often German)
    amount      REAL,                -- NULL when fee exists but value is "on request" / text-only
    currency    TEXT DEFAULT 'CHF',  -- CHF | EUR | USD | percent
    frequency   TEXT,                -- per_txn | per_txn_pct | monthly | quarterly | semi_annual |
                                     -- annual | per_annum_pct | one_time | one_time_pct | per_hour
    tier        TEXT,                -- free-text tier marker: '3rd card onwards', 'vol:>250k'
    channel     TEXT,                -- ebanking | paper | counter | phone | atm | app | pos | post_office | all
    note        TEXT,                -- conditions, fineprint, URLs for website-sourced fees
    source_page INTEGER,             -- PDF page number (NULL for website sources)
    valid_from  TEXT,
    access_tier TEXT DEFAULT 'free'
);

fee_type allowlist (76 values, schema v3.7)

Closed list since 2026-11-16: 365 historical spellings were mapped onto these concepts (label-guided, db/fee_type_canonicalization.sql; mapping table in db/fee_type_allowlist.md). The same concept carries the same name at every bank. Channel lives in channel, cadence in frequency, minimum fees in tier='minimum'.

-- Konto & Beziehung
account_mgmt, package_fee, account_opening, account_closing, periodic_closing,
dormancy_fee, foreign_domicile_surcharge, domiciliary_company_fee,
numbered_account_fee, held_mail, statement_fee, tax_statement, document_copy,
confirmation_fee, postage, research_fee, succession_fee, ebanking_fee, service_fee
-- Zahlungsverkehr
transfer_domestic, transfer_sepa, transfer_intl, incoming_payment, our_surcharge,
express_surcharge, instant_payment, payment_surcharge, payment_amendment,
standing_order, direct_debit, ebill, posting_fee, cheque_fee
-- Bargeld
atm_domestic_own, atm_domestic_other, atm_abroad, counter_withdrawal,
cash_deposit, cash_delivery, fx_cash
-- Karten
annual_fee, card_fee, additional_card, card_issuance, card_replacement, card_block,
pin_replacement, cash_advance, purchase_domestic, purchase_abroad (flat),
fx_markup (percent), load_fee, merchant_fee, discount
-- Anlegen
custody_fee, courtage, transaction_fee, fund_commission, mgmt_fee, advisory_fee,
performance_fee, ter, securities_transfer, stamp_duty, fiduciary_fee
-- Kredit & Hypothek
credit_setup_fee, credit_amendment_fee, credit_admin_fee, early_termination,
guarantee_fee, overdraft_interest, default_interest, reminder_fee
-- Sparen & Vorsorge / Schrankfach
withdrawal_limit_fee, pension_withdrawal_fee, safe_deposit_fee
Critical conventions:
  • For percentage fees: currency='percent' and frequency='per_annum_pct' (annual %) or 'per_txn' (per-trade %)
  • For annual fixed-CHF fees with fee_type='annual_fee': frequency='annual' (strict, atom #304-enforced)
  • Multiple rows per tiered fee — one row per tier. Use the tier text field or rely on label semantics
  • amount=NULL is meaningful: combined with is_tailored=1 on the parent product, signals "on-request pricing"

3.4 interest_rate — what the customer receives or owes (1'654 rows)

CREATE TABLE interest_rate (
    id                 TEXT PRIMARY KEY,
    product_id         TEXT REFERENCES product(id),
    bank_id            TEXT REFERENCES bank(id),
    rate_type          TEXT NOT NULL,    -- credit (paid to customer) | debit (charged) |
                                         -- bonus (conditional extra) | discount (reduction) |
                                         -- overdraft (penalty rate)
    rate               REAL,             -- percentage value (0.05 = 0.05 %); NULL = on request
    tier_floor         REAL,             -- balance lower bound (CHF); NULL = from 0
    tier_ceiling       REAL,             -- balance upper bound (CHF); NULL = unlimited
    tenor_months       INTEGER,          -- term length (24 = 2 years); NULL = no fixed term
    currency           TEXT DEFAULT 'CHF',
    snapshot_date      TEXT NOT NULL,    -- date observed (YYYY-MM-DD)
    valid_from         TEXT,             -- date rate took effect
    note               TEXT,
    source_document_id INTEGER
);

Use tier_floor / tier_ceiling for tiered rates, not name-encoding:

-- Rate at CHF 100'000 balance for a savings account:
SELECT bank_id, name, rate
FROM interest_rate r
JOIN product p ON p.id = r.product_id
WHERE p.category = 'savings_account'
  AND r.rate_type = 'credit'
  AND (tier_floor IS NULL OR tier_floor <= 100000)
  AND (tier_ceiling IS NULL OR tier_ceiling > 100000)
ORDER BY rate DESC;

3.5 source_document — provenance (650 rows)

Every fee / rate cites a source_document. The filename resolves against swiss_bank_list/countries/<country>/<slug>/<YYYY-Qn>/_raw/{pdf,md,html}/.

CREATE TABLE source_document (
    id          INTEGER PRIMARY KEY,
    bank_id     TEXT REFERENCES bank(id),
    title       TEXT,           -- 'Preisübersicht und Konditionen'
    valid_from  TEXT,           -- YYYY-MM-DD
    language    TEXT DEFAULT 'de',
    filename    TEXT,           -- 'preisverzeichnis.pdf' or website URL fragment
    parsed_at   TEXT,
    bpg         CHAR(12)        -- 'BPG002...'
);

3.6 bank_profile — institutional facts (234 rows)

For "is this bank too-big-to-fail / FINMA category / has Staatsgarantie" type questions. Imported from upstream swissbanks2026Q3_experimental.json. Schema v2.9 (2026-06-10) dropped 11 aspirational columns that had zero data — see journal atom #321.

CREATE TABLE bank_profile (
    bank_id                    TEXT PRIMARY KEY REFERENCES bank(id),
    operational_since          INTEGER,        -- year continuous operations began
    too_big_to_fail            INTEGER,        -- FINMA TBTF designation
    staatsgarantie             TEXT,           -- 'full' | 'limited' | NULL
    parent_group_relation      TEXT,           -- 'network_member' | 'subsidiary' | NULL
    finma_category             INTEGER,        -- 1 (largest) – 5 (smallest)
    retail_clients             INTEGER,
    institutional_only         INTEGER
);

3.7 claim — verifiable bank/product claims (1'067 rows)

CREATE TABLE claim (
    id              TEXT PRIMARY KEY,
    bank_id         TEXT REFERENCES bank(id),
    product_id      TEXT,                -- nullable; bank-level claims have no product
    category        TEXT,                -- safety | digital | convenience | esg | identity | media
    claim_key       TEXT,                -- 'credit_rating', 'apple_pay', etc.
    claim_value     TEXT,                -- 'AAA', 'true', 'https://...'
    display_text_de TEXT,
    display_text_en TEXT,
    source          TEXT,                -- 'S&P Global, March 2026' or 'self-reported'
    source_url      TEXT,
    verifiable      INTEGER,             -- 1 = independently verifiable, 0 = self-asserted
    valid_from      TEXT,
    valid_to        TEXT
);

Supporting tables

TablePurposeRows
product_featureFree-text product attributes (notice_period, daily_limit, included_services)1'072
product_aliasAlternative product names (e.g. blink_ais ID, e-banking display name)81
product_partner_linkLinks to partner (issuer/co-brand/reward-program)148
partnerWhite-label issuers (Viseca, Cornèrcard) + co-brands (Cumulus, Miles & More)11
package_itemComposition of bundled packages (included_product slugs)239
actus_contract_typeACTUS algorithmic-contract taxonomy (UMP/PAM/ANN/CSH/STK)11
category_actus_mapMaps our category → ACTUS type27
bpg_aliasHistorical slug → BPG ID mapping (for permanent ID resolution)3'652

The three classification systems (parallel taxonomies)

Different consumers need different vocabularies. We maintain three, mapped:

SystemWhereUse case
product.categoryInternal, 28 values, snake_caseCoarse bucket: views, ACTUS mapping, validator tiers
product.product_typeInternal, 48 values, snake_case (v3.8)Cross-bank comparison: same concept = same name; diff_banks, agent queries
product.iso_account_typeISO 20022 ExternalCashAccountType1CodeOpen Banking APIs (PSD2, SIX), banking-domain integrations
actus_contract_type via category_actus_mapACTUS algorithmic contract standardALM modelling, quant analysis, cashflow simulation

Don't try to unify them. Each system is correct for its consumer; the mapping tables are the right answer.

Worked examples

6.1 Cheapest 12-month Sparkonto (savings account) at CHF 100k

SELECT b.name AS bank, p.name AS product,
       r.rate AS pct, r.tier_floor, r.tier_ceiling,
       pf.feature_value AS notice
FROM interest_rate r
JOIN product p ON p.id = r.product_id
JOIN bank    b ON b.id = p.bank_id
LEFT JOIN product_feature pf ON pf.product_id = p.id AND pf.feature_key = 'notice_period'
WHERE p.category = 'savings_account'
  AND r.rate_type = 'credit'
  AND p.target_group = 'standard'
  AND r.currency = 'CHF'
  AND (r.tier_floor IS NULL  OR r.tier_floor  <= 100000)
  AND (r.tier_ceiling IS NULL OR r.tier_ceiling > 100000)
ORDER BY r.rate DESC NULLS LAST
LIMIT 15;

6.2 Find all banks issuing Mastercard Gold (cohort comparison)

SELECT b.name, p.name, f.amount, f.currency
FROM product p
JOIN bank   b ON b.id = p.bank_id
LEFT JOIN fee f ON f.product_id = p.id AND f.fee_type = 'annual_fee'
WHERE p.category = 'credit_card'
  AND (LOWER(p.name) LIKE '%gold%' OR LOWER(p.name) LIKE '%mastercard gold%')
  AND p.target_group = 'standard'
ORDER BY f.amount;

6.3 ISO 20022 standard filter (Open Banking style)

-- All current accounts in Switzerland (CACC = ISO 20022 current account)
SELECT b.name AS bank, b.lei, p.name AS product, p.iso_account_type
FROM product p
JOIN bank   b ON b.id = p.bank_id
WHERE p.iso_account_type IN ('CACC', 'SVGS')
  AND b.country = 'CH'
  AND b.lei IS NOT NULL
ORDER BY p.iso_account_type, b.name;

6.4 TCO calculation: depot custody + 12 trades × CHF 15k

WITH courtage AS (
  SELECT f.product_id, MIN(f.amount) AS pct_per_trade
  FROM fee f
  WHERE f.fee_type = 'courtage' AND f.currency = 'percent'
    AND (LOWER(f.label) LIKE '%aktien%' OR LOWER(f.label) LIKE '%schweiz%')
    AND LOWER(f.label) NOT LIKE '%ausland%'
  GROUP BY f.product_id
),
depot_pct AS (
  SELECT f.product_id, MAX(f.amount) AS pct_per_year
  FROM fee f
  WHERE f.fee_type = 'custody_fee' AND f.currency = 'percent'
  GROUP BY f.product_id
)
SELECT b.name,
       p.name,
       dp.pct_per_year * 250000 / 100      AS depot_chf,
       c.pct_per_trade * 15000 / 100 * 12  AS courtage_chf,
       dp.pct_per_year * 250000 / 100
         + c.pct_per_trade * 15000 / 100 * 12 AS total_chf
FROM product p
JOIN bank   b  ON b.id = p.bank_id
LEFT JOIN depot_pct dp ON dp.product_id = p.id
LEFT JOIN courtage  c  ON c.product_id = p.id
WHERE p.category = 'securities_trading'
  AND dp.pct_per_year IS NOT NULL
  AND c.pct_per_trade IS NOT NULL
ORDER BY total_chf
LIMIT 20;

6.5 GLEIF cross-reference (LEI to bank lookup)

SELECT id, name, country, bank_type, lei
FROM bank
WHERE lei IS NOT NULL
ORDER BY bank_type, name;
-- 293 results; cross-ref via api.gleif.org/api/v1/lei-records/{lei}

Gotchas / non-obvious conventions

  1. String encoding: German umlauts in SQL string literals are transliterated (ä→ae, ö→oe, ü→ue, ß→ss) to avoid encoding issues. Your queries should accept both 'Privatkonto' and substrings.
  2. amount=NULL ≠ "free". Distinguish:
    • amount=0, note='kostenlos' — explicitly free
    • amount=NULL, parent product.is_tailored=1 — on-request pricing (typical UHNW private banking)
    • amount=NULL, parent product.is_tailored=0/NULL — data gap / pending capture
  3. fee.tier is free-text (e.g. 'vol:>250k', '3rd card onwards'). For interest_rate tiers, use tier_floor / tier_ceiling instead. Schema gap: fee.tier_floor/tier_ceiling are candidates for v2.9.
  4. Slug aliases: a few bank.id slugs differ from crawl-folder naming. DB has: migrosbank (crawl: migros), postfinance (crawl: pofi), ubs (crawl: ubs-ch), vali (crawl: valiant), raiffeisen_rigi (crawl: raiff-ch).
  5. product_id format: always {bank_id}:{product_slug}. The colon is the canonical separator. Same for fee.id: {product_id}:{fee_type}.
  6. access_tier: most rows are 'free' (publicly disclosed). 'pro' and 'business' exist for a future freemium gate — currently no rows are gated, but downstream consumers may want to filter WHERE access_tier = 'free'.
  7. tenor_months is sparsely populated. Term-deposit products often encode tenor in the note or label field (e.g. 'Festgeld 2 Jahre'). Where set, it's authoritative.
  8. Foreign branches of Swiss banks (UBP Luxembourg, Edmond de Rothschild France, BIL Suisse parent's LU schedule) are loaded as separate source_document rows under the CH bank with a note flagging the jurisdiction.
  9. Atom #274 tailored cohort: ~22 UHNW classical private banks (Pictet, Lombard Odier, Julius Bär, Rahn+Bodmer, Reichmuth, etc.) have stub-only product loads with is_tailored=1 because they don't publish retail pricing schedules. Don't expect fees on these — they exist for completeness.
  10. bank_profile is only for census attributes (TBTF, FINMA category, Staatsgarantie, currency offerings, retail-vs-institutional flag). Do NOT mirror these in claim — validator catches that.
  11. source_document.filename with bank.com/path URL-fragment (no extension) is a website-sourced citation (atom #303 pattern); look up via WebFetch if needed. Real PDFs use full basenames like <hash>_filename.pdf.
  12. The database is rebuilt from scratch every monthly cycle. Don't store generated artifacts in the DB; treat it as immutable per build. BPGs (bank.bpg, product.bpg, source_document.bpg, partner.bpg) are the only IDs guaranteed permanent across rebuilds.

Special concepts you'll encounter

8.1 BPG — Bank Product Global identifier

Opaque 12-character permanent ID (format BPG00{type}{6 chars}). Type prefix:

  • BPG001 → bank
  • BPG002 → source_document
  • BPG003 → product
  • BPG006 → partner

Use BPGs for any external citation or cross-system reference. bank.id slugs can theoretically be renamed; BPGs cannot.

8.2 is_tailored (CDS-AU pattern)

Mirrors Australia's Consumer Data Right isTailored flag:

  • 0 — Pricing publicly published. Comparable, machine-readable. The retail/cantonal/cooperative norm.
  • 1 — Negotiated per client. UHNW classical private banks, business loans.
  • NULL — Unknown / not yet classified.

The distinction matters: a price-comparison API has to handle 1 differently from "no data" or "free".

8.3 ATOM-numbered observations (in journal)

Schema gaps, cross-bank patterns, data-quality findings carry numbered atom IDs in the project's journal. Recent ones referenced in column comments:

AtomTopic
#217BPG drift recovery cycle
#274UHNW classical private banks (don't publish schedules)
#275Small Sparkassen publisher cohort
#278is_tailored schema addition
#301Retail-private bias trap
#303Website-only pricing blindspot
#304annual_fee + frequency consistency
#305Misanchored fees + coverage gaps
#306FX-stale-quote rate cluster outlier validator
#307notice_period_days normalisation
#308ISO 20022 iso_account_type mapping
#309LEI backfill from upstream JSON v2

If you encounter a data anomaly, check the journal (swiss_bank_list/journal.md in sibling repo) — it's likely a known atom.

How to consume in your project

Option A — Copy the SQLite file

curl -L https://github.com/gbits-io/bankproducts_info/raw/main/db/bankproducts.db -o bankproducts.db
# Or via git submodule / vendored copy. Refreshes monthly.

Option B — Use the ACTUS Explorer JSON feed (read-only API)

curl https://bankproducts.info/actus-data.js
# Pre-computed widget data: per-bank product counts by ACTUS type, headline fees,
# foreign-branch fee references. ~620 KB, refreshed on every build.

Option C — Read the rankings snapshot (curated leaderboards)

docs_bankproducts/rankings/snapshots/2026-q2.json contains 250 ranked product entries across curated lists (best-chf-sparkonto, best-3a-vorsorgekonto-cash, best-festhypothek-5y, best-debit-card-fx, etc.).

Option D — Self-build from source

git clone https://github.com/gbits-io/bankproducts_info
cd bankproducts_info
cd db && bash build.sh   # rebuilds from schema.sql + ~430 *_retail.sql files

This is what we do internally. Takes ~10 seconds.

Reporting issues / extending

If you find a pricing mismatch with reality, the source citation is in source_document.filename (resolves to the actual PDF/website snapshot in swiss_bank_list/countries/<country>/<slug>/<YYYY-Qn>/_raw/). Report via GitHub Issues with the source filename + bank.id.

If you want a column we don't have, check swiss_banks_full.json first — the source-data-first principle (atom #309) means upstream often has fields not yet propagated.

One-line cheat sheet

-- Headline summary of any bank:
SELECT b.id, b.name, b.bank_type, b.country, b.lei,
       bp.too_big_to_fail, bp.finma_category, bp.staatsgarantie,
       (SELECT count(*) FROM product WHERE bank_id = b.id) AS products,
       (SELECT count(*) FROM fee     WHERE bank_id = b.id) AS fees,
       (SELECT count(*) FROM interest_rate WHERE bank_id = b.id) AS rates,
       (SELECT count(*) FROM claim   WHERE bank_id = b.id) AS claims
FROM bank b LEFT JOIN bank_profile bp ON bp.bank_id = b.id
WHERE b.id = 'zkb';   -- or any other bank.id

That's the entire surface area for typical use cases. The database is small (5.5 MB), self-documenting (every column has a comment in schema.sql), and CC-BY-4.0 — no license friction for any downstream consumer.


For the human onboarding another Claude Code project: save this doc as docs/bankproducts-db.html in the consumer project, paste the contents of db/schema.sql next to it, and the new project's Claude will have everything it needs to write meaningful queries from minute one.