p. 206
First Line: 
O they built the ship Titanic for to sail the ocean blue

Reference

About the Song

This is a traditional song of unkown origin written sometime between the 1912 sinking of the Titanic and the first known recording by Ernest Stoneman in 1924. Stoneman may be largely responsible for the melody most used today.

From the BalladIndex.org (misc. notes below): "Despite this song (and other folklore), the band on the Titanic did NOT play "Nearer My God to Thee" as the ship sank. Instead, they played light music to prevent panic.
The reference to rich and poor not mixing is accurate enough, though hardly unique to the Titanic. As with most liners of the time, the Titanic carried three classes of passengers: First class, second class, and steerage, for the poorest people (mostly emigrants, and mostly jammed in their cabins as tight as sardines)
Steerage passengers, of course, were stuck far down in the ship. Ballad, p. 168, has a side view of the ship's plans, showing that many of the steerage passengers were four floors below the main deck, near the waterline, whereas the first class passengers were mostly above the main deck, with easy access to the lifeboats.
It showed in the casualties. According to Paine, 60% of the first class passengers survived (Ballard, p. 149, reports that every child in first class, save one, survived, and she died only because she wouldn't leave her mother, who wouldn't leave her husband). 42% of second class passengers survived, but only 25% of steerage (comparable to the 24% of the crew who survived)."

The Woody Guthrie recording is a somewhat different song but about the same incident and with some similar tune and words.