Arduino 5V output - Switch a device on/off with relay

Hello,

Initially I was going to use the reed relay, but I happen to have a npn 3904 transistor, so I am going to give that a try. I will have a digital pin connected to the base. I can figure out the resistor needed to give me enough current Ib, to allow the current needed for the load(camera) Ic. I will put 5V to load(camera) to the collector of the transistor. I have seen some people online putting a diode(flyback) in parallel to the load to eliminate excess voltage. I understand that this is to protect against a voltage spike at the collector of the transistor. I probably don't need this in this case because this device will not build up a charge, but I am curious as how the value of the diode is determined if I decided to add. Also, in some instances online I have seen where a resistor placed between the load and the collector, why? If it requires too much explaining, could you point me to a reference to learn about this?

Thanks,

-ren