Method to create a new entry in the database