final db setup