Dynamodb Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Dynamodb Interview Questions

    1. Question 1. Explain What Is Dynamodb?

      Answer :

      • It is a NoSQL database service which is superintendent and provides fast and inevitable performance with seamless scalability.
      • It also enables the users to offload the operating and scaling distributed databases to AWS.
      • So that the users don’t have to worry about setup and configuration, hardware provisions, replication, throughput capacity planning, cluster scaling or software patching.

    2. Question 2. List Some Benefits Of Using Amazon Dynamodb?

      Answer :

      Here is the list of some of the benefits of using Amazon DynamoDB:

      • It is a managed service where there is no need to hire the experts or worry about installation, setup, cluster etc.,
      • It is scalable.
      • It provides the users high throughput at very low latency.
      • It is durable and highly available.
      • It is flexible and allows dynamic tables creation that includes multi-valued attributes.
      • It is cost-effective.

    3. Question 3. What Are The Non-relational Databases?

      Answer :

      The Non-Relational databases are NoSQL databases.

      These databases are categorized into four groups. 

      They are:

      • Key-value stores
      • Graph stores
      • Column stores
      • Document stores 

    4. Question 4. Is Dynamodb Free For Use?

      Answer :

      1. In Amazon DynamoDB you only pay for the resources you provision.
      2. Get started with free tier limits of DynamoDB on which many applications operate.
      3. In need of resources, the pricing per month varies depending on which type of resources you require.

    5. Question 5. Explain What Is Dynamodb Mapper Class?

      Answer :

      It is the entry point to DynamoDB.The DynamoDB Mapper class provides access to a DynamoDB endpoint and enables the user to access to their data in various tables, execute queries and scan against tables, and perform CRUD operations on items.

    6. Question 6. List The Data Types Supported By Dynamodb?

      Answer :

      DynamoDB supports four scalar data types, and they are:

      • Number
      • String
      • Binary
      • Boolean

       DynamoDB supports collection data types such as:

      • Number Set
      • String Set
      • Binary Set
      • Heterogeneous List
      • Heterogeneous Map

      DynamoDB also supports Null values.

    7. Question 7. Does Dynamodb Support In-place Atomic Updates?

      Answer :

      Amazon DynamoDB supports quick in-place atomic updates, were the numeric attributes increment and decrement can be done in arrow using just one API call or similarly, you can add or remove sets, lists, or maps.

    8. Question 8. What Kind Of Query Functionality Does Dynamodb Support?

      Answer :

      • It supports GET/PUT operation using the user-defined primary key.
      • It provides flexible querying by letting query a non-primary key attribute using local secondary indexes and Global secondary indexes.
      • It allows quick reads and writes data for an item associated with single attribute partition primary key.
      • It allows you to use the Query API to retrieve all the items for a single composite partition-sort key across a range of sort keys.

    9. Question 9. Does Amazon Dynamodb Support Conditional Operations?

      Answer :

      For an operation to be completed on an item, you have to specify a condition.You can define a ConditionExpression that can be constructed from the following:

      Boolean functions:

      ATTRIBUTE_EXIST, CONTAINS, and BEGINS_WITH

      Comparison operators:

      =, <>, <, >, <=, >=, BETWEEN, and IN
      Logical operators:

      NOT, AND, and OR.            

      You can also construct a free-form conditional expression that combines multiple conditional clauses which also includes nested clauses.

    10. Question 10. List Some Difference Between Amazon Dynamodb And Amazon Simpledb?

      Answer :

      Amazon DynamoDB :

      It is a fast and scalable NoSQL Database Service that is designed for internet scale applications, to maintain predictably high performance and to be highly cost-effective for workloads of any scale, on the top of all it is highly recommended.

      Amazon SimpleDB :

      It has scaling limitations and is a good fit for smaller workloads that requires query flexibility.It automatically indexes all item attributes and supports query flexibility at the cost of performance and scale.

    11. Question 11. List The Apis Provided By Amazon Dynamodb?

      Answer :

      • UpdateTable
      • DeleteTable
      • DescribeTable
      • ListTables            
      • PutItem
      • BatchWriteItem
      • UpdateItem
      • DeleteItem
      • GetItem
      • BatchGetItem.
      • Query
      • Scan

    12. Question 12. What Amazon Dynamodb Batchwriteitem Api Does?

      Answer :

      • The Amazon DynamoDB BatchWriteItem inserts, deletes and replaces multiple items across multiple tables in just one request, but not in one transaction.
      • With maximum total request size of 16 MB, it supports batches of up to 25 items to insert or delete.

    13. Question 13. Explain Key-value Store?

      Answer :

      It is a database service that provides and supports storing, updating and querying the objects that are identified using key and values that constitutes the actual content that is being stored.

    14. Question 14. What Is Dynamodb Auto Scaling?

      Answer :

      DynamoDB is a superintendent feature that scales up and down the read and write capacity of a DynamoDB or a global secondary index automatically.

    15. Question 15. What Are Global Secondary Indexes?

      Answer :

      • An index with a different partition and partition-and-sort key from those on the table is called global Secondary index.
      • It is considered to be “global” in the sense that queries on the index can span all the items in a table across, all the partitions.

    16. Question 16. List Types Of Secondary Indexes Supported By Amazons Dynamodb?

      Answer :

      Two types of indexes are supported by Amazon DynamoDB.

      They are:

      Global Secondary index :

      It is an index with a partition or a partition sort key that is different from those on the table. The global secondary index is considered to be global because queries on the index can span all the items in a table, across all the partitions.

      Local secondary index :

      An index that has the same partition key as that of the table but different sort key. It is considered to be “local” because every partition of the index is scoped to a table partition that has the same partition key.

    17. Question 17. How Many Numbers Of Global Secondary Indexes Do You Create Per Table?

      Answer :

      You are allowed to create a maximum of 5 global secondary indexes per table.

    18. Question 18. What Are Api Calls Supported By A Global Secondary Index?

      Answer :

      “Query” and “Scan” are the API calls that are supported by Global Secondary Index.

    19. Question 19. How To Delete A Global Secondary Index In Amazon Dynamodb?

      Answer :

      • A Global secondary index can be deleted from the console or through an API call.
      • Select the table from which you want to delete the Global Secondary index on the console, select the “indexes” tab under “Table items” and then click on the “Delete” button which is next to the delete index.
      • A Global Secondary Index can also be deleted using the Update Table API call.

    20. Question 20. What Are Local Secondary Indexes?

      Answer :

      • An index with the same partition key as the table but different sort key is called local secondary index.
      • A local secondary index is considered to be “local” because every partition of a local secondary index is scaled to a table partition which contains the same partition key.

    21. Question 21. What Are Projections?

      Answer :

      • Projections are the set of attributes that are copied or projected from the table to an index.
      • They are in addition to the index key attributes and primary key attributes which are automatically projected.
      • Whenever you define a local secondary index, it is required to specify the attributes that are projected into the index.

      Each index consists of a minimum of 3 attributes.

       They are:

      • Table partition key value
      • Attribute to serve as the index sort key
      • Table sort key value

    22. Question 22. How To Create Local Secondary Indexes?

      Answer :

      A Local secondary index needs to be created at the time of creating a table that can’t be added currently.

      So, later when you create a local secondary index, try specifying the following two parameters.

      Indexed Sort Key :

      The attribute on which indexing and querying are performed.

      Projected Attributes :

      It is the list of attributes from the table that can directly be copied into the local secondary index. Without projected attributes, the local secondary index contains only primary keys and secondary keys.

    23. Question 23. Can I Add Local Secondary Indexes To An Existing Table?

      Answer :

      • When you create a table with local secondary indexes, you can create a local secondary index to use it in future by defining a sort key element which is not used currently.
      • So, at this time it is probably not possible to add local secondary indexes in the existing table.

    24. Question 24. How Many Local Secondary Indexes Can Be Created On One Table?

      Answer :

      Each table can constitute up to five local secondary indexes.

    25. Question 25. Can I Delete Local Secondary Indexes?

      Answer :

      Currently, the Amazon DynamoDB is incapable of removing the local secondary indexes from the table once they are created, but it is possible to delete the entire table.

Popular Interview Questions

All Interview Questions

All Practice Tests

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Tutorial