Ensuring db structure