Storing Scraped Data in PHP: CSV, JSON, and Database

When to use CSV, JSON Lines, or SQLite with upserts. Three patterns for different pipelines, each with working PHP code