Set up relationships in the database

May still need to change some of the datatypes