database integrity checker