Bda CHP 3
Bda CHP 3
Key-Value
A key-value database
consists of individual
records organized via
key-value pairs. In this
model, keys and values can
Ideally, the data is also
be any type of data, ranging
simple, and we are looking
from numbers to complex
to prioritize fast queries
objects. However, keys
over fancy features.
must be unique. This means
this type of database is
best when data is
attributed to a unique key,
like an ID number.
⚫ For example, let’s say we wanted to store
shopping cart information for customers who
shop in an e-commerce store. Our key-value
database might look like this:
⚫ Amazon DynamoDB and Redis are popular
options for developers looking to work with
key-value databases.
Document
A document-based (also
called document-oriented)
database consists of data
stored in hierarchical
structures. Some supported Documents are considered
document formats include very flexible and can evolve
JSON, BSON, XML, and to fit an application’s needs.
YAML. The document-based They can even model
model is considered an relationships!
extension of the key-value
database and provides
querying capabilities not
solely based on unique keys.
⚫ For example, let’s say we wanted to store
product information for customers who shop in
our e-commerce store. A products document
might look like this:
⚫ MongoDB is a popular option for developers
looking to work with a document database.
Graph