Sets up databases