What Is Rollback?

TechDogs Avatar

Did you know that the word "rollback" is a phrase? It's not just a fancy word for rolling up your sleeves. It's the name of a process that can restore a database to a previous state. We will give you a rundown of how it works and why you might want to use it. Rollbacks are used in database systems to undo changes made by transactions. They are sometimes called roll-outs or rollovers, depending on which side of the Atlantic you work on. The name comes from the idea that a transaction is like a ball rolling down a hill: once it starts moving, you can't stop it in its tracks. You have to let it roll back up again. Rollback is a time-traveling wizard. It can go back in time and undo things that have already happened. It's like a "undo" button for your database, except that it doesn't just reverse your changes; it also reverses the differences of everyone who made changes after you did! It's like if you were playing chess with someone, and they made a clever move that was good for them, but then you rolled back their activity and took their piece instead! When a database user changes a data field but has not yet saved the change, the data is stored in what we call "a temporary state or transaction log."It's like changing your résumé, and you think it looks great, but your friend reminds you that you forgot to include your volunteer work at the soup kitchen. You're like, "Oh my god!" so you add that part of your résumé, but then your friend says, "Wait! Now that space is taken up by those two words about soup kitchens! We need another one." So now there's another blank line on your résumé, but it doesn't matter because it didn't save time anyway, so now we're back where we started from: no soup kitchen volunteering on this résumé at all!

TechDogs

Join Our Newsletter

Get weekly news, engaging articles, and career tips-all free!

By subscribing to our newsletter, you're cool with our terms and conditions and agree to our Privacy Policy.

  • Dark
  • Light