Dynamodb Interview Questions

Dynamodb Interview Questions Download Dynamodb Interview Questions PDF

Dynamodb Interview Questions

You are allowed to create a maximum of 5 global secondary indexes per table.
“Query” and “Scan” are the API calls that are supported by Global Secondary Index.  
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.

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.

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, and they are:

  • Table partition key value
  • Attribute to serve as the index sort key
  • Table sort key value
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.
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.
Each table can constitute up to five local secondary indexes.
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.
It is a NoSQL database service which is superintended 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.