Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 10 páginas
Examen

NoSQL Final Exam With 100% Correct Answers

Document preview thumbnail
Vista previa 2 fuera de 10 páginas

NoSQL Final Exam With 100% Correct AnswersWhat 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" Page 2 of 10 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 Page 3 of 10 Every request receives a response about whether it was successful or failed If you can talk to a node in a cluster, it can read / write data Partition tolerance - ANSWER Operations will complete, even if individual machines are unavailable System can survive communication breakages in the cluster What do NoSQL database trade off in the CAP theorem? - ANSWER They sacrifice Consistency to achieve higher availability What do relational database trade off in the CAP theorem? - ANSWER They maintain high consistency at the expense of availability How is Consistency measured? - ANSWER Many kind of consistency measurements (between users, business logic, single request etc.) Measured in degrees 1) multi-table/ multi-operation ACID guarantees 2) strict consistency for single operations 3) eventual consistency 4) weak consistency Define Strong, Eventual and Weak Consistency - ANSWER Strong: All data are consistent immediately after the transaction completes Eventual: eventually all accesses to a value will return the latest version Page 4 of 10 Weak: no guarantees that system will become consistent How is availability measured? - ANSWER Typically defined as the percentage of time that the system is available Tuning consistency - ANSWER N: replication factor - how many copies will be stored W: number to write before operation is complete R: number to read during a read operation Define sharding - ANSWER Putting different data on separate nodes to improve DB performance this can also be done in RDBMS, but ACID transactions become difficult to guarantee • some support auto-sharding Define replication - ANSWER Putting multiple copies of data on separate nodes Master-slave: master can write, everyone can read • Redis, MongoDB, Neo4j Peer-to-peer: all nodes are equal and can read / write • Cassandra Explain range-based sharding and hash-based sharding - ANSWER Range-based: define a sharding key for the data-usually numeric or alphabetic, then assign chunk of memory based on the key; do this when you have a good reason Hash-based: pass shard key through hash function, that will assign the data to chunk of data What are the costs of replicating data? - ANSWER More storage required, we probably have to relax consistency guarantees for the system to be efficient at scale Page 5 of 10 Load balancing Schema changes No 'joins' / 'group by' across shards Quorum examples - ANSWER N W 1 : more than one node must participate in a write W N / 2 : no simultaneous updates W + R N : newest version of record is part of read operation Main data structure underlying key-value stores - ANSWER Hash tables, with more complex structures built on top How is data organized in key-value database? - ANSWER Values are unstructured from the point of view of the DB Various DB's can offer external means of declaring data types Use of key-value databases - ANSWER Web-session data Shopping carts User profiles Twitter (Redis)

Vista previa del contenido

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"
Page 1 of 10

, 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
Page 2 of 10

Información del documento

Subido en
24 de junio de 2025
Número de páginas
10
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$18.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Onlystudents
3.9
(19)
Vendido
111
Seguidores
86
Artículos
1356
Última venta
2 meses hace


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes