Jim Gray’s analogy on Database Logging

Jim Gray was a computer scientist and Turing Award recipient pioneered in database and transaction processing system. His major contributions are implemented in major relational database systems as logging, locking, and he proposed the ACID properties of a transactional database system (though the acronym is coined by Andreas Reuter and Theo Härder in 1983) to name a few.

Hansel & Gretel and breadcrumb

He presented a paper in Proceedings of Seventh International Conference on Very Large Databases, in 1981, titled ‘The Transaction Concept: Virtues and Limitations’. In this paper he explained the concept of database transactions and different methods to implement it. His analogy on transaction logging is very interesting to read and help to understand the concept clearly and easily. This is as follows.

The legendary Greeks, Ariadne and Theseus, invented logging. Ariadne gave Theseus a magic ball of string which he unraveled as he searched the Labyrinth for the Minotaur. Having slain the Minotaur, Theseus followed the string back to the entrance rather then remaining lost in the Labyrinth. This string was his log allowing him to undo the process of entering the Labyrinth. But the Minotaur was not a protected object so its death was not undone by Theseus’ exit.

Hansel and Gretel copied Theseus’ trick as they wandered into the woods in search of berries. They left behind a trail of crumbs that would allow them to retrace their steps by following the trail backwards, and would allow their parents to find them by following the trail forwards. This was the first undo and redo log. Unfortunately, a bird ate the crumbs and caused the first log failure.”

Leave a comment

July 23, 2014 · 12:59 PM

Leave a comment