setting up data model associations and views