- use unique keys
- before insert triggers in the MySQL
- write a program, maybe PHP, to perform Pre-Insert tasks
- maybe more
In one migration project from a Tailored Oracle Accounting System to SAP, I had done the insert using PRO*C programs for the export (where there were possible checks) and the Impor Utility of SAP).