adjust database structure