9mm (or just about any decent defensive handgun round) can and will overpenetrate a typical modern construction home. Check out http://www.theboxotruth.com/
To the original post - absolutely no way on the rifle. Those could shoot clear through into the neighbor's house even after hitting the inteded target.
That being said, I keep my 1911 ready to go. It's easier to keep secure yet ready to use. My wife got me an 870 tactical shotgun for my birthday which I would like to be my main house gun, but I am not confortable just putting it under the bed with kids in the house. My kids (7 and 4) both know the rules about guns but I can't necessarily trust any of their friends not to touch it if they found it.
As for preventive measures, I don't have an alarm, but I do have a noisy, black, 110lb lab/rotty/newfie mix. She barks before anyone even has a chance to ring the bell. My friends know this and therefore do not ring, they just weight for me to answer. When the doorbell does ring, I know it's a stranger. Also, the dog leaving her half eaten cattle thigh bone outside the backdoor is probably a good deterrent for anyone approaching from the rear.