

create table statements (
        id serial primary key,
        person integer not null,
        short varchar(64) not null,
        long text not null,
        unique(person),
        foreign key(person) references persons(id) on delete cascade on update cascade
);

create table votes (
        id serial primary key,
        voter integer not null,
        candidate integer not null,
        unique(voter, candidate),
        foreign key(voter) references persons(id) on delete cascade on update cascade,
        foreign key(candidate) references persons(id) on delete cascade on update cascade
);

drop view if exists results;
