When David was alive, he obeyed God. Then after he died, he was buried in the family grave, and his body decayed.