Chnaged database structure