If I have an old hard drive and assume it has an MBR virus. If I install it on my computer using a SATA cable as the D drive to store data, will my system drive (C drive) be affected by the MBR virus?
An MBR virus needs to be executed to become active. If this second drive is not a system boot drive, this will never happen and you're safe. MBR is executed [on boot] only if the disk is the default boot device in the system.
Out of an abundance of precaution I'd still recommend checking the entire drive using a strong antivirus of your choice.
You could consult with www.av-comparatives.org which publishes great overviews of AVs.