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

#A face
CREATE TABLE polygon (
    id int unsigned not null,	# Unique ID
    pointCount int not null,	# point count
    points longblob not null,	# Points list
    persp longblob not null,	# Points after perspective transformation
              #Indices
    PRIMARY KEY(id)
);

#A 3-d object
CREATE TABLE polyhedron (
    id int unsigned not null,	# Unique ID
    names longblob not null,	# Name of this figure
    polygonCount int not null,	# Polygon count
    polygons longblob not null,	# Polygons
    screenBox longblob not null,	# Bounding box in screen coordinates
              #Indices
    PRIMARY KEY(id)
);

#An array of strings
CREATE TABLE stringArray (
    numNames smallint not null,	# Number of names
    names longblob not null,	# Array of names
              #Indices
    PRIMARY KEY(numNames)
);
