Listing 1: Create the database 
CREATE DATABASE lisa;
USE lisa;

CREATE TABLE doc ( 
	id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
	url CHAR(255),
	title CHAR(255),
	UNIQUE (url)
	);
ALTER TABLE doc ADD INDEX (id);
ALTER TABLE doc ADD INDEX (url);

CREATE TABLE word ( 
	id INT NOT NULL,
	word CHAR(255) NOT NULL,
	position INT
	);
ALTER TABLE word ADD INDEX (id);
ALTER TABLE word ADD INDEX (word);
ALTER TABLE word ADD INDEX (position);

CREATE TABLE spider ( 
	url CHAR(255),
	status CHAR(255)
	);
ALTER TABLE spider ADD INDEX (url);
ALTER TABLE spider ADD INDEX (status);
