I've always been a little confused by the fact that when a crew member dies they don't just use the transporter history to bring that person back. I'm aware that this wouldn't make for good TV, but I was wondering if there was a more technical reason.
In early canon, the transporter log was exactly that; such and such a person transported to these coordinates at such and such a time. They were likely entered by the person manning the console instead of in any automatic fashion.
With more advanced transporter technology, such as the ability to "save" a person's pattern in the transporter's buffer, there is the possibility of bringing someone back to life. In fact, a Voyager episode (VOY:Jetrel) deals with exactly that; Neelix's backstory is that his home colony, Rinax, had all life wiped out and was rendered permanently uninhabitable by an enemy's use of a WMD, the Metreon Cascade. Neelix was on the Talaxian homeworld at the time, but lost his entire family to the weapon. We learn over the course of the episode that the Haakonian scientist who developed that weapon is attempting to atone for his actions, and eventually comes up with a plan to use Voyager's transporter to resurrect Rinax's victims, as their "patterns" remain in the residual radiation of the moon's atmosphere. He fails, but the attempt redeems him in Neelix's eyes.
In the TNG episode "Relics", the Enterprise comes across a Dyson's Sphere while investigating a distress signal. The ship sending the signal has crashed on its surface, and the away team learns that the transporter on the ship has basically been used as a stasis pod, using the transporter to dematerialize a human (Scotty), then hold them in the pattern buffer indefinitely before their rescuers re-enable the rematerialization half of the sequence to get them back out. However, the imperfect nature of this approach is obvious as a second "stored" person's pattern has degraded too much to save.
So, the thought has obviously occurred to several characters in the canon that transporters have the ability to create life as well as recreate it. But, other than a couple episodes of cloning (such as Thomas Riker, a duplicate of William Riker who joins the Maquis) it hasn't been widely successful, to say the least.
The transporter logs are only capable of storing the physical pattern. The neural patterns is so much more complex that in DS9 4x10, Our Man Bashir, it took almost all the memory of the entire station to store only 5 neural patterns.
Storing neural patterns long-term simply isn't feasible, so the transporter logs only contain the user's physical makeup. And even then, not all of the data is stored - in TNG 2x07, Unnatural Selection, the crew had to track down some of Pulaski's pre-aged DNA in order to restore her body.
The implication in Unnatural Selection is that the transporter logs only store the physical pattern of a person the last time the person used it (Pulaski had used the transporter after getting affected by the aging virus, hence searching for a DNA sample). Beyond that, it is nothing more than a record of who did what, when.
In the special case of Thomas Riker, no pattern was stored at all - the transporter beam itself half-bounced off the atmosphere and duplicated before even reaching the ship.
The transporter collects both the matter and energy of the individual being transported. As the matter is broken down into subatomic particles, the annular confinement beam ensures that both are collected and contained until they can be reassembled at their destination.
If you were to transport a dead body, you could re-assemble the matter, but the energy – specifically the "life energy," or neural energy – would not be present.
Theoretically, you could transport all of the physical elements of a human body, and then apply the transporter trace, which is effectively a set of reassembly instructions, and reproduce the body – but without the energy component, they'd still be dead.
In Thomas Riker's case, where a second annular confinement beam was employed, I imagine that both the matter and energy were diminished in each subject, resulting in a weakened physical condition for both subjects. Obviously they both recovered, and William's condition was probably attributed to the interference they experienced during transport.
Meanwhile, Thomas recovered because Riker was a badass. ;-)