First and foremost thing take a backup of the existing rpm database( yes the corrupted one...you never know...).This is located in /var/lib/rpm ..depend on your distribution.
Now go to that dir(/var/lib) and take a backup of entire rpm dir ..like this:
tar -cvzf rpm-date.tar.gz rpm
And finally start rebuilding the rpm database like this:
rm -f __db* # delete it if present
rpm --rebuilddb -vv
Now once the above command finished work..other related thing should start working i.e
yum install anypackage
rpm -qi packagename
Don't forget to check the system log file in case it spitting put other msg.
Hope this will help.