Story 
"Martha My Dear" is a song by the English rock band the Beatles from their 1968 double album The Beatles. Credited to Lennon–McCartney, the song was written solely by Paul McCartney, and was named after his Old English Sheepdog, Martha. [Wikipedia]
Martha My Dear is a song by The Beatles, written by McCartney and led on vocal by Paul McCartney. About Paul's Old English Sheepdog; Paul plays nearly every instrument. Within the catalogue, its piano thread connects it to Not a Second Time, You Like Me Too Much, Good Day Sunshine. Paul McCartney's piano-based composition was inspired by his sheepdog Martha, transformed into an elegant musical meditation blending domestic affection with sophisticated harmonic development. The track featured solo Paul vocal with orchestral string arrangement by George Martin, representing McCartney's classical-music aspirations within the pop-song context. The song exemplified the White Album's structural diversity and McCartney's refusal to be confined by rock-and-roll conventions. Martha My Dear exemplifies McCartney's sophisticated approach to intimate composition, appearing in Beatles discography indexes alongside other Paul originals. (Kozinn 1995, p.231)
The session work falls within the band's The White Album (1968) period, recorded 4 Oct 1968 at EMI Studios + Trident Studios (Soho). George Martin (with Chris Thomas covering) produced; Ken Scott (early), Geoff Emerick walked off — replaced engineered. For session-by-session detail, see Mark Lewisohn's account on p.159 of The Complete Beatles Recording Sessions (excerpt below). Recorded at Trident Studios with Paul's vocal and piano establishing the song's foundation, followed by orchestral string overdubs conducted by George Martin. The arrangement's sophistication required careful microphone placement and precise level management during mixing. Paul's vocal phrasing emphasized the song's emotional restraint and musical maturity, with string accompaniment enhancing rather than overwhelming the delicate vocal presentation. Geoff Emerick witnessed Paul bring his sheepdog Martha to Studio Three at Trident, the very dog immortalized in Martha My Dear. (Emerick 2006, p.677) Martha My Dear showcases McCartney's multi-instrumental solo arrangement: double-tracked vocal, piano, bass, lead guitar, and orchestral strings. (MacDonald 1994, p.136)