add connection to DB and adding record to table