set up general relationships and start to move model to database