DS 220 Midterm: DS 220 exam 2

175 views5 pages
16 Jan 2019
School
Department
Course
Professor
DS 220 Exam 2
Properties and terms/vocab of Key-Value, Document, and Column stores.
MongoDB concepts and queries (!)
MapReduce concepts
Key-Values:
A key is a field name, an attribute, an identifier. The content of that field is its value, the data
that is being identified and stored.
- In other words, a key is a unique identifier and a value is the actual data that’s being
identified
Key value pair a field name together with data entered into that field
Relational database:
- Each record includes the same keys. Each record is consistent: it is similar to its neighbor
in structure (keys), but different in content (values).
- Consistency makes it easy to ask the database some good questions. Often, we are
looking for some particular value, and the key helps us find it
Key-Value Store
- Simple HashTable
- Collection of key-value pair
- Associate array
- The key unique within collection
Key-Value Store Features:
Consistency
Consistency is applicable only for operations on a single key
Eventually Consistent in Distribute Implementation
Transaction
Quorum
Query
Structure Of Data
Scaling
Sharding
CAP
Hashing uses Ring topology
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Already have an account? Log in
Document Stores:
- Document-oriented database stores and retrieves documents (XML, JSON, BSON and so
on).
- Documents are self-describing. Hierarchical tree data structures (maps, collection and
scalar values)
Document databases (MongoDB) store documents in the value part of the key-value store
where:
- Documents are indexed using a B-Tree
- Queried using a JavaScript query engine
- Documents have differences in their attributes but belongs to the same collection
- This is different from relational databases where columns:
o Stores the same type of values or null
Documents: Data Model
- Data has a flexible schema
- This helps in matching documents to objects
o Each document can match the fields of a document also if with different
structure
- Data is represented as a map
- Relations can be represented as: references and embedded documents
Documents: Write Operations
- Writes are atomic at the document level
o A Denormalized data model facilitates atomic write operations.
o Normalizing the data over multiple collection would require multiple write
operation that are not atomic.
Documents: Growth
- Each time a document is updated the modifications are done changing affected
attributes
- Each document has a maximum size of 16mb
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Properties and terms/vocab of key-value, document, and column stores. A key is a field name, an attribute, an identifier. The content of that field is its value, the data that is being identified and stored. In other words, a key is a unique identifier and a value is the actual data that"s being identified. Key value pair a field name together with data entered into that field. Each record is consistent: it is similar to its neighbor in structure (keys), but different in content (values). Consistency makes it easy to ask the database some good questions. Often, we are looking for some particular value, and the key helps us find it. Consistency is applicable only for operations on a single key. Quorum: query, structure of data, scaling. Document-oriented database stores and retrieves documents (xml, json, bson and so on). Hierarchical tree data structures (maps, collection and scalar values)