NoSQL and MongoDB Flashcards
1
Q
Problem with Relational Databases
A
- Do not scale well to large clusters
2
Q
Sharding
A
- Divides up the rows of a collection of databases across multiple servers
3
Q
Characteristics of NoSQL Databases
A
- Don’t use the relational model
- Open-source
- Designed for clusters (sharding, fragmentation, replication)
- Schema-less or flexible
4
Q
Three Main Classes of NoSQL Databases
A
- Key-value stores
- Document databases
- Column-family (big-table) stores
5
Q
Key-Value Stores
A
- Queries are limited to the key
6
Q
Document Stores
A
- Values are not opaque
- Queries can be based on the key or the contents
- Support for sharding and replication
7
Q
Aggregate Orientation
A
- Group together data that belongs together
- Get related data without accessing many different nodes
8
Q
Advantages of Schemalessness
A
- Data types can evolve over time
- Easier to handle nonuniform data
9
Q
Disadvantages of Schemalessness
A
- Can’t be enforced by DBMS
- DBMS can’t make queries more efficient
10
Q
MongoDB Equivalent of “Table”
A
- Collection
11
Q
MongoDB Equivalent of “Row”
A
- Document
12
Q
MongoDB Equivalent of “Attributes”
A
- Fields
13
Q
MongoDB Equivalent of “Primary Key”
A
- _id
14
Q
Capturing Relationships in MongoDB
A
- Store references to other documents using their _id values
- Embed documents within other documents
- Use references if embedding could lead to significant growth in the size of the document over time
15
Q
Limitations of MongoDB
A
- A query can only access a single collection
- Atomicity is only provided for operations on a single document