Added function insert_into_db

(Not tested yet)