Water pumps are told to start and stop by both mechanical and electronic switches. Which one you decide to incorporate into your pumping system depends on what you value most: accuracy or reliability.
Water pumping systems either pump potable water for consumption or sewage (spoiled) water for removal. Measuring these pump systems can be done in multiple ways.
Potable Water System Measurement
For a pressure-oriented potable water system, pressure levels needed to start and stop pumps. This can be done with either a mechanical type pressure switch or an electronic transducer. The mechanical pressure switch is more reliable but the transducer type is more accurate.
Sewage Water System Measurement
For a sewage system, liquid level is measured, not pressure. Liquid level can be measured mechanically (with float switches) or digitally (with either an ultrasonic transducer or a submersible transducer). The submersible type transducer is easier to set up but it can not work with high temperatures or caustic liquids (such as in a processing plant). An ultrasonic transducer can work with hot and caustic liquids and would be a better choice. Another style of measurement is using metal probes. These probe systems can only be used with conductive type liquids and are not easily adjustable. Again the mechanical type sensors result in water pumping reliability. The digital types are more accurate but not as reliable. It's a trade-off depending on your application.