There are two sides to this: 1) The shooter, and normally one would hope that he or she would be deterred by either conscience or consequence. It clearly appears from the number of incidents of these school shootings that conscience is non existent and they seem willing to lose their lives, so neither is consequence.
2) You are therefore left with hardening the target, and that means both access and response. I doubt if these agressors are shot whilst attempting an attack that it will deter others, it just means they won't get to kill anyone before they are taken out.
From what I've heard of this kid, you wouldn't want him ANYWHERE in public let alone an elementary school. Nature or nurture I cannot tell you which played a larger role, but the nurture part definitely wasn't on his side. A broken home with no responsible adults to keep him in check. Peers did nothing so there goes the idea of red flag laws. Even if they did, our do gooders would do everything in their power to keep him from being locked up which has always been a major contradiction as I see it. To top it all off, the last line of defense seems to have failed in epic proportions. I'll save full judgement for now but it sure as hell doesn't look good. If it is as appears, I can't see how they live with themselves, nor can I imagine the wrath I would unleash as one of the parents.