changed insertion to db for vector table