SOST10031 Chap.5 Databases and Data Linkage
Databases and Data Linkage
Databases and Data Linkage brings together the two teaching files that the module has so far used separately. The GII file records measured outcomes for countries and territories, while the GSNI extract summarises reported attitudes from one survey wave, and linking them makes it possible to ask whether the two kinds of evidence line up across countries.
The chapter treats the join as something to audit rather than a single command. Country names must be compared before matching, because a different spelling silently drops a country.
After the join, counting matched and unmatched rows exposes what happened, and every gap is then classified: a failed match is a naming problem you can repair, a missing indicator value is a property of the data you report, and a country present in only one file cannot be paired at all.
The chapter also explains why the surviving group of countries shapes the conclusion, why values from different periods require careful wording, and why a country-level association says nothing about individual people or about cause.
What this chapter covers
- 01
Linking the GII and GSNI teaching files by country
- 02
Checking country names before a join
- 03
Counting matched and unmatched rows
- 04
Failed match versus missing indicator value
- 05
Which countries form a complete pair
- 06
Different reference periods in linked data
- 07
Country-level association without causal claims
Worked example · free
Count the complete pairs where two country files overlap
- 1Join on country: Sa, Ti and Ul appear in both files, so three rows match.
- 1Check values in the matched rows: Sa, Ti and Ul each hold both values, giving three complete pairs.
- 1Ro and Ve appear only in the outcomes file and Xe only in the attitudes file, so they have no partner to pair with.
- 1Wy also lacks an attitudes row and, separately, its index value is NA, so it could not join an analysis needing that index even if matched.
Key terms
- Data linkage
- The process of combining records from different datasets that refer to the same entity, here the same country.
- Failed match
- A record that belongs in both datasets but is not joined because its identifying values, such as country names, differ.
- Complete pair
- A country present in both linked files with an available value for each measure the analysis needs.
Databases and Data Linkage FAQ
Why do some countries disappear when two files are joined?
A country drops out if it appears in only one file, if its name is written differently in each file, or if a needed value is recorded as NA. Listing the unmatched records and giving each a reason shows which of these happened and whether any loss can be repaired.
How is a failed match different from a missing value?
A failed match is a joining problem: the country is present in both datasets but the names do not agree, so it can be fixed with a documented recode. A missing value means the match worked but a measurement is unavailable, and it should be reported rather than repaired.
Can a linked GII and GSNI comparison show that attitudes cause outcomes?
It cannot. Both files describe countries rather than individual people, the attitude data come from a different period than the outcome series, and an association across countries leaves other explanations open. The defensible wording names the comparison group and talks about values tending to go together.
Do different reference periods make the comparison useless?
They narrow it rather than cancel it. The attitude estimates come from the 2017 to 2022 survey wave and the outcome values from the 2023 reference-year series, so state both periods and avoid presenting the pair as a snapshot of a single year.
Assessment move
Treat linkage as a sequence you can explain aloud. Start by printing the country names from each file side by side and look for differences in spelling, punctuation and abbreviation before any join is run. After joining, write the counts for each file, the matched rows and the rows with both values, and compare them with what you expected.
Then list every unmatched record and label it as a naming problem, a genuine absence from one file or a missing value. Practise with small invented tables first, because the logic is the same and errors are easier to see. For the real teaching files, remember the dictionary figures: 195 GII rows with 172 overall GII values, and 54 GSNI countries.
Finish each exercise by writing one sentence that names the countries your result describes, both reference periods, and the association language the evidence supports.
Working through Databases and Data Linkage in SOST10031? Sia is AskSia’s AI Computer Science tutor — ask any SOST10031 Databases and Data Linkage question and get a clear, step-by-step explanation grounded in how SOST10031 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.