done the same.)

The journal for a transaction is a record of all the actions that have been taken under the transaction. (In my scheme, each transaction has its own journal. In traditional systems, there is a single journal for all transactions.) Armed with a journal, the recovery process knows what happened, and in what order, before the crash, and can reconstruct the original state from the information in the journal plus the backup files.

The algorithm has four parts:

Action execution

Commit

Rollback

Recovery

The execution phase performs the actions as they are requested, writing enough information in the journal to undo each action, should that become necessary. The commit phase cleans up and deletes the journal. Rollback plays back the journal in reverse order, undoing the actions, then cleans up and deletes theGet the biggest stories sent straight to your inbox Sign up for regular updates and breaking news from WalesOnline Thank you for subscribing We have more newsletters Show me See our privacy notice Invalid Email

In 1963, Dr Richard Beeching took an axe to the British rail system - and made getting around Wales by public transport significantly more difficult.

Gone within two years would be key lines linking east with west, and south with north.

Once Beeching's cuts were done, just three main lines traversing Wales remained - one stretching along the northern coast, another linking Aberystwyth with Shrewsbury via the towns of Mid Wales, and another stretching from Pembrokeshire to Newport, and on to London.

In addition, the Cambrian Coast line remained to link the towns of Pwllheli, Harlech and