CREATE TABLE kwote ( id INTEGER AUTO_INCREMENT, submit_dt DATETIME, content TEXT, rating INT, ip_address VARCHAR(15), PRIMARY KEY(id) ); CREATE TABLE kwote_backup ( id INTEGER AUTO_INCREMENT, submit_dt DATETIME, content TEXT, rating INT, ip_address VARCHAR(15), PRIMARY KEY(id) ); CREATE TABLE vote ( id INT AUTO_INCREMENT, ip_address VARCHAR(15), kwote_id INT, vote_dt DATETIME, PRIMARY KEY(id), FOREIGN KEY(kwote_id) REFERENCES kwote(id) );