setup db structure