Edinburgh is a city by the sea - and that inevitably influences its life and history.