75% of St David's pupils come from associated Catholic primary schools in Midlothian and East Lothian.
A Roman Catholic School was founded in Dalkeith in 1854, following the establishment of St David's Church by the Marchioness of Lothian earlier that year.
[1] In 1876, the Sisters of Mercy came from St Catharine's Convent in Edinburgh to take over teaching responsibilities at the school, an arrangement that continued until around 1940.
[5] After the move, teachers kept students separated from each other in the dining hall and on the playground, citing concern that younger pupils might become disoriented by the sudden transformation of their small school into a large, integrated organisation with 2,200 youths.
They initially predicted that the regime of segregation could be relaxed within a few weeks, and that religious factors played no role in their decision;[6] by January 2004, teachers at Dalkeith and St. David's still told their pupils not to talk to pupils from the other school, and students were kept segregated due to threats of violence directed at one another and teachers of different religious backgrounds in addition to assaults.