Chapter 15

Protecting Data

In This Chapter

arrow Avoiding database damage

arrow Understanding the problems caused by concurrent operations

arrow Dealing with concurrency problems through SQL mechanisms

arrow Tailoring protection to your needs with SET TRANSACTION

arrow Protecting your data without paralyzing operations

Everyone has heard of Murphy’s Law — usually stated, “If anything can go wrong, it will.” People joke about this pseudo-law because most of the time things go fine. At times, you may feel lucky because you’re untouched by what purports to be one of the basic laws of the universe. When unexpected problems arise, you probably just recognize what has happened and deal with it.

In a complex structure, the potential for unanticipated problems shoots way up. (A mathematician might say it “increases approximately as the square of the complexity.”) Thus large software projects are almost always delivered late and are often loaded with bugs. A nontrivial, multiuser DBMS application is a large, complex structure. ...

Get SQL For Dummies, 8th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.