From the course: SQL Server 2008 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Introducing transactions

Introducing transactions - SQL Server Tutorial

From the course: SQL Server 2008 Essential Training

Start my 1-month free trial

Introducing transactions

When we're updating data in our databases we'll often need to work with transactions. A transaction is an incredibly important thing in the world of databases. And to understand them the best way is to think about what we think of as a transaction in the regular world. If you talk about making a transaction, you often mean something in the world of commerce. Say you hand over $15 to the bookseller; the bookseller gives you the book. That's the transaction. It's important that both of these things happen. If you hand over the money you expect to get the book. If they hand you the book they expect to get the money. Either both of these things happen or neither of them do. In a computing system, a classic example of a transaction is a banking system. Imagine that you log on to your bank's web site and you want to transfer $1000 from one of your accounts to the other. That's going to require to update operations. One, to subtract $1000 from account A, and the next to add $1000 to account…

Contents