Hi,
I had the same question and ran across an answer related to something else. If you go to this link
http://www.kpsec.freeuk.com/trancirc.htm and scroll down to where it says using a transistor as a switch, it also talks about using a relay and placing a diode across the coil to avoid the high voltage spike when the power turns off to the relay coil. Hope this helps.
JD