Parents trust schools to keep students safe every day as they learn and enrich their lives through education.

While schools are generally considered a safe haven, there are times where campuses can turn into a dangerous and terrifying place. The Columbine High School shootings in 1999 shocked the nation and opened the floodgates to other tragic school shootings that have occurred over the years in the U.S.

The most recent of these horrific events involved a former student who opened fire at a south Florida high school Wednesday, killing 17 people and injuring 14 others.

The gunman, 19-year-old Nikolas Cruz, was a former student at Marjory Stoneman Douglas High School but did not graduate, authorities said.

He was arrested a short distance from the high school without incident, according to officials.

Because of the spontaneous nature of school shootings, campuses must be prepared to react effectively at any time.

California law mandates all schools have a comprehensive safety plan that coordinates with first responders and local law enforcement agencies in response to potential violence on campus. The law requires schools to carry out safety drills, including a minimum number of fire drills as instructed by the California Education Code and at least one lockdown drill. Other evacuation drills are also practiced in addition to lockdown and fire drills.

A school lockdown is typically the response to an active shooter on campus. When a school is on lockdown, the conditions inside the buildings are considered to be safer than outside buildings. Doors are locked, blinds are shut, lights are turned off and students, staff and faculty are instructed to shelter away from windows and doors.

ABC10 reached out to school districts in the Greater Sacramento region to find out how local schools prepare in the event of an active shooter.

All campuses in the Davis Joint Unified School District (DJUSD) have numerous access points and many are next to city parks and other city property. Davis school campuses do not use fences and generally have floor plans where hallways are out in open air and not inside buildings.

The way the campuses are designed makes it very easy for anyone to walk into the schools.

Maria Clayton, spokesperson for the DJUSD, told ABC10, school safety is reviewed "all the time".

The district follows drill procedures and recently started including communication drills, where parents and students learn what communication would look like during an emergency. In 2015, DJUSD was authorized for a school safety audit-- a district-wide safety evaluation, according to Clayton.

Auditors visited every school campus to check out safety plans and spoke with employees and parents to determine where safety improvements were needed. The district received many recommendations and are currently working to make some changes.

"We're specifically looking at signage to make sure people know where the office is to check in." Clayton said.

DJUSD also recently rolled out a program that scans names upon check-in against a sexual predator database, according to Clayton.

Over the years, Davis campuses have added safety changes, such as making sure doors lock from the inside and that blinds are working properly in case of a lockdown. The DJUSD has no plans to put fences around the schools or to add sensors to campuses, Clayton said.

"We balance what's best for our schools," she said.

The district does have a school resource officer, an officer from the Davis Police Department who works with the schools on safety and security measures.

Clayton said safety is an "ongoing conversation".

Like the Davis school district, the Sacramento City Unified School District (SCUSD) also follows safety drill requirements including lockdown drills.

The district has eight school resource officers to assist and monitor school safety plans, according to Alex Barrios, spokesperson for SCUSD) .The unit is led by a retired law enforcement officer.

SCUSD has schools that are enclosed and schools that have a more open floor plan such as the campuses in Davis.

"Every school has a safety plan that is designed specifically for their school," Barrios said.

Safety drills serve to remind everyone on campus what their role is during an emergency situation, Barrios explained.

Barrios said, schools take special precautions to guard specific safety plans to make sure the wrong person doesn't have access to emergency details.

"We wouldn't want our plans to be used against us," Barrios said.

All campuses in the Elk Grove Unified School are secured with fencing, according to Xanthi Pinkerton, spokesperson with EGUSD.

"Our campus supervisors receive bi-annual and monthly safety training." Pinkerton said in an email to ABC10. "Each school annually submits their safety plans for approval by the Board of Education before they go to the state. Those school safety plans include the year’s safety drill schedule for that school. Drills include lockdown or shelter in place safety drills as well as evacuation or relocation safety drills."

EGUSD works with first responders and other agencies to provide mass casualty and response training, according to Pinkerton.

"When incidents like that happen, we review our safety protocols and procedures," Pinkerton said.