Dubai is a city but it is also an Emirate. There are (I think) 7 Emirates in the UAE). An Emirate is a small state with an Emir as ruler. The UAE is a federation of such states. I think the Emirates are Abu Dhabi, Dubai, Fujairah, Ras al Khaimah, Ajman, Umm al Qaiwain, Sharjah.
Basically, the really oil rich emirate is Abu Dhabi. Dubai's oil is going to run out quite soon (less than 10-20 years) hence all the frantic diversification to ensure there are other sources of revenue before the oil runs out.
Also note, the Emirate of Dubai is not that much bigger than the city of Dubai whereas the Emirate of Abu Dhabi is much MUCH bigger than the city of Abu Dhabi. Fortunately also for Abu Dhabi, there is A LOT of oil in its territory.
Hey, it's friday afternoon...enough of the geography lesson.