AtomicityAll operations will occur, or nonewill occurSimple example: INSERT INTO Names (firstname,lastname) VALUES (Sean, Collins)
ConsistencyAll operations will leave thedatabase in a known good state Keys, Constraints, triggers, etc..Cannot have operations that violatethe rules for your data Customer doesn’t exist Primary key that already exists
IsolationOperations cannot interfere with one-anotherHandle multiple, concurrentoperations (One write, many reads) ina defined manner.
DurabilityCompleted operations are bullet-proof Yank out the power cable Crash the database server processWhen the database server comes backup - database is in a consistentstate - with your data intact.
CAPCAP Theorem - Eric Brewer(Conjecture)Seth Gilbert and Nancy Lynch(Theorem) Consistency Availability Partition Tolerance
ConsistencyAll nodes in a distributed system seethe same data - at that exact moment Simple example: Update item B on node #1, query node #2 about B - get back the updated data
AvailabilitySystem will process requests, despitefailures in individual nodes Not a guarantee that the operation will succeedJust a guarantee that you will get aresponse back No guarantee is made for WHEN you will get a response back
Partition ToleranceSystem will continue to operate, evenwhen arbitrarily many messagesbetween nodes are lost
PICK TWOCAP Theorem asserts that of the threeproperties, a system can only havetwo.
Data TypesRelational Database Tables Columns Rows
Common NoSQL DatatypesKey/ValueColumn StoreDocumentetc....
ACID vs. BASESomeone clever... har har“Basic Availability”“Soft State”“Eventually Consistent”Much prefer CAP theorem - exposes thetradeoffs that you have to choosebetween