Grouping variables assist in merging databases
Database management is essential when conducting research
When working with a single research database, multiple databases, or secondary analysis of existing datasets, it is highly important to have some method for identifying individual participants with unique identifiers. Also, there must be some sort of primary "grouping" variable that distinguishes groups, datasets, or strata in more complex databases.
The unique identifiers serve the purpose of meeting the assumption of independence of observations. The "grouping" variable serves as a means for sensitivity and subgroup analyses. It further helps data analysts work with secondary, tertiary, and ancillary research questions.
The efforts you make as a researcher to have an objective and consistent method for data entry, maintenance, and analysis pays great dividends in the analysis phase of a research study. It is also the difference between it taking your statistician FIVE MINUTES to analyze your data versus FIVE MONTHS, or a happy statistical day versus a nightmare scenario.