I need a clean, well-commented Python script that takes over a repetitive data-entry task I currently perform by hand. All information ultimately lives in a database, so the script should connect directly to it, accept new records from a structured source I can easily update (CSV or JSON is fine), validate each row, then insert or update as needed with clear success/error feedback in the console or a simple log file. Please rely on standard Python 3.x plus the appropriate connector (e.g., psycopg2, mysql-connector, or similar) and keep external dependencies minimal. Once written, I’d like a brief README explaining setup, required libraries, and how to change connection strings or field mappings so I can maintain it myself. Acceptance will be straightforward: I run the script against a small sample file, see the rows appear correctly in the live database without duplicates, and review the log for any rejects. Let me know how soon you can start and what you need from my side (schema, sample data, credentials) to get moving.