A = Atomicity: Each transaction be “all or nothing”
轉帳,要不就成功,失敗也不會有任何問題
C = Consistency: Any transaction will bring the database from one valid state to another
交易的結果該是甚麼就是甚麼,匯錢100萬不會變50萬
I = Isolation: Concurrent execution of transactions results in a system state that would be obtained if transactions were executed sequentially.
每一個執行都是獨立開來的,也就是當如果有一連串的交易要運行,那麼順序上誰先執行無所謂。
D = Durability: Once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors.
指令只要就永遠有效,即便後續停電了也還是一樣
目前NoSQL只會提供CAP的兩個,至於哪兩個要視資料庫而定