Well in my area, Springfield Missouri, the city comes in and puts backflow preventers in to prevent this from happening. You yourself need to put a backflow preventer in either outside of the foundation or in the basement itself to prevent drainage from coming in the wrong way.