Create chkdb.sh

check database consistency using query