acid for traditional databases
atomicity Atomic Nature
All operations inside the transaction are either done or not, and the transaction succeeds because all operations in the transaction are successful, and as long as one operation fails, the entire transaction fails and needs to be rolled back.
Consistency consistency
The database is always in a consistent state, and the operation of the transaction does not alter the original consistency constraints of the database.
Isolation independence
Concurrent transactions do not affect each other, and if the data to be accessed by one thing is being modified by another transaction, the data that he accesses is not affected by uncommitted transactions as long as another transaction is not committed.
Durability Persistence
Once a transaction is committed, the changes he makes will be permanently stored on the database, and the CAP will not be lost even if there is an outage
Consistency Strong consistency
Availability Availability
Partition tolerance partition fault tolerance cap 3 in 2
The core of the CAP theory is that a distributed system cannot meet the three requirements of consistency, availability, and partition fault tolerance at the same time, and can only satisfy two at the same time.
Therefore, according to the CAP principle, the NoSQL database is divided into three categories which satisfy the CA principle, the CP principle and the AP principle:
ca– single-point clusters, systems that meet consistency, availability, and are often less scalable
cp– satisfies the system of consistency, partition tolerance, usually performance is not particularly high
ap– systems that meet availability, partitioning tolerance, and often may have lower consistency requirements
Because the current network hardware is bound to have problems such as delayed packet loss, " partition fault tolerance is what we need to achieve ", so we can only trade between consistency and availability, no NoSQL system can guarantee the three points. BASE
The solution proposed by base in order to solve the problem caused by the strong consistency of relational database and the decrease of usability.
Basic available (basically Available)
Soft states (Soft state)
Final agreement (eventually consistent)
By allowing the system to relax the requirements for data consistency at a particular moment in exchange for overall scalability and performance improvements. Introduction to distributed and clustered
Distributed: Different multiple servers are deployed with different module projects
Cluster: Different multiple servers deploy the same module engineering