Implemented method for inserting records into database