Question : In DynamoDB, ______ is a collection of attributes. Each attribute has a name and a value. An attribute value can be a number, a string, a binary, or a set of any of these types. 1. An Item 2. A row 3. A colum 4. A table
Explanation: In DynamoDB, an item is a collection of attributes. Each attribute has a name and a value. An attribute value can be a number, a string, a binary, or a set of any of these types.
DynamoDB provides APIs to read and write items. For these operations, you need to specify the items and attributes that you want to work with. When you write an item, you can specify one or more conditional expressions that must evaluate to true. For example, you might want the write to succeed only if an item with the same key does not already exist.
Question : To read an item from a DynamoDB table, use the __________ operation. You must provide the name of the table, along with the primary key of the item you want.
1. PullItem 2. ReadItem 3. GetItem 4. FetchItem
Correct Answer : Get Lastest Questions and Answer : To read an item from a DynamoDB table, use the GetItem operation. You must provide the name of the table, along with the primary key of the item you want.
You need to specify the entire primary key, not just part of it. For example, if a table has a hash and range type primary key, you must supply a value for the hash attribute and a value for the range attribute.
The following are the default behaviors for GetItem:
GetItem performs an eventually consistent read.
GetItem returns all of the item's attributes.
GetItem does not return any information about how many provisioned capacity units it consumes.
You can override these defaults using GetItem parameters.
Question : Which of the following is correct operation for DynamoDB 1. PutItem 2. UpdateItem 3. DeleteItem 4. 1 and 2 Only 5. 1,2 and 3
Correct Answer : Get Lastest Questions and Answer : To create, update, and delete items in a DynamoDB table, use the following operations:
PutItem - creates a new item. If an item with the same key already exists in the table, it is replaced with the new item. You must provide the table name and the item that you want to write.
UpdateItem - if the item does not already exist, this operation creates a new item; otherwise, it modifies an existing item's attributes. You must specify the table name and the key of the item you want to modify. For each of the attributes that you want to update, you must provide new values for them.
DeleteItem - deletes an item. You must specify the table name and the key of the item you want to delete.
For each of these operations, you need to specify the entire primary key, not just part of it. For example, if a table has a hash and range type primary key, you must supply a value for the hash attribute and a value for the range attribute.
If you want to avoid accidentally overwriting or deleting an existing item, you can use a conditional expression with any of these operations. A conditional expression lets you check whether a condition is true (such as an item already existing in the table) before the operation can proceed. For more information, see Conditional Writes.
In some cases, you might want DynamoDB to display certain attribute values before or after you modify them. For example, with an UpdateItem operation, you could request that attribute values be returned as they appeared before the update occurs. PutItem, UpdateItem, and DeleteItem have a ReturnValues parameter, which you can use to return the attribute values before or after they are modified.