remove some unnecessary variables
if database is not exist then create it