CREATE TABLE photo (
    id integer not null auto_increment primary key,
    title varchar(255),
    uploader integer,
    uploaded datetime,
    x integer,
    y integer
);

CREATE TABLE comment (
    id integer not null auto_increment primary key,
    name varchar(255),
    content text,
    photo integer
);

CREATE TABLE user (
    id integer not null auto_increment primary key,
    name varchar(255),
    password varchar(255)
);

CREATE TABLE tag (
    id integer not null auto_increment primary key,
    name varchar(255)
);

CREATE TABLE tagging (
    id integer not null auto_increment primary key,
    tag integer,
    photo integer
);

CREATE TABLE album (
    id integer not null auto_increment primary key,
    name varchar(255),
    user integer,
    privacy integer
);

CREATE TABLE album_entry (
    id integer not null auto_increment primary key,
    album integer,
    photo integer
);

CREATE TABLE system_tag (
    id integer not null auto_increment primary key,
    name varchar(255)
);

CREATE TABLE system_tagging (
    id integer not null auto_increment primary key,
    tag integer,
    photo integer
);


