close database connection