Listing 1. Table Creation Code

CREATE TABLE ATFThreads (
 id SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
 subject VARCHAR(255) NOT NULL,
 author VARCHAR(60) NOT NULL,
 email VARCHAR(60) NOT NULL,
 text TEXT NOT NULL,
 date DATETIME NOT NULL,
 UNIQUE(subject)
 );

 CREATE TABLE ATFMessages (
 id MEDIUMINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
 thread SMALLINT UNSIGNED NOT NULL,
 subject VARCHAR(60) NOT NULL DEFAULT "No
 subject",
 date DATETIME NOT NULL,
 author VARCHAR(60) NOT NULL DEFAULT "Mr. Nobody",
 email VARCHAR(60) NOT NULL DEFAULT "atf@lerner.co.il",
 text TEXT NOT NULL
 );