The answer to this question depends a lot on whether you are flying into the Frankfurt airport and immediately getting on a train to Hamburg or if you are already going to be in Frankfurt for at least a day and are then going to Hamburg.
The reason is that advance purchase tickets are usually only for a specific train (date and time) so you don't want to be just arriving at Frankfurt on a flight that could be late causing you to miss your specified train, in which case your ticket will be worthless.
Advance purchase ticket can be "flexible", for any train that day, but they are full fare tickets, no discount. There are also discounted tickets, Sparpreis and Super Sparpreis, which are less expensive, but for only one specified train. But, as I said, if you miss the specific train, your ticket is worthless.
In 2013, I was arriving at FRA and wanted to go to Karlsruhe on an ICE. I didn't want a train specific, discounted ticket in case my flight was late, but there was a train leaving shortly after my scheduled arrival, and if my flight had been a little early I could have caught the train. If I had a chance to catch that train, I didn't want to have to spend time buying a ticket (and maybe missing the train as a result), so I advance purchased a full fare flexible ticket. As it turned out, my flight was a little late, and I missed the desired train, but I could still use the flexible ticket on the next train in 2 hours.