If I wanted to save money by living in the floor above a restaurant I opened, would this be legal? A friend brought up the problem of districts (commercial, residential, etc)... would this prevent me from doing this?
Let us assume you want to open a restaurant in Baltimore, in a C4 location. The zoning table Table 10-301 indicates that you can open a restaurant there. While you cannot generally establish a residence there, you can apply for permission for Above Non-Residential Ground Floor or Live-Work residence. Live-Work is essentially "artist's loft", so not applicable. There are a few Industrial zones where a restaurant might be allowed and such a residence might be allowed ("bio-science campus"). You could check the map to get information on a specific location. If you're not in Baltimore, check that location's zoning ordinances and zoning map.