design the db structure