add the relationship for tables in db