cleanup database access