updated database structure