{"Customers": {"columns": [[0, "Customer_ID", "INTEGER", 1, null, 1], [1, "Customer_Details", "VARCHAR(255)", 1, null, 0]], "primary_keys": ["Customer_ID"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Customer_Policies": {"columns": [[0, "Policy_ID", "INTEGER", 1, null, 1], [1, "Customer_ID", "INTEGER", 1, null, 0], [2, "Policy_Type_Code", "CHAR(15)", 1, null, 0], [3, "Start_Date", "DATE", 0, null, 0], [4, "End_Date", "DATE", 0, null, 0]], "primary_keys": ["Policy_ID"], "foreign_keys": [[0, 0, "Customers", "Customer_ID", "Customer_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Claims": {"columns": [[0, "Claim_ID", "INTEGER", 1, null, 1], [1, "Policy_ID", "INTEGER", 1, null, 0], [2, "Date_Claim_Made", "DATE", 0, null, 0], [3, "Date_Claim_Settled", "DATE", 0, null, 0], [4, "Amount_Claimed", "INTEGER", 0, null, 0], [5, "Amount_Settled", "INTEGER", 0, null, 0]], "primary_keys": ["Claim_ID"], "foreign_keys": [[0, 0, "Customer_Policies", "Policy_ID", "Policy_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Settlements": {"columns": [[0, "Settlement_ID", "INTEGER", 1, null, 1], [1, "Claim_ID", "INTEGER", 1, null, 0], [2, "Date_Claim_Made", "DATE", 0, null, 0], [3, "Date_Claim_Settled", "DATE", 0, null, 0], [4, "Amount_Claimed", "INTEGER", 0, null, 0], [5, "Amount_Settled", "INTEGER", 0, null, 0], [6, "Customer_Policy_ID", "INTEGER", 1, null, 0]], "primary_keys": ["Settlement_ID"], "foreign_keys": [[0, 0, "Claims", "Claim_ID", "Claim_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Payments": {"columns": [[0, "Payment_ID", "INTEGER", 1, null, 1], [1, "Settlement_ID", "INTEGER", 1, null, 0], [2, "Payment_Method_Code", "VARCHAR(255)", 0, null, 0], [3, "Date_Payment_Made", "DATE", 0, null, 0], [4, "Amount_Payment", "INTEGER", 0, null, 0]], "primary_keys": ["Payment_ID"], "foreign_keys": [[0, 0, "Settlements", "Settlement_ID", "Settlement_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Customers (
    Customer_ID INTEGER NOT NULL  PRIMARY KEY,
    Customer_Details VARCHAR(255) NOT NULL
);

CREATE TABLE Customer_Policies (
    Policy_ID INTEGER NOT NULL  PRIMARY KEY,
    Customer_ID INTEGER NOT NULL,
    Policy_Type_Code CHAR(15) NOT NULL,
    Start_Date DATE,
    End_Date DATE,
    FOREIGN KEY (Customer_ID) REFERENCES Customers(Customer_ID)
);

CREATE TABLE Claims (
    Claim_ID INTEGER NOT NULL  PRIMARY KEY,
    Policy_ID INTEGER NOT NULL,
    Date_Claim_Made DATE,
    Date_Claim_Settled DATE,
    Amount_Claimed INTEGER,
    Amount_Settled INTEGER,
    FOREIGN KEY (Policy_ID) REFERENCES Customer_Policies(Policy_ID)
);

CREATE TABLE Settlements (
    Settlement_ID INTEGER NOT NULL  PRIMARY KEY,
    Claim_ID INTEGER NOT NULL,
    Date_Claim_Made DATE,
    Date_Claim_Settled DATE,
    Amount_Claimed INTEGER,
    Amount_Settled INTEGER,
    Customer_Policy_ID INTEGER NOT NULL,
    FOREIGN KEY (Claim_ID) REFERENCES Claims(Claim_ID)
);

CREATE TABLE Payments (
    Payment_ID INTEGER NOT NULL  PRIMARY KEY,
    Settlement_ID INTEGER NOT NULL,
    Payment_Method_Code VARCHAR(255),
    Date_Payment_Made DATE,
    Amount_Payment INTEGER,
    FOREIGN KEY (Settlement_ID) REFERENCES Settlements(Settlement_ID)
);