The right to defend one's self was so obvious and natural that the founders saw no need to state it in the constitution. Perhaps they thought it was implicit in "The Bill of Rights". I certainly think it is. Don't you?
What could have prevented this tragedy?
The police response could not have been better. But it was not enough.
Profiling and locking up all potential attackers would probably still miss some and wrongfully violate the rights of many who never would have hurt anyone. It would not be enough.
How about banning the sale of all guns and ammunition and collecting all of the registered guns in the entire country? It would not be enough.
Collect all of the guns and all of the ammunition in the entire country. Welcome to the police state, it still would not be enough.
Encouraging responsible adults to have the training and tools to defend themselves might not have prevented it either but probably could have stopped it sooner.