Background: Previous studies have suggested an inverse association and a hypothesized mutually protective effect between several forms of cancer and late-onset dementia (LOD). Type 2 diabetes (T2DM) is an established important risk factor for both diseases; however, the precise relationships between T2DM, cancer and LOD still remain poorly understood. This thesis investigates the relationship between different cancers and risk of LOD, and explores the role of prediabetes or T2DM in these associations. Methodology: Using the Clinical Practice Research Datalink (CPRD), a massive UK primary care database, in years, 1998-2015, a sample of individuals ≥ 65 years old, with and without T2DM were identified. All individuals aged ≥ 65 years old, with and without a T2DM diagnosis were included in this analysis. Individuals with an LOD diagnosis prior to 65 years of age or prior to a T2DM diagnosis, were excluded. All study participants were followed up from the index date to the censor date. Participants were censored at point of LOD diagnosis, death, end of observation period (2015) or last data upload date (last date of follow-up), whichever came first. It was required that participants have been under observation by CPRD for > 1 year prior to cohort entry. Exploratory analyses were performed to investigate the incidence rates of LOD in both non-T2DM and T2DM cohorts. Cox proportional hazard models, with time-dependent covariates, were used to determine the risk of LOD in individuals with and without a cancer diagnosis in both non-T2DM and T2DM cohorts. The cause-specific hazard ratio (csHR) and sub-distribution hazard ratio (sdHR) for overall LOD and death in individuals with cancer were computed, to account for death as a competing risk. Results: Separate analyses amongst 217,335 individuals with T2DM and 739,061 without T2DM were performed. The mean age (SD) of individuals with T2DM at cohort entry was 71.62 (7.09) years (47.3% females) vs.70.80 (7.66) years (56.9 % females) in the non-T2DM cohort. During follow-up, a total of 165,272 (22 %) and 32,022 (15 %) cancer cases and 51,733 (7 %) and 11,450 (5%) LOD cases were identified in the non-T2DM and T2DM cohorts, respectively. In the non-T2DM cohort, 10,602 (6 %) had both LOD and cancer diagnosis vs. 1,172 (4%) in the T2DM cohort. The incidence rate of LOD was higher in females in both non-T2DM and T2DM cohorts (non-T2DM: 7.15 per 1,000 person years in males and 10.04 per 1,000 person years in females; T2DM: 6.96 per 1,000 person years in males and 10.57 per 1,000 person years in females). There was a higher risk for LOD in cancer individuals in the 6 non-T2DM cohort [HR 1.16, 95 % CI (1.13-1.20)]. Conversely, in the T2DM cohort, there was a significantly lower risk for developing LOD in lung cancer participants vs. no cancer group [HR 0.52, 95 % CI (0.29-0.94)]. In the presence of death as a competing risk for LOD, lung cancer showed an even more intensified "protective relationship" (sdHR 0.11 (95% CI 0.06, 0.21), when compared to the cause specific hazard ratios (csHR of 1.16 (95% CI 1.13, 1.20). The cumulative incidence function curves showed that in the presence of death, there is a protective effect of cancer on LOD incidence in both cohorts (not observed for csHRs). Conclusion: Examining the cause-specific and sub distribution hazard models led to the conclusion that the inverse association observed between cancer, lung cancer and LOD, especially in the T2DM cohort, is most likely due to mortality selection. Careful consideration of statistical model specifications is imperative, particularly in older adult population research, where mortality is inevitable.