There are several differences to consider when deciding whether to purchase the D5100 or D3100. The D3100 is more of a beginner DSLR and the D5100 is just a step before the semi-pro D7000.
First the differences:
They both have:
http://nikonites.com/d5100/2498-d5100-vs-d5000.html
http://nikonites.com/d5100/2500-d5100-vs-d7000.html
http://nikonites.com/d3200/5672-nikon-d3200-vs-d5100.html
http://nikonites.com/d5100/2507-d5100-vs-d90.html
http://nikonites.com/d5200/9382-d5200-vs-d5100.html
First the differences:
They both have:
- 11 AF Points
- No in-body focus motor
- Video auto-focus
- SDXC card compability
- CLS compatibility, but no commander mode
- Plastic bodies
http://nikonites.com/d5100/2498-d5100-vs-d5000.html
http://nikonites.com/d5100/2500-d5100-vs-d7000.html
http://nikonites.com/d3200/5672-nikon-d3200-vs-d5100.html
http://nikonites.com/d5100/2507-d5100-vs-d90.html
http://nikonites.com/d5200/9382-d5200-vs-d5100.html