Setup
use DBI;
my $DBH = DBI::connect('dbi:pg', 'dbi_user', 'dbi_password);
my $nominee_search = $DBH->prepare(
'SELECT id FROM nomination WHERE year = ? and type = ?'
);
my $voter_count = $DBH->prepare(
'SELECT voter_id, nomination_id FROM vote WHERE nomination_id = ?'
);
my $update_winner = $DBH->prepare(
'UPDATE nominations SET takes_the_oscar = ? WHERE id = ?'
);