The battle is named after "trench", or khandaq, that was dug by Muslims in preparation for the battle. Salman the Persian advised Muhammad to dig a trench around the city.
This well was the only source of water in a part of Madinah, which belong a Jew who charged exorbitant amounts for water. Uthman (ra) offered to buy the well to assist the Muslims.