Basic database query operations