{"Breeds": {"columns": [[0, "breed_code", "VARCHAR(10)", 0, null, 1], [1, "breed_name", "VARCHAR(80)", 0, null, 0]], "primary_keys": ["breed_code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "breed_code"]]], "check_constraints": []}, "Charges": {"columns": [[0, "charge_id", "INTEGER", 0, null, 1], [1, "charge_type", "VARCHAR(10)", 0, null, 0], [2, "charge_amount", "DECIMAL(19,4)", 0, null, 0]], "primary_keys": ["charge_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Sizes": {"columns": [[0, "size_code", "VARCHAR(10)", 0, null, 1], [1, "size_description", "VARCHAR(80)", 0, null, 0]], "primary_keys": ["size_code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "size_code"]]], "check_constraints": []}, "Treatment_Types": {"columns": [[0, "treatment_type_code", "VARCHAR(10)", 0, null, 1], [1, "treatment_type_description", "VARCHAR(80)", 0, null, 0]], "primary_keys": ["treatment_type_code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "treatment_type_code"]]], "check_constraints": []}, "Owners": {"columns": [[0, "owner_id", "INTEGER", 0, null, 1], [1, "first_name", "VARCHAR(50)", 0, null, 0], [2, "last_name", "VARCHAR(50)", 0, null, 0], [3, "street", "VARCHAR(50)", 0, null, 0], [4, "city", "VARCHAR(50)", 0, null, 0], [5, "state", "VARCHAR(20)", 0, null, 0], [6, "zip_code", "VARCHAR(20)", 0, null, 0], [7, "email_address", "VARCHAR(50)", 0, null, 0], [8, "home_phone", "VARCHAR(20)", 0, null, 0], [9, "cell_number", "VARCHAR(20)", 0, null, 0]], "primary_keys": ["owner_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Dogs": {"columns": [[0, "dog_id", "INTEGER", 0, null, 1], [1, "owner_id", "INTEGER", 1, null, 0], [2, "abandoned_yn", "VARCHAR(1)", 0, null, 0], [3, "breed_code", "VARCHAR(10)", 1, null, 0], [4, "size_code", "VARCHAR(10)", 1, null, 0], [5, "name", "VARCHAR(50)", 0, null, 0], [6, "age", "VARCHAR(20)", 0, null, 0], [7, "date_of_birth", "DATETIME", 0, null, 0], [8, "gender", "VARCHAR(1)", 0, null, 0], [9, "weight", "VARCHAR(20)", 0, null, 0], [10, "date_arrived", "DATETIME", 0, null, 0], [11, "date_adopted", "DATETIME", 0, null, 0], [12, "date_departed", "DATETIME", 0, null, 0]], "primary_keys": ["dog_id"], "foreign_keys": [[0, 0, "Owners", "owner_id", "owner_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Owners", "owner_id", "owner_id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "Sizes", "size_code", "size_code", "NO ACTION", "NO ACTION", "NONE"], [3, 0, "Breeds", "breed_code", "breed_code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "Professionals": {"columns": [[0, "professional_id", "INTEGER", 0, null, 1], [1, "role_code", "VARCHAR(10)", 1, null, 0], [2, "first_name", "VARCHAR(50)", 0, null, 0], [3, "street", "VARCHAR(50)", 0, null, 0], [4, "city", "VARCHAR(50)", 0, null, 0], [5, "state", "VARCHAR(20)", 0, null, 0], [6, "zip_code", "VARCHAR(20)", 0, null, 0], [7, "last_name", "VARCHAR(50)", 0, null, 0], [8, "email_address", "VARCHAR(50)", 0, null, 0], [9, "home_phone", "VARCHAR(20)", 0, null, 0], [10, "cell_number", "VARCHAR(20)", 0, null, 0]], "primary_keys": ["professional_id"], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "Treatments": {"columns": [[0, "treatment_id", "INTEGER", 0, null, 1], [1, "dog_id", "INTEGER", 1, null, 0], [2, "professional_id", "INTEGER", 1, null, 0], [3, "treatment_type_code", "VARCHAR(10)", 1, null, 0], [4, "date_of_treatment", "DATETIME", 0, null, 0], [5, "cost_of_treatment", "DECIMAL(19,4)", 0, null, 0]], "primary_keys": ["treatment_id"], "foreign_keys": [[0, 0, "Dogs", "dog_id", "dog_id", "NO ACTION", "NO ACTION", "NONE"], [1, 0, "Professionals", "professional_id", "professional_id", "NO ACTION", "NO ACTION", "NONE"], [2, 0, "Treatment_Types", "treatment_type_code", "treatment_type_code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}}
CREATE TABLE Breeds (
    breed_code VARCHAR(10)   PRIMARY KEY,
    breed_name VARCHAR(80),
    UNIQUE (breed_code)
);

CREATE TABLE Charges (
    charge_id INTEGER   PRIMARY KEY,
    charge_type VARCHAR(10),
    charge_amount DECIMAL(19,4)
);

CREATE TABLE Sizes (
    size_code VARCHAR(10)   PRIMARY KEY,
    size_description VARCHAR(80),
    UNIQUE (size_code)
);

CREATE TABLE Treatment_Types (
    treatment_type_code VARCHAR(10)   PRIMARY KEY,
    treatment_type_description VARCHAR(80),
    UNIQUE (treatment_type_code)
);

CREATE TABLE Owners (
    owner_id INTEGER   PRIMARY KEY,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    street VARCHAR(50),
    city VARCHAR(50),
    state VARCHAR(20),
    zip_code VARCHAR(20),
    email_address VARCHAR(50),
    home_phone VARCHAR(20),
    cell_number VARCHAR(20)
);

CREATE TABLE Dogs (
    dog_id INTEGER   PRIMARY KEY,
    owner_id INTEGER NOT NULL,
    abandoned_yn VARCHAR(1),
    breed_code VARCHAR(10) NOT NULL,
    size_code VARCHAR(10) NOT NULL,
    name VARCHAR(50),
    age VARCHAR(20),
    date_of_birth DATETIME,
    gender VARCHAR(1),
    weight VARCHAR(20),
    date_arrived DATETIME,
    date_adopted DATETIME,
    date_departed DATETIME,
    FOREIGN KEY (owner_id) REFERENCES Owners(owner_id),
    FOREIGN KEY (owner_id) REFERENCES Owners(owner_id),
    FOREIGN KEY (size_code) REFERENCES Sizes(size_code),
    FOREIGN KEY (breed_code) REFERENCES Breeds(breed_code)
);

CREATE TABLE Professionals (
    professional_id INTEGER   PRIMARY KEY,
    role_code VARCHAR(10) NOT NULL,
    first_name VARCHAR(50),
    street VARCHAR(50),
    city VARCHAR(50),
    state VARCHAR(20),
    zip_code VARCHAR(20),
    last_name VARCHAR(50),
    email_address VARCHAR(50),
    home_phone VARCHAR(20),
    cell_number VARCHAR(20)
);

CREATE TABLE Treatments (
    treatment_id INTEGER   PRIMARY KEY,
    dog_id INTEGER NOT NULL,
    professional_id INTEGER NOT NULL,
    treatment_type_code VARCHAR(10) NOT NULL,
    date_of_treatment DATETIME,
    cost_of_treatment DECIMAL(19,4),
    FOREIGN KEY (dog_id) REFERENCES Dogs(dog_id),
    FOREIGN KEY (professional_id) REFERENCES Professionals(professional_id),
    FOREIGN KEY (treatment_type_code) REFERENCES Treatment_Types(treatment_type_code)
);