DynamoDB Flashcards
(37 cards)
What is the primary key in DynamoDB?
Represents the table’s key or keys; if no sort key, the primary and partition keys are the same; if there is a sort key, it is a composite primary key of partition and sort keys.
A composite primary key allows for more complex data organization and access patterns.
What is the purpose of the partition key in DynamoDB?
To find each item in the database and determine its physical storage location.
Data is distributed across physical storage nodes based on the partition key.
What is a sort key in DynamoDB?
An optional key that allows related attributes to be stored in a sorted order, enabling multiple items to be queried as a collection.
This simplifies access patterns for related data.
What are the two types of secondary indexes in DynamoDB?
- Local secondary index
- Global secondary index
These indexes improve data access efficiency.
How many local secondary indexes are allowed per table in DynamoDB?
Five.
Local secondary indexes must be created when the table is created.
What distinguishes a global secondary index from a local secondary index?
A global secondary index can use a partition key and sort key different from those on the table.
This allows modeling complex data access patterns.
How many global secondary indexes are allowed per table in DynamoDB?
Up to 20.
Global indexes can be created and edited at any time.
What service does DynamoDB use for managing credentials and access?
AWS Identity and Access Management (IAM).
IAM allows control of access at the table and item levels.
What type of encryption does DynamoDB provide for data?
End-to-end enterprise-grade encryption for data in transit and at rest.
All tables have encryption at rest enabled by default.
What is the purpose of AWS Key Management System (AWS KMS) in DynamoDB?
Stores encryption keys used to encrypt data for enhanced security.
How does a mobile application use DynamoDB in its backend process?
Posts new status updates which can trigger an AWS Lambda function to process data and push notifications.
This illustrates a typical use case for transactional workloads.
What example is given for using IoT sensors with DynamoDB?
Tracking forklifts in a warehouse, where sensor data is sent to Amazon SQS and processed by Lambda before storage in DynamoDB.
This data can then be analyzed using Amazon EMR and queried with Amazon Athena.
How does Lyft utilize DynamoDB?
To support over 100 microservices, including a ride-tracking system that stores GPS coordinates for all rides.
This demonstrates the scalability of DynamoDB.
What was Expedia’s use case for DynamoDB?
To analyze behavior of over 600 million visitors and 75 million flight bookings monthly, using it for fast, on-demand access to reference data sets for analytics.
Mobile application backend architecture
Social mobile applications are more popular than ever. This architecture provides one solution for allowing a mobile application to automatically notify a user’s friends when the user’s status changes
IoT sensor data capture architecture
Capturing data from thousands of Internet of Things (IoT) sensors can be a challenge. This architecture represents one solution to this challenge
What is Amazon DynamoDB?
DynamoDB is a NoSQL (or non-relational) database.
Why were relational databases designed?
Relational databases were conceived to provide answers about data when storage infrastructure was extremely expensive.
How do relational databases answer data questions?
They use computing power to gather pieces of information and build necessary relationships for the answer.
What is SQL?
SQL (Structured Query Language) allows people to construct very complex questions in an orderly manner.
How has storage technology changed over time?
Data volumes have exploded and storage technologies have evolved, making storage much cheaper compared to CPU.
What is the advantage of non-relational databases?
Non-relational databases build out answers across the entire data set for timely retrieval, demanding storage space but not heavily relying on CPU.
How do applications retrieve results from DynamoDB?
Applications generally retrieve results directly via a simple API, rather than using SQL.
What is the management model of DynamoDB?
DynamoDB is a fully managed service with built-in availability, durability, and scalability.