In this video, we are going to learn query and scan operations on dynamic DB table.
You remember that when we are working with the management console, we have to option scan and query.
When we click the query, we have to provide the primary key.
In this table there is only one primary key, which is the partition key is ID.
So if you look at the documentation, there is a Dynamo DB API reference documentation.
You can see that query and second operation is a Dynamo DB API that we can call from the any resources
like a SLI management console or SDK.
So in these videos we will query and scan operation from the HTK libraries.
So what is the query?
Query is basically points item in the table with looking the primary key attributes.
So if the primary key has only part sync, it is required part sync.
If it is two items with partition and sort k, it is requiring both two items with partition and the
sort.
K So we have to provide a partition, key name and volume for which search will be performed.
And we can also provide a third key name and value and use the comparison operators to define results
of the search.
So scanning finds the items by checking every item in the specified table.
So there is a big difference with the query and scan.
If you click the scan operation, you can see that.
Before that I would like to show the query operation.
If you scroll down, you can see the request syntax that we can provide these attributes.
One Running to query operation.
By using the SSC, we will provide this kind of input, these kind of attributes.
So, for example, key conditions, fit exhibitions and so on.
So if we go to scan operations and compare, this can be to create operations.
Basically this scan operation returns one or more items and item attributes by accessing every item
in the table.
And this is very important because scan operation is very costly service that we cannot use, that we
should not use every operation.
And if we use the scan operation, it is basically scanning all items in the table and return back to
us, the whole results.
So as you can see that this is the scan operation.
If you scroll on, you can see the request syntax of the scan operation.
We can use these attribute values when sending this scan dynamic DB API.
So in the next video we will send query and scan command from our Node.js application.
We use the SDK libraries.