Added the relationships to the database