In this video, we are going to write an item into Amazon with the table bit using a management console.
We can open the door with this management console and go to tables and go to order table.
And in the navigation pane, on the left hand side, you can see the tables and come here, come to
the order table and you can see that these orange box, which is the go to explore table items page,
please click this button, explore table items and you can see that this page has two main parts.
One is this you can create items, and the second one is the items that we've seen in the table.
Okay, so before this, we should create items into our order table for that purpose.
Let's create an item.
You can see in here there's a create item button, please.
Christie's click this button, create item and see that we can create items in this window.
It comes with the default form selection, but if you come here and select the JSON one, you can see
that this can be also seen the JSON format.
And if you enable the dynamic JSON, we can see that this time you will see this is character, this
is the view of dynamic DB JSON and that means has included data types like S means string.
If there is a N and means number, we can close data type which is ready button and see default column
and attribute names.
And if you come back to form section, you can see that we can easily add new item with using the add
management console in the form selection.
So I'm going to add a new item, create a new item with the ID equal one and I'm going to give the status
as a in progress.
So now we can also add new attributes.
You can see in here we can add a new attribute.
If you click this button, you can see different types of the data types that we can insert dynamo DB
attributes.
So I'm going to use setting, but so we can specify any different attribute types when creating a new
item.
So this is fully dynamic table item creation that we can also provide custom JSON object into our table
item definition.
So let me add a new string value for now, the attribute should be the description.
So I'm going to add a description as a hyphen order.
So I would like to also add a new attribute, which is the order date.
So I'm going to.
Is it?
Or do date.
And the value is.
I think in here.
Okay.
Now I'm going to click the create item.
So we have successfully added one item into our table.
If you create item again, I'm going to add a new item and this time I'm going to add the same parts
in K, which is the one.
But the status should be different because parameter K is both of them combining ID and status.
So that Y status is delivery.
And I'm going to add a new attribute this time.
I'm going to add a total price.
And set.
5000.
As you can see, that we have set different data types for different items into our order table.
It is dynamic, no SQL data table design dynamic DB only consider our primary case which is our the
partition and sort K and not interested in other attributes so we can dynamically change other attributes
as we requested.
So we have created two item.
Let me create an item again.
So we have created two item which is to divorce with the same parties in K, which is the authorized
one, but the attributes are differentiated, but the primary key is the composite k.
You can see that primary K is combination of the ID and status.
This is the partition key and the sort k sort k is a status.
So we can create two items with the same primary k because our primary key is combination of a partition
and the sort K primary K cannot be the same with these two items in the table.
So that means these two values, the combination of these ID and status should be unique in our table.
Otherwise this will not be a flow from the dynamic.
DB For example, if you create a new item with ID is the one and such is also delivery, we have an
item with exactly the same combination.
If you click the create item is you can see that the combination request failed.
An item with the primary k you provided already exist.
So we should provide these two values.
Unique identifier.
Okay.
Very good.
Here is the our table items which we have.
Just create those items.
By the way, all these things that I am doing on the console can be developed by the programmatic bit
using the AdWords SDK libraries.
We will also develop in our applications.
So it is important to understand how we can perform all these operations on a measurement console.
So now we can perform some operations on this table.
We have two options scan and query items.
So as you can see that we have learned how to write an item in terms of dynamic DB table with using
the measurement console.
So in the next video, we are going to focus on the data from a table.