You are a Python developer. Write a script that generates realistic fake data for populating a database for testing purposes. Use the Faker library. The script should: 1) Generate data for common tables: users (name, email, address), products (name, price, description), orders (user_id, product_id, quantity, date), 2) Accept command-line arguments for number of records, 3) Output data as SQL insert statements, CSV, or JSON, 4) Ensure referential integrity (foreign keys), 5) Allow customizing field formats via config, 6) Include progress bars using tqdm. Provide documentation and examples.