yea altimas can easily be had for 7k...for fairly new ones too. as for a mazda, i would honestly not go that direction. My family owns a Mazda MPV. The dark car depreciated about $10,000 the first year we had it. Not only that, but the first few years we had it, we always had a bunch of annoying problems.... air filter, steering wheel....all kinds of stuff that you would normally see wear out after about a decade of service. the transmission also died at around 60,000 miles. My aunt had the same car we did, except her car died out on her around 50,000 miles. I've heard of some other problems with mazda's and would honestly avoid them if possible. Maybe their newer cars have fixed all these problems, but be WARNED!!
There's many good cars to be had for 7k, but it just depends on what you value more. You've got a a 4 door picked out so thats good. A corolla is a great car with a great reputational standing (i would personally pick the corolla over the altima). You can get a fairly new one too. But if you'd like to have more power, maybe a camry would be better. It just depends on what you'd like. There are many good cars to be found for $7,000, but you just have be patient and you have to KNOW EXACTLY what you want.