Updated database structure according to latest discussion.