working on database structure