To add to what Christopher said about families on starships, I also don't think that they're all that dangerous places to be. If space were nearly as dangerous as it is for our heroes every week, we would't send people out there like that. Especially not the same people who would be half insane by the end of their first year out. It'd all be drones and whatnot - for exploration, battle, what have you. I think you have to take it all with a grain of reset-button salt. I doubt most starships ever once find themselves in a real phaser fight in mostly empty boring space. And when war comes around, you can bet all that extra space on starships become troop quarters and materiel storage.