added postgres gem and updated database.yml file, added relationships to the models