You can cover all the main attractions of Dubai in 5 days. Here is a suggested plan for your Dubai trip in 5 days, giving a good mix of leisure and sightseeing:
Day 1: Arrive in Dubai by flight; relax and go for a Dhow Cruise with Dinner in the evening.
Day 2: Morning city tour of Dubai and shopping at Dragon Mart; evening Desert safari with BBQ dinner.
Day 3: Visit the Burj Khalifa's 124th Floor, followed by the Dubai Aquarium and Underwater Zoo.
Day 4: Tour of Ferrari World and Abu Dhabi.
Day 5: Morning shopping and leave for the airport!