# doc.sql was originally generated by the autoSql program, which also 
# generated doc.c and doc.h.  This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly 
# automatic way.

#A simple address book
CREATE TABLE addressBook (
    name varchar(255) not null,	# Name - first or last or both, we don't care
    address varchar(255) not null,	# Street address
    city varchar(255) not null,	# City
    zipCode int unsigned not null,	# A zip code is always positive, so can be unsigned
    state char(2) not null,	# Just store the abbreviation for the state
              #Indices
    PRIMARY KEY(name)
);

#example of enum and set symbolic columns
CREATE TABLE symbolCols (
    id int not null,	# unique id
    sex enum("male", "female")  not null,	# enumerated column
    skills set("cProg", "javaProg", "pythonProg", "awkProg")  not null,	# set column
              #Indices
    PRIMARY KEY(id)
);
