The difference is motive. The terrorist motive is political. The other is personal.
The bottom line is an individual or multiple persons entering a school with weapons with the intent to kill children and/or adults.
The question is what is the best way to prevent the killers from choosing a school for their purpose?
Generally both the terrorist and the other intend or fully expect that they will die in their efforts to kill or in their choice of target they will not be dissuaded by the threat of death but they maybe dissuaded if they believe they may die before achieving their goal.
So in my opinion a single armed guard is not the answer. As with the local police when seconds count they are only minutes away.
The answer is armed teachers and administrators. They are always there when the students are in the school. It does not have to be all teachers but a sizable number so that killers can be reasonably certain that they will kill very few before they are cut down.
I have posted before that along with what you propose I would add a surrounding network of sirens. ALL personnel would have a remote device to sound an alert if any suspicious person or activity was noticed.This might an abused system but it is for the schools to provide responsible employees. I also believe that such a system would be ‘unnerving’ to/for a deranged person who is thinking that they have the surprise element of their intentions under their control.