Lots to consider here. I was in a similar situation, interested in guns for self-defense and home defense. I also had a teen and a small child in the house. Here's what I did:
1. Tested. I rented guns and tried them out. I shot .22, .380, 9mm, .40 and .45...ok and a .50 cal. I tried pocket, sub-compact, compact and full frame from most of the major manufacturers. Some pistols that I liked on paper did not feel good in my hand. Others surprised me. My favorite small guns were from Sig Sauer and overall the Glock was the best to shoot, hands-down. I also liked options from Beretta very much.
2. Planned. I needed to guarantee that no kid would EVER access or fire any gun of mine. So I researched and invested in a quality firearm safe and wrote down and refined my safety and storage protocols. You have to defeat 3 layers of security to get to my gun, and once in the safe, you have to insert the magazine, chamber a round, turn off the safety and make a dedicated pull on the trigger.
3. Prepared. I considered heavily if I would be ready to take a life to protect myself or my family. This is not a step to skip over or take lightly. I considered all less-than-lethal options, read the legal implications in my state, and did some soul-searching. I also discussed it with my wife...she is not a gun person and made the decision that she did not want to use it. This is important, if she isn't comfortable with it she should be in the same category as the kids. When I was comfortable with my decision, I too the next step.
4. Purchased. Soapbox: I think it should be a law that you can't buy a gun without proof of having a safe and knowing how to use it if you have kids. I went with a Beretta PX4 Storm SubCompact in .40 cal. The reasons are many, but I wanted a mechanical safety, take-down power, compact size and a great fit to my hand. Its an amazing weapon in all of its sizes, I highly recommend it.
5. Trained. I took a handgun safety course through the NRA, I took a concealed carry course and got my concealed carry permit, and I went to the range. (And I still go to the range on a regular basis.) Having a loaded and ready-to-fire gun in the bedside table would be fast, but that doesn't work with little ones. So I trained and can confidently insert a mag, rack the slide, and flip off the safety while half-asleep in the dark. I can also get to and open the gun safe in a few seconds, even though it is out of sight and out of reach of the kids and locked up tight.
This may sound like a lot, but to me, guns are no joke. I also revisit my safety protocols from time to time. My teen is off at college and my baby is now a little kid, so I have to update things to keep pace. I will change them again when he is a precocious teen. I also had to revise them when I added a second gun, a Taurus Curve that is a GREAT every day concealed carry FWIW.
As for the shotgun vs pistol vs revolver debate, I felt that even a combat-length shotgun would be too unwieldy in the tight confines of my home and they require a much larger gun safe. I also wanted to go to the range and shoot as a hobby, so I wanted a magazine. I did like the idea of scattershot and a bit less lethality of say, a 410 round. I did test something that I thought might be a good compromise, the Taurus Judge. Reliability and ease of use of a revolver with the point and shoot simplicity of a shotgun.