You cant. It's like asking how do you prevent car crashes. You can only make it tougher and that would take a combination of the three things mentioned.
Yup one point access so when a fire breaks out there's thousands of children being burnt to death instead right? Jesus Christ why is America so fucking stupid?
1) Place police sub-stations in or very near schools. They would be autonomous to the school as to not to portray a police state, but can be "at ready" to assist should emergency or need to intervene arises.
2) One-Point Entry or if due to size of school not logistically practical, limited access but definite 100% I.D. Card check for all, students, administrators, teachers, aides, coaches, other employees, etc. Anyone student using or assisting another student in using a different door for entry will be suspended. Employees can be suspended or terminated. NO EXCEPTIONS. Many corporations work this way (security guards posted at all times near outdoor break/smoking areas, entry areas/gates), schools should operate same way. If you walk outside and I.D. Card blows away or a wayward crow snatches it out of your hands, too bad-so sad. Apply for a new one and you do not enter until one is in your possession.
3) If suspended, no longer attending (Drop-out), or not employed. I.D. Card must be returned to school administrator. Once suspension is over, I.D. Card will be returned to student. Anyone with an invalid I.D. should be prosecuted for carrying an invalid state I.D. Card.
4) There are many laws on books regarding firearm crimes. Prosecute accordingly. If a felon has a gun...jail. If current local and federal laws were accordingly enforced, additional laws or limiting law abiding citizen rights would not be needed.