Explain how a MERGE statement works in SQL, how primary and foreign keys differ, and how you would migrate large data safely.
Use the tables below as the reference schema for your answer. Keep the response focused on the SQL behavior, key constraints, and a safe migration approach.
merge_behavior, key_difference, and safe_migration_plan.merge_behavior should summarize when rows are inserted, updated, or left unchanged.key_difference should summarize how primary keys and foreign keys enforce different integrity rules.safe_migration_plan should summarize a safe approach for moving large data with minimal risk and downtime.| Column | Type | Description |
|---|---|---|
| row_idPK | INT | Source row identifier |
| business_key | VARCHAR(50) | Natural key used to match rows |
| payload | VARCHAR(100) | Example source value |
| Column | Type | Description |
|---|---|---|
| row_idPK | INT | Target row identifier |
| business_key | VARCHAR(50) | Natural key used to match rows |
| payload | VARCHAR(100) | Example target value |