How make camera rotate on a rotating object

I have a camera rotate on the Earth in space game.

The effect I want is to set camera’s parent to the Earth, then rotate the earth.

However it looks bad because Earth can self rotate. Then I make the earth rotating, and the problem come out. The camera view become very confusing, i.e. pressing left button do not really make the camera view rotate on the Earth horizontally anymore.

I think the Earth rotating pivot mess everything, because of its self rotating and also rotate around sun.

A camera need to look at this double rotating object.

In case people goggles this, my solution:

Make the earth parent, attach a camera dummy on it, and then attach the camera on the dummy.

You just need to rotate the dummy when player press button to change view. The earth can rotate around Sun, and self rotate.