checking if db exists