Updated database: included relation between Histories and Accounts