Sort of correct, yes "the outer part (that the wheel bolts to) is the hub (has the bearing inside)"
I wouldn't say there is an inner part at all, the hub is the hub, it's one thing/piece. The rotor is a rotor, it bolts to the hub.
For the 5/10 lug.
The 8 lug is even simpler, the hub and rotor are cast as one piece, bearings are fit in it. In other words the hub/rotor is one single thing, nothing bolted together.