This tutorial is more for digital guys who usually control things with microcontrollers and other digital circuits. Simple motors, relays, LEDs cannot be connected directly to microcontroller pins because they require more current that I/O can provide and in another hand this isn’t a safe way to do so. Take a look at this excellent video tutorial on how to use the simplest PNP transistor properly when controlling electromagnetic air-valve.
Probably you’ve done tons of similar circuits with same relays. What you usually do is connect about 1k resistor the transistor base circuit, and things work just great. But if you want to understand how actually transistor currents depend on each other and how to select proper transistor and right base current limiting resistor spend some time and make things clear. Completing this you will be able to build safer and energy efficient circuits. [via]