IDS 200 Lecture Notes - Lecture 6: Friending And Following, Sql, Memcached
Document Summary
Relational databases are designed toward ensuring that any queries retrieve correct and current data: Consider a hypothetical example: updating your facebook relationship status to "it"s complicated" Atomicity: a group of related database actions is atomic; either they all happen or none do. When your status is updated, any backup copies are also updated. If any of the updates fail, the entire action fails and your status is not updated. Consistency: actions are processed in sequence and according to any existing database rules. Suppose you unfriend someone prior to announcing your status change. Then, the unfriending should happen first and your former friend won"t receive the announcement. Alternately, operations start and end with a consistent database (friends see your post, non-friends don"t) Isolation: no database operations affect others directly; each is executed the same regardless of any other operations occurring in parallel. Operations on the same data don"t interleave.