set up core data entities, attributes and relationships