{"product": {"columns": [[0, "product_id", "INT", 0, null, 1], [1, "product", "TEXT", 0, null, 0], [2, "dimensions", "TEXT", 0, null, 0], [3, "dpi", "REAL", 0, null, 0], [4, "pages_per_minute_color", "REAL", 0, null, 0], [5, "max_page_size", "TEXT", 0, null, 0], [6, "interface", "TEXT", 0, null, 0]], "primary_keys": ["product_id"], "foreign_keys": [], "unique_constraints": [[[0, 0, "product_id"]]], "check_constraints": []}, "store": {"columns": [[0, "Store_ID", "INT", 0, null, 1], [1, "Store_Name", "TEXT", 0, null, 0], [2, "Type", "TEXT", 0, null, 0], [3, "Area_size", "REAL", 0, null, 0], [4, "Number_of_product_category", "REAL", 0, null, 0], [5, "Ranking", "INT", 0, null, 0]], "primary_keys": ["Store_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Store_ID"]]], "check_constraints": []}, "district": {"columns": [[0, "District_ID", "INT", 0, null, 1], [1, "District_name", "TEXT", 0, null, 0], [2, "Headquartered_City", "TEXT", 0, null, 0], [3, "City_Population", "REAL", 0, null, 0], [4, "City_Area", "REAL", 0, null, 0]], "primary_keys": ["District_ID"], "foreign_keys": [], "unique_constraints": [[[0, 0, "District_ID"]]], "check_constraints": []}, "store_product": {"columns": [[0, "Store_ID", "INT", 0, null, 1], [1, "Product_ID", "INT", 0, null, 2]], "primary_keys": ["Store_ID", "Product_ID"], "foreign_keys": [[0, 0, "product", "Product_ID", "Product_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "store", "Store_ID", "Store_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Store_ID"], [1, 1, "Product_ID"]]], "check_constraints": []}, "store_district": {"columns": [[0, "Store_ID", "INT", 0, null, 1], [1, "District_ID", "INT", 0, null, 0]], "primary_keys": ["Store_ID"], "foreign_keys": [[0, 0, "district", "District_ID", "District_ID", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "store", "Store_ID", "Store_ID", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "Store_ID"]]], "check_constraints": []}}
CREATE TABLE product (
    product_id INT   PRIMARY KEY,
    product TEXT,
    dimensions TEXT,
    dpi REAL,
    pages_per_minute_color REAL,
    max_page_size TEXT,
    interface TEXT,
    UNIQUE (product_id)
);

CREATE TABLE store (
    Store_ID INT   PRIMARY KEY,
    Store_Name TEXT,
    Type TEXT,
    Area_size REAL,
    Number_of_product_category REAL,
    Ranking INT,
    UNIQUE (Store_ID)
);

CREATE TABLE district (
    District_ID INT   PRIMARY KEY,
    District_name TEXT,
    Headquartered_City TEXT,
    City_Population REAL,
    City_Area REAL,
    UNIQUE (District_ID)
);

CREATE TABLE store_product (
    Store_ID INT   PRIMARY KEY,
    Product_ID INT   PRIMARY KEY,
    PRIMARY KEY (Store_ID, Product_ID),
    UNIQUE (Store_ID, Product_ID),
    FOREIGN KEY (Product_ID) REFERENCES product(Product_ID),
    FOREIGN KEY (Store_ID) REFERENCES store(Store_ID)
);

CREATE TABLE store_district (
    Store_ID INT   PRIMARY KEY,
    District_ID INT,
    UNIQUE (Store_ID),
    FOREIGN KEY (District_ID) REFERENCES district(District_ID),
    FOREIGN KEY (Store_ID) REFERENCES store(Store_ID)
);