The Nikon D90 has a focus motor, the D5100 does not.
The old lenses made for a SLR film cameras and full frame DSLR cameras don't have a focus motor built into the lens. All lenses built for the half frame DSLR cameras have focus motors inside the lens.
Here is a comparison of specifications for the two cameras:
http://snapsort.com/compare/Nikon-D5100-vs-Nikon_D90
..
I have used Canon DSLRs for my past years of photography and am considering switching to Nikon before I get serious.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic