In most areas, the building code provides the scope of where and when smoke detectors are to be installed.
The International Building Code has been adopted in most parts of this country.
First, what about the entire fire alarm system?
907.2.2 requires a manual fire alarm system (pull stations) to be installed in business occupancies (offices) having an occupancy of 500 or more. 907.2.7 requires the same of merchantile occupancies (stores).
907.2.9 requires a manual fire alarm system in apartment buildings where any dwelling unit is located 3 or more stories above the exit discharge, where any dwelling unit is more than one story below the exit discharge, or where the building contains more than 16 dwelling units.
If the building is equipped with an automatic sprinkler system with an alarm hookup to the notification appliances (bells, strobes, and horns) then, only one pull station is required at a location determined by the fire marshal.
Now, to get to your question: smoke detectors.
907.2.10 requires apartment buildings to have smoke detectors installed: 1) On the ceiling or wall outside of each separate sleeping area in the immediate vicinity of the bedrooms. 2) In each room used for sleeping purposes. 3) In each story within a dwelling unit, including basements, but not including crawl spaces or uninhabitable attics.
Because you have a mixed use occupancy building, you must meet the requirements of the code for all occupancies in the entire building. Pay close attention to the break-up of the apartments from the business. You may have to install smoke detectors in the basement if it is considered part of the apartment. Access to the basement may or may not constitute the basement being part of that dwelling unit. If you can't determine it, ask your local building official.
Smoke detectors must be fed from the building power supply, and have a battery back-up. Smoke detectors within each dwelling unit must be interconnected so all will alarm if any detects smoke.
The installation of smoke detectors shall also comply with the household fire-warning provisions of NFPA 72.
Assuming your building is too small to require pull stations, the upstairs apartments only require smoke detectors in the usual locations.