CREATE TABLE IF NOT EXISTS customers (
    id INTEGER NOT NULL AUTO_INCREMENT,
    firstName VARCHAR(30) NOT NULL,
    lastName VARCHAR(30) NOT NULL,
    address VARCHAR(100) NOT NULL,
    city VARCHAR(100) NOT NULL,
    state CHAR(2) NOT NULL,
    zip INTEGER(5) UNSIGNED NOT NULL,
    email VARCHAR(100) NOT NULL,
    PRIMARY KEY (id)
    );

CREATE TABLE IF NOT EXISTS products (
    id INTEGER NOT NULL AUTO_INCREMENT,
    title VARCHAR(1000) NOT NULL,
    description VARCHAR(1000) NOT NULL,
    price DECIMAL(5,2) UNSIGNED NOT NULL,
    PRIMARY KEY (id)
    );

CREATE TABLE IF NOT EXISTS orders (
    id INTEGER NOT NULL AUTO_INCREMENT,
    cid INTEGER NOT NULL,
    amount DECIMAL(5,2) UNSIGNED NOT NULL,
    dt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id),
	FOREIGN KEY (cid) REFERENCES customers(id)
    );
