created relationship model, added db validation.