checking database access