They are like a man who dug deep into the ground to prepare to build his house. He made sure that the foundation was on solid ground. Then when there was a flood, the water tried to wash away the house. But the river could not shake the house, because it was built {he built it} on a solid foundation.