\connect - sam
CREATE SEQUENCE "seq_doc" start 0 increment 1 maxvalue 2000000000 minvalue 0  cache 1 ;
CREATE SEQUENCE "seq_word" start 0 increment 1 maxvalue 2000000000 minvalue 0  cache 1 ;
CREATE TABLE "word" (
	"word" character varying(64) NOT NULL,
	"word_id" int4 NOT NULL);
CREATE TABLE "doc" (
	"doc_id" int4 NOT NULL,
	"ri" character varying(1024) NOT NULL,
	"title" character varying(256),
	"n_words" int4 NOT NULL,
	"n_chars" int4 NOT NULL);
CREATE TABLE "ref" (
	"word_id" int4 NOT NULL,
	"doc_id" int4 NOT NULL,
	"pos" int4 NOT NULL,
	"titlecaps" bool);
CREATE UNIQUE INDEX "word_pkey" on "word" using btree ( "word" "varchar_ops" );
CREATE UNIQUE INDEX "doc_pkey" on "doc" using btree ( "doc_id" "int4_ops" );
CREATE  INDEX "ref_word_id" on "ref" using btree ( "word_id" "int4_ops" );
