Weapons, and especially guns, are like security blankets. In real life, they serve only one purpose, which is to give people a false sense of security.
Why? Because it is extremely unlikely, even if you are attacked, you will be able to utilize your gun (or rifle, or uzi, or M3 carbine, or M777 howitzer). Most crimes are committed between familiars, people who know each other. Most others are committed with surprise, acting when a person is not ready, or incapable of responding.
Criminals who have the intent to do you harm are most likely not going to give you the chance to dig in your dresser drawer, disengage the trigger lock, load the cartridge (seriously bad idea if it is already loaded), switch off the safety, cock, aim, and fire.
Oops, you just shot your wife...