This might help:
http://www.kenrockwell.com/nikon/d40.htmI havent even seen the Sony but the D40 is compact, light and v easy to use. Ive had one for 2 years and 4000 frames. I got one for the gf in Oct for £220 but the euro strength has pushed it up recently. It might get replaced soon as its been made for more than 2 years now, and the big 2 are turning over product cycles more quickly than that.