How do you ensure data integrity when merging datasets from different sources?
Using the provided student datasets, write a SQL query that compares records by student_id, preserves values from both sources, and classifies each record based on whether the data is consistent, conflicting, or present in only one source.
integrity_status.student_id ascending.| Column | Type | Description |
|---|---|---|
| student_idPK | INT | Student identifier from source A |
| full_name | VARCHAR(150) | Student full name from source A |
| VARCHAR(255) | Student email address from source A | |
| program | VARCHAR(120) | Academic program from source A |
| Column | Type | Description |
|---|---|---|
| student_idPK | INT | Student identifier from source B |
| full_name | VARCHAR(150) | Student full name from source B |
| VARCHAR(255) | Student email address from source B | |
| program | VARCHAR(120) | Academic program from source B |