Scraping multiple page and insert to database

I have a problem with collecting some elements on over 1000 web pages, and uploading to Database.
I’m not sure, but I think the collected data is too much, and therefore I need to upload to DB, in batches.

I know how to browse all the pages by clicking on the “next page”, but I don’t know how to upload to the DB in batches of 1000 rows at a time. (for example).

Can anyone help me with this?

Maybe you can create a temporary excel file for each web page you scraped and then instead of db batch upload, you merge those excel files and then do a one time db upload.