NoSQL Final Exam With 100% Correct Answers
What motivated the creation of NoSQL databases? - ANSWER 1) Impedance mismatch:
differences between relational models and data structures used by applications that
interact with databases
2) Web services: shift to web services (using HTTP) in early 2000's, need more flexibility
in data structure
3) Big data: rapid data expansion -- either scale up or scale out
4) Clustered computing: RDBMS not optimized for clusters, ACID transactions degrade
performance at scale
How do NoSQL data models address impedance mismatch? - ANSWER Eliminate the
need for object-relational mapping, simplify database interactions, and there is less
code to write / maintain
Store data the way you want to retrieve it
Explain horizontal vs. vertical scaling - ANSWER Vertical scaling (scaling up): bigger
machines, more expensive and ultimately reaches upper limits
Horizontal scaling (scaling out): add more machines to cluster, cheaper at scale and
more resilient and reliable
General defining characteristics of NoSQL - ANSWER 1) Do not use relational model
2) Do not use SQL as query language
3) "schemaless"
, 4) Mostly designed for clusters
5) Usually open-source
6) specialized for specific use cases
7) Developed in early 2000's and on
What is aggregate orientation? - ANSWER Related objects are grouped together and
treated as one unit
We communicate with the database in terms of aggregates
Clusters use aggregates as units of data distribution
What are the advantages of dynamic schema? - ANSWER Different records can have
different structures, not as rigid
In RDBMS, we must define structure a priori and take database down to make changes
State the CAP theorem - ANSWER A distributed computer system cannot simultaneously
provide : (1) consistency, (2) availability, and (3) partition tolerance
Define consistency - ANSWER The client perceives that a set of operations has occurred
all at once
All clients see the same data
"Atomicity" and "Consistency" from ACID
Define availability - ANSWER Every request received by a non-failing node must result in
a response
What motivated the creation of NoSQL databases? - ANSWER 1) Impedance mismatch:
differences between relational models and data structures used by applications that
interact with databases
2) Web services: shift to web services (using HTTP) in early 2000's, need more flexibility
in data structure
3) Big data: rapid data expansion -- either scale up or scale out
4) Clustered computing: RDBMS not optimized for clusters, ACID transactions degrade
performance at scale
How do NoSQL data models address impedance mismatch? - ANSWER Eliminate the
need for object-relational mapping, simplify database interactions, and there is less
code to write / maintain
Store data the way you want to retrieve it
Explain horizontal vs. vertical scaling - ANSWER Vertical scaling (scaling up): bigger
machines, more expensive and ultimately reaches upper limits
Horizontal scaling (scaling out): add more machines to cluster, cheaper at scale and
more resilient and reliable
General defining characteristics of NoSQL - ANSWER 1) Do not use relational model
2) Do not use SQL as query language
3) "schemaless"
, 4) Mostly designed for clusters
5) Usually open-source
6) specialized for specific use cases
7) Developed in early 2000's and on
What is aggregate orientation? - ANSWER Related objects are grouped together and
treated as one unit
We communicate with the database in terms of aggregates
Clusters use aggregates as units of data distribution
What are the advantages of dynamic schema? - ANSWER Different records can have
different structures, not as rigid
In RDBMS, we must define structure a priori and take database down to make changes
State the CAP theorem - ANSWER A distributed computer system cannot simultaneously
provide : (1) consistency, (2) availability, and (3) partition tolerance
Define consistency - ANSWER The client perceives that a set of operations has occurred
all at once
All clients see the same data
"Atomicity" and "Consistency" from ACID
Define availability - ANSWER Every request received by a non-failing node must result in
a response