I was trying to update my yum using: yum update but was getting an error saying that rpm db is failed, but I have fixed up that thing in the following steps.
Step 1: clean the yum
yum clean all
Step 2: removing all rpm db from /var/lib/rpm
rm -fr /var/lib/rpm/__db*
Step 3: Now update the yum