delete, insert and update pages into DB