Founded the royal burgh. Also founded Elgin. Endowed Kinloss Abbey. gave lands to Freskin and permission to build Duffus Castle

The early years of David I are the most obscure of his life. Because there is little documented evidence, historians can only guess at most of David’s activities in this period.

David was born on a date unknown in 1084 in Scotland. He was probably the eighth son of King Máel Coluim mac Donnchada, and certainly the sixth and youngest produced by Máel Coluim’s second marriage to Queen Margaret. He was the grandson of the ill-fated King Duncan I.[3]

Image in Public Domain

In 1093 King Máel Coluim and David’s brother Edward were killed at the River Aln during an invasion of Northumberland. David and his two brothers Alexander and Edgar, both future kings of Scotland, were probably present when their mother died shortly afterwards.[5] According to later medieval tradition, the three brothers were in Edinburgh when they were besieged by their uncle, Domnall Bán.

Domnall became King of Scotland. It is not certain what happened next, but an insertion in the Chronicle of Melrose states that Domnall forced his three nephews into exile, although he was allied with another of his nephews, Edmund. John of Fordun wrote, centuries later, that an escort into England was arranged for them by their maternal uncle Edgar Ætheling.

Source: https://en.wikipedia.org/