Update db.py

include mapping to be used in insert