Updated insertion method. Utilizes a base list of page_ids to update database