CREATE TABLE account
(
    account_id  INTEGER default 0 not null
        primary key,
    district_id INTEGER default 0 not null,
    frequency   TEXT   not null,
    date        DATE          not null,
    foreign key (district_id) references district (district_id)
);
account
CREATE TABLE card
(
    card_id INTEGER default 0 not null
        primary key,
    disp_id INTEGER           not null,
    type    TEXT    not null,
    issued  DATE          not null,
    foreign key (disp_id) references disp (disp_id)
);
card
CREATE TABLE client
(
    client_id   INTEGER        not null
        primary key,
    gender      TEXT not null,
    birth_date  DATE       not null,
    district_id INTEGER        not null,
    foreign key (district_id) references district (district_id)
);
client
CREATE TABLE disp
(
    disp_id    INTEGER        not null
        primary key,
    client_id  INTEGER        not null,
    account_id INTEGER        not null,
    type      TEXT not null,
    foreign key (account_id) references account (account_id),
    foreign key (client_id) references client (client_id)
);
disp
CREATE TABLE district
(
    district_id INTEGER default 0 not null
        primary key,
    A2          TEXT   not null,
    A3          TEXT   not null,
    A4          TEXT       not null,
    A5          TEXT           not null,
    A6          TEXT           not null,
    A7          TEXT           not null,
    A8          INTEGER        not null,
    A9          INTEGER           not null,
    A10         REAL not null,
    A11         INTEGER           not null,
    A12         REAL null,
    A13         REAL not null,
    A14         INTEGER           not null,
    A15         INTEGER        null,
    A16         INTEGER          not null
);
district
CREATE TABLE loan
(
    loan_id    INTEGER default 0 not null
        primary key,
    account_id INTEGER           not null,
    date       DATE          not null,
    amount     INTEGER           not null,
    duration   INTEGER           not null,
    payments   REAL not null,
    status     TEXT    not null,
    foreign key (account_id) references account (account_id)
);
loan
CREATE TABLE `order`
(
    order_id   INTEGER default 0 not null
        primary key,
    account_id INTEGER           not null,
    bank_to    TEXT    not null,
    account_to INTEGER           not null,
    amount     REAL not null,
    k_symbol   TEXT    not null,
    foreign key (account_id) references account (account_id)
);
order
CREATE TABLE trans
(
    trans_id   INTEGER default 0    not null
        primary key,
    account_id INTEGER default 0    not null,
    date       DATE             not null,
    type       TEXT       not null,
    operation  TEXT      null,
    amount     INTEGER              not null,
    balance    INTEGER             not null,
    k_symbol   TEXT      null,
    bank       TEXT       null,
    account    INTEGER          null,
    foreign key (account_id) references account (account_id)
);
trans
original_column_name,column_name,column_description,data_format,value_description
order_id,,identifying the unique order,integer,
account_id,,id number of account,integer,
bank_to,bank of the recipient,bank of the recipient,text,
account_to,account of the recipient,account of the recipient,integer,each bank has unique two-letter code
amount,debited amount,debited amount,real,
k_symbol,characterization of the payment,purpose of the payment,text,"""POJISTNE"" stands for insurance payment
""SIPO"" stands for household payment
""LEASING"" stands for leasing
""UVER"" stands for loan payment"
order
original_column_name,column_name,column_description,data_format,value_description
card_id,credit card id,id number of credit card,integer,
disp_id,disposition id,disposition id,integer,
type,,type of credit card,text,"""junior"": junior class of credit card; 
""classic"": standard class of credit card; 
""gold"": high-level credit card"
issued,,the date when the credit card issued ,date,in the form YYMMDD
card
original_column_name,column_name,column_description,data_format,value_description
district_id,location of branch,location of branch,integer ,
A2,district_name,district_name,text,
A3,region,region,text,
A4,number of inhabitants ,,text,
A5,no. of municipalities with inhabitants < 499,municipality < district < region,text,
A6,no. of municipalities with inhabitants 500-1999,municipality < district < region,text,
A7,no. of municipalities with inhabitants 2000-9999,municipality < district < region,text,
A8,no. of municipalities with inhabitants > 10000,municipality < district < region,integer,
A9,,,integer,not useful
A10,ratio of urban inhabitants,ratio of urban inhabitants,real,
A11,average salary,average salary,integer,
A12,unemployment rate 1995,unemployment rate 1995,real,
A13,unemployment rate 1996,unemployment rate 1996,real,
A14,no. of entrepreneurs per 1000 inhabitants,no. of entrepreneurs per 1000 inhabitants,integer,
A15,no. of committed crimes 1995,no. of committed crimes 1995,integer,
A16,no. of committed crimes 1996,no. of committed crimes 1996,integer,
district
original_column_name,column_name,column_description,data_format,value_description,
account_id,account id,the id of the account,integer,,
district_id,location of branch,location of branch,integer ,,
frequency,frequency,frequency of the acount,text,,"""POPLATEK MESICNE"" stands for monthly issuance
""POPLATEK TYDNE"" stands for weekly issuance
""POPLATEK PO OBRATU"" stands for issuance after transaction"
date,date,the creation date of the account,date,in the form YYMMDD,
account
original_column_name,column_name,column_description,data_format,value_description
disp_id,disposition id,unique number of identifying this row of record,integer,
client_id,,id number of client,integer,
account_id,,id number of account,integer,
type,,type of disposition,text,"""OWNER"" : ""USER"" : ""DISPONENT""
commonsense evidence:
the account can only have the right to issue permanent orders or apply for loans"
disp
original_column_name,column_name,column_description,data_format,value_description
client_id,,the unique number,integer,
gender,,,text,"F：female 
M：male "
birth_date,,birth date,date,
district_id,location of branch,location of branch,integer,
client
original_column_name,column_name,column_description,data_format,value_description
trans_id,transaction id,transaction id,integer,
account_id,,,integer,
date,date of transaction,date of transaction,date,
type,+/- transaction,+/- transaction,text,"""PRIJEM"" stands for credit
""VYDAJ"" stands for withdrawal"
operation,mode of transaction,mode of transaction,text,"""VYBER KARTOU"": credit card withdrawal
""VKLAD"": credit in cash
""PREVOD Z UCTU"" :collection from another bank
""VYBER"": withdrawal in cash
""PREVOD NA UCET"": remittance to another bank"
amount,amount of money,amount of money,integer,Unit：USD
balance,balance after transaction,balance after transaction,integer,Unit：USD
k_symbol,characterization of the transaction,,text,"""POJISTNE"": stands for insurrance payment
""SLUZBY"": stands for payment for statement
""UROK"": stands for interest credited
""SANKC. UROK"": sanction interest if negative balance
""SIPO"": stands for household
""DUCHOD"": stands for old-age pension
""UVER"": stands for loan payment"
bank,bank of the partner,,text,each bank has unique two-letter code
account,account of the partner,,integer,
trans
original_column_name,column_name,column_description,data_format,value_description
loan_id,,the id number identifying the loan data,integer,
account_id,,the id number identifying the account,integer,
date,,the date when the loan is approved,date,
amount,,approved amount,integer,unit：US dollar
duration,,loan duration,integer,unit：month
payments,monthly payments,monthly payments,real,unit：month
status,,repayment status,text,"'A' stands for contract finished, no problems;
'B' stands for contract finished, loan not paid;
'C' stands for running contract, OK so far;
'D' stands for running contract, client in debt"
loan