Mongo Prep Flashcards
ACID
Atomicity, Consistency, Isolation, and Durability
Atomicity
Either the entire statement is executed, or none of it is executed
Consistency (ACID)
transactions only make changes to tables in predefined, predictable ways.
Isolation (ACID)
concurrent transactions don’t affect one another.
Durability (ACID)
transactions will be saved, even in the event of system failure.
Benefits of SQL
ACID transactions and support for complex queries
Limitations of SQL
Migrations are tough, Difficult to scale horizontally, not well suited for hierarchical data
Benefits of NoSQL
Fast, Flexible Schema, Scales horizontally, Handles large data well
Limitations of NoSQL
Complex Query Capabilities? Weaker Consistency
Mongo Data Modeling Strategies
Embedded Documents (1:1 and 1:few), Normalization (1:m | m:m), Hybrid
BSON benefits
More data types than JSON and size encoding for efficient traversal
Max document size
16MB
Embedded Document Array benefits
Faster read/write, better consistency, easily model hierarchical data
int size
32-bit
long size
64-bit