Added function for addition a record to the database