Ok, so I won't lie... chapter 12 was about 70 pages long, and I only read it twice. This chapter along with chapter 6 are very conceptual, which make them a slog to get through. I enjoy the deep thinking involved with this, but it is difficult to keep up with every idea, and execution. I'll be working through the practice exercises in the book this evening, and will try to remember the lingo for the test (QUE THE FLASH CARDS!)
It was largely about the idea of transactions. A transaction is a process of getting things done... that's a very dumbed down definition but either a transaction is completed successfully, or not. In SQL there are different transaction levels that can be set before a running code. I'm going to try to explain the five transaction levels introduced in the book in my own words:
Read Committed: The default Isolation level for SQL Server. A query can only read data that has been committed
Read Uncommitted: Removes shared locks in select statement, reads uncommitted data; DIRTY READS!
Read Uncommitted Snapshot: (RCSI) is the default Iso level for Azure, stores original data in Tempdb so that it can be reread later
Repeatable Read: data in a transaction can be read later in the transaction, updates and deletes of rows that are selected are prevented, but it can still read new rows PHANTOM READS
Snapshot: Just like RCSI, cannot see phantom reads
Serializable: Highest Iso level, all reads are repeatable, new rows are not allowed in underlying tables
No comments:
Post a Comment