← Все учебные базы

Банк

Схема базы

Ctrl + колесо — масштаб
accounts.client_id → clients.id · Многие к одномуN1transactions.account_id → accounts.id · Многие к одномуN1accountsPKidintegerFKclient_idintegeropened_atdateclosed_atdatecurrencytexttypetextclientsPKidintegernametextcitytextbirth_datedatesegmenttexttransactionsPKidintegerFKaccount_idintegertx_timetimestamp without time zoneamountnumeric(12,2)categorytextmerchanttext

accounts

  • idintegerпервичный ключ
  • client_idinteger
  • opened_atdate
  • closed_atdate
  • currencytext
  • typetext

clients

  • idintegerпервичный ключ
  • nametext
  • citytext
  • birth_datedate
  • segmenttext

transactions

  • idintegerпервичный ключ
  • account_idinteger
  • tx_timetimestamp without time zone
  • amountnumeric(12,2)
  • categorytext
  • merchanttext