The correct relation between joule and erg is:
Joule and erg both are units of work done. An erg is the amount of work done by applying a force of one dyne for a distance of one centimeter. In the CGS base units, it will be one gram centimeter-squared per second-squared. Whereas joule is the amount of work done by applying a force of one newton for a distance of one meter.
Thus,
1joule=1newton×1m
1joule=1kg×1m1s2×1m
1J=1000g×100cm1s2×100cm
1J=107 erg
Thus option D is correct.