added database relationships and classes