{"bank": {"columns": [[0, "branch_ID", "INT", 0, null, 1], [1, "bname", "varchar(20)", 0, null, 0], [2, "no_of_customers", "INT", 0, null, 0], [3, "city", "varchar(10)", 0, null, 0], [4, "state", "varchar(20)", 0, null, 0]], "primary_keys": ["branch_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "branch_ID"]]], "check_constraints": []}, "customer": {"columns": [[0, "cust_ID", "varchar(3)", 0, null, 1], [1, "cust_name", "varchar(20)", 0, null, 0], [2, "acc_type", "char(1)", 0, null, 0], [3, "acc_bal", "INT", 0, null, 0], [4, "no_of_loans", "INT", 0, null, 0], [5, "credit_score", "INT", 0, null, 0], [6, "branch_ID", "INT", 0, null, 0], [7, "state", "varchar(20)", 0, null, 0]], "primary_keys": ["cust_ID"], "foreign_keys": [[0, 0, "bank", "branch_ID", "branch_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "cust_ID"]]], "check_constraints": []}, "loan": {"columns": [[0, "loan_ID", "varchar(3)", 0, null, 1], [1, "loan_type", "varchar(15)", 0, null, 0], [2, "cust_ID", "varchar(3)", 0, null, 0], [3, "branch_ID", "varchar(3)", 0, null, 0], [4, "amount", "INT", 0, null, 0]], "primary_keys": ["loan_ID"], "foreign_keys": [[0, 0, "customer", "cust_ID", "Cust_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "bank", "branch_ID", "branch_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "loan_ID"]]], "check_constraints": []}}
CREATE TABLE bank (
    branch_ID INT   PRIMARY KEY,
    bname varchar(20),
    no_of_customers INT,
    city varchar(10),
    state varchar(20),
    UNIQUE (branch_ID)
);

CREATE TABLE customer (
    cust_ID varchar(3)   PRIMARY KEY,
    cust_name varchar(20),
    acc_type char(1),
    acc_bal INT,
    no_of_loans INT,
    credit_score INT,
    branch_ID INT,
    state varchar(20),
    UNIQUE (cust_ID),
    FOREIGN KEY (branch_ID) REFERENCES bank(branch_ID)
);

CREATE TABLE loan (
    loan_ID varchar(3)   PRIMARY KEY,
    loan_type varchar(15),
    cust_ID varchar(3),
    branch_ID varchar(3),
    amount INT,
    UNIQUE (loan_ID),
    FOREIGN KEY (cust_ID) REFERENCES customer(Cust_ID),
    FOREIGN KEY (branch_ID) REFERENCES bank(branch_ID)
);