Well, the second one is definitely the better of the two, in my opinion, but we don't have all of the information.
Do you know the maximum RAM capacity? Sure, it has 4GB now, but what is its max? A max of 8GB is desirable.
I assume that the processor is a Pentium D. As far as I am aware, the only dual-core Pentium processors were Pentium Ds. They're pretty old, but they still do a decent job. I would recommend upgrading to one of the new Intel processors in the near future.
You probably will NOT need 1TB of storage, but hey, why not. Hard disk storage is so cheap nowadays.
I am personally a fan of the ATI Radeon HD series, but a GT520 is no joke either, so I don't think that you will have any issues there.
Basically, you want to make sure that your PC is upgradable in the next 2-4 years. If it isn't, then it isn't worth buying.