expanded database structure, added relationships, pivot tables