Creates and checks if a database exists