This is a loaded question, having come from a banking background I’d suggest speaking to a mortgage advisor. If you’re with a bank that has branches in Scotland then it’s your first go-to. Otherwise you can explore other banks.
I’ve known a few PhD students that have bought property while studying, but they’ve bought them outright (thank you rich dads).