Update database_tools.py

forgot to import math, needed for the Gap check part