transactions in the database (transaction) have ACID4 basic features that can be compared to trading:
1,A (atomicity) atomicity
Everything in the transaction is either completed or failed during execution and is rolled back.
2,C (consistency) Consistency
The database should be in a consistent state.
For example: Existing integrity constraints a+b=10, if a transaction changes A, then B must be changed
3,I (isolation) Independence
The concurrent transactions do not affect each other.
If the data to be accessed by one transaction is being modified by another transaction, the data it accesses is not affected by uncommitted data as long as another transaction is not committed.
4,D (durability) Persistence
Once a transaction is committed, the changes are permanently stored on the database
Some of the differences between SQL (structured query Language, Structured Query language) and NoSQL (not-only SQL, referring to non-relational databases):
First, the most important difference is that NoSQL does not use SQL as the query language, and data storage does not require a fixed tabular pattern .
Avoid join operations with SQL, which can be scaled horizontally.
Typical representative of SQL database: SQL Server,oracle,my SQL
Typical representative of a NoSQL database: Mongodb,redis
1. SQL data exists in a specific structure of the table, NoSQL flexible, storage can be JSON, hash table and other ways
2. The table and field structure must be defined in SQL before data can be added;
3. When you need to correlate external data, SQL often requires foreign keys to build a table; NoSQL can put external data directly in the original data set
A join can be used in 4.SQL to query data from multiple relational data tables at once, and NoSQL does not support that usage
5.SQL data coupling is strong, can not delete external used data; NoSQL has no concept of data coupling and can be arbitrarily deleted
There is no concept of transaction in 6.NoSQL, and each operation is atomic
Database Acid,sql and NoSQL