Implemented Foreign Keys

Modified SQl statements in releases.php to utilize foreign keys put in
in place.