Top DynamoDB Interview Questions
In this post we will look at DynamoDB Interview questions. Examples are provided with explanation.
Q: What is DynamoDB?
A: Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB lets you offload the administrative burdens of operating and scaling a distributed database, so that you don't have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling. Also, DynamoDB offers encryption at rest, which eliminates the operational burden and complexity involved in protecting sensitive data.
Q: What are advantages of DynamoDB?
A: The advantages of DynamoDB are as follows-
- Scalable - User can store unlimited amount of data.
- Distributed - DynamoDB scales horizontally by expanding a single table over multiple server
- Cost Effective - One year free tier allows more than 40 million database operations/month and pricing is based on throughput (read/write per second) rather than storage
- Easy Administration - Fully managed service from Amazon.
- Automatic data replication - All data items are stored on Solid State Disks (SSDs) and automatically replicated across multiple availability zones in a region
- Secure - DynamoDB uses proven secured methods to authenticate users and prevent unauthorized data access
Q: What are disadvantages of DynamoDB?
A: The disadvantages of DynamoDB are as follows-
- Deployable only on AWS and cannot be installed on individual desktops/servers
- Queries - Querying data is extremely limited
- Table Joins- Joins are impossible
- No Triggers
- No foreign keys concept to refer to other table items
- No server side scripts
Q: What is DynamoDBMapper class?
A: The DynamoDBMapper class is the entry point to DynamoDB. It provides access to a DynamoDB endpoint and enables you to access your data in various tables, perform various CRUD operations on items, and execute queries and scans against tables. This class provides the following methods for working with DynamoDB. Q: What are the data types supported by DynamoDB?
A: DynamoDB supports a large set of data types for table attributes. Each data type falls into one of the three following categories -
- Scalar - These types represent a single value, and include number, string, binary, Boolean, and null.
- Document - These types represent a complex structure possessing nested attributes, and include lists and maps.
- Set - These types represent multiple scalars, and include string sets, number sets, and binary sets.