Using Amazon DynamoDb with the AWS .NET API Part 6: queries

Exercises in .NET with Andras Nemes

Introduction

In the previous post we looked at how to delete and update records in Amazon DynamoDb. In this post we’ll investigate how to run queries against the data set in a DynamoDb table. Like in the two posts before this we’ll look at the document and data models separately.

We’ll extend the DynamoDbDemo console application in Visual Studio.

I’ve inserted a couple more records into the demo DynamoDb table in preparation for the queries:

Records in DynamoDb ready for queries

There’s an important distinction between a “query” and a “scan” in DynamoDb. A query is a search by ID. All query-searches where you omit the ID parameter and try to run a search by other parameters will result in an exception. Searches based on parameters other than the ID are scan operations. An ID-based query is a lot faster as each record is guaranteed to have non-null ID field(s) and the IDs are indexed. As…

View original post 670 more words

Advertisements
This entry was posted in Brian By Experience. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s