SQL vs NoSQL
Has to define schema before using it.
- Primary Key
- Store Procedure
This makes the SQL very stable but not easy to change. Whenever you change, you need to incorporate with other data.
There is no specific schema has to define before hand. You can change it at any time. This make NoSQL very flexible but the structure might vary. Don’t expect all object are the same.
Always normalize the table so as to avoid redundancy and inconsistency.
You can do normalization as well, but this is not very practical. Most time just store the entire complete object into NoSQL.
Very powerful and flexible join clause to enable complex query against many tables
There is no such thing as join. Developer needs to get all data of one collection, and search for their specific predicate to get another collection.
Can control or refrain developer from mistakenly operating the data by imposing constrains & checks.
transaction to ensure many SQL statements to be executed or failed as one entity to ensure consistency.
Generally not available, but some can provide transaction-like operation, but still not as good as SQL, must be done by ourselves.
No standardization yet. Different NoSQL has different syntax, but most of them are very intuitive.
Has to consider constrains and relationships, usually not good enough, but not always the case. Depending on the schema design.
Does not have to consider so many rules, just process the data by object. Usually performant
Not easy, because of the distribution of related data. Many databases are not designed that way at the first place. But recent evolution makes it possible to do clustering, even this is not easy.
Most of NoSQL can do scalability in easy way as they are design in this way at the first place.
- logical related discrete data requirements which can be identified up-front
- data integrity is essential
- standards-based proven technology with good developer experience and support.
- unrelated, indeterminate or evolving data requirements
- simpler or looser project objectives, able to start coding immediately
- speed and scalability is imperative.