update build_db.py script