1
00:00:00,270 --> 00:00:07,440
In this video, we are going to write an item into Amazon with the table bit using a management console.

2
00:00:08,330 --> 00:00:12,920
We can open the door with this management console and go to tables and go to order table.

3
00:00:13,520 --> 00:00:19,910
And in the navigation pane, on the left hand side, you can see the tables and come here, come to

4
00:00:19,910 --> 00:00:26,480
the order table and you can see that these orange box, which is the go to explore table items page,

5
00:00:26,750 --> 00:00:33,730
please click this button, explore table items and you can see that this page has two main parts.

6
00:00:33,740 --> 00:00:39,740
One is this you can create items, and the second one is the items that we've seen in the table.

7
00:00:40,040 --> 00:00:46,700
Okay, so before this, we should create items into our order table for that purpose.

8
00:00:46,700 --> 00:00:48,140
Let's create an item.

9
00:00:48,140 --> 00:00:51,380
You can see in here there's a create item button, please.

10
00:00:51,410 --> 00:00:57,950
Christie's click this button, create item and see that we can create items in this window.

11
00:00:57,980 --> 00:01:05,030
It comes with the default form selection, but if you come here and select the JSON one, you can see

12
00:01:05,030 --> 00:01:08,780
that this can be also seen the JSON format.

13
00:01:08,780 --> 00:01:15,860
And if you enable the dynamic JSON, we can see that this time you will see this is character, this

14
00:01:15,860 --> 00:01:22,580
is the view of dynamic DB JSON and that means has included data types like S means string.

15
00:01:22,580 --> 00:01:29,570
If there is a N and means number, we can close data type which is ready button and see default column

16
00:01:29,570 --> 00:01:30,740
and attribute names.

17
00:01:30,740 --> 00:01:35,810
And if you come back to form section, you can see that we can easily add new item with using the add

18
00:01:36,170 --> 00:01:38,750
management console in the form selection.

19
00:01:38,960 --> 00:01:48,320
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

20
00:01:48,320 --> 00:01:49,670
as a in progress.

21
00:01:49,910 --> 00:01:53,150
So now we can also add new attributes.

22
00:01:53,240 --> 00:01:56,600
You can see in here we can add a new attribute.

23
00:01:56,600 --> 00:02:02,780
If you click this button, you can see different types of the data types that we can insert dynamo DB

24
00:02:02,780 --> 00:02:03,440
attributes.

25
00:02:03,440 --> 00:02:10,370
So I'm going to use setting, but so we can specify any different attribute types when creating a new

26
00:02:10,370 --> 00:02:10,850
item.

27
00:02:10,850 --> 00:02:17,750
So this is fully dynamic table item creation that we can also provide custom JSON object into our table

28
00:02:17,750 --> 00:02:18,950
item definition.

29
00:02:19,190 --> 00:02:25,850
So let me add a new string value for now, the attribute should be the description.

30
00:02:26,000 --> 00:02:30,170
So I'm going to add a description as a hyphen order.

31
00:02:30,170 --> 00:02:35,870
So I would like to also add a new attribute, which is the order date.

32
00:02:36,110 --> 00:02:37,550
So I'm going to.

33
00:02:38,420 --> 00:02:39,000
Is it?

34
00:02:39,780 --> 00:02:40,630
Or do date.

35
00:02:41,450 --> 00:02:43,850
And the value is.

36
00:02:47,790 --> 00:02:48,830
I think in here.

37
00:02:50,260 --> 00:02:50,950
Okay.

38
00:02:51,250 --> 00:02:53,530
Now I'm going to click the create item.

39
00:02:53,740 --> 00:02:57,880
So we have successfully added one item into our table.

40
00:02:57,910 --> 00:03:03,840
If you create item again, I'm going to add a new item and this time I'm going to add the same parts

41
00:03:03,850 --> 00:03:05,050
in K, which is the one.

42
00:03:05,050 --> 00:03:10,980
But the status should be different because parameter K is both of them combining ID and status.

43
00:03:10,990 --> 00:03:13,180
So that Y status is delivery.

44
00:03:13,330 --> 00:03:16,060
And I'm going to add a new attribute this time.

45
00:03:16,060 --> 00:03:18,220
I'm going to add a total price.

46
00:03:20,250 --> 00:03:21,450
And set.

47
00:03:23,280 --> 00:03:24,240
5000.

48
00:03:24,450 --> 00:03:29,490
As you can see, that we have set different data types for different items into our order table.

49
00:03:29,520 --> 00:03:35,640
It is dynamic, no SQL data table design dynamic DB only consider our primary case which is our the

50
00:03:35,640 --> 00:03:41,850
partition and sort K and not interested in other attributes so we can dynamically change other attributes

51
00:03:41,880 --> 00:03:43,560
as we requested.

52
00:03:43,560 --> 00:03:46,050
So we have created two item.

53
00:03:46,080 --> 00:03:48,360
Let me create an item again.

54
00:03:49,290 --> 00:03:54,850
So we have created two item which is to divorce with the same parties in K, which is the authorized

55
00:03:54,870 --> 00:04:00,240
one, but the attributes are differentiated, but the primary key is the composite k.

56
00:04:00,260 --> 00:04:05,090
You can see that primary K is combination of the ID and status.

57
00:04:05,160 --> 00:04:08,380
This is the partition key and the sort k sort k is a status.

58
00:04:08,400 --> 00:04:14,130
So we can create two items with the same primary k because our primary key is combination of a partition

59
00:04:14,130 --> 00:04:20,030
and the sort K primary K cannot be the same with these two items in the table.

60
00:04:20,040 --> 00:04:28,380
So that means these two values, the combination of these ID and status should be unique in our table.

61
00:04:28,590 --> 00:04:32,040
Otherwise this will not be a flow from the dynamic.

62
00:04:32,040 --> 00:04:39,570
DB For example, if you create a new item with ID is the one and such is also delivery, we have an

63
00:04:39,570 --> 00:04:42,360
item with exactly the same combination.

64
00:04:42,360 --> 00:04:46,500
If you click the create item is you can see that the combination request failed.

65
00:04:46,500 --> 00:04:49,890
An item with the primary k you provided already exist.

66
00:04:50,070 --> 00:04:53,040
So we should provide these two values.

67
00:04:53,040 --> 00:04:54,330
Unique identifier.

68
00:04:54,570 --> 00:04:55,050
Okay.

69
00:04:55,050 --> 00:04:55,710
Very good.

70
00:04:55,740 --> 00:04:58,290
Here is the our table items which we have.

71
00:04:58,290 --> 00:05:00,060
Just create those items.

72
00:05:00,060 --> 00:05:05,250
By the way, all these things that I am doing on the console can be developed by the programmatic bit

73
00:05:05,250 --> 00:05:07,520
using the AdWords SDK libraries.

74
00:05:07,530 --> 00:05:09,840
We will also develop in our applications.

75
00:05:09,840 --> 00:05:15,740
So it is important to understand how we can perform all these operations on a measurement console.

76
00:05:15,750 --> 00:05:19,830
So now we can perform some operations on this table.

77
00:05:19,860 --> 00:05:23,880
We have two options scan and query items.

78
00:05:23,880 --> 00:05:30,360
So as you can see that we have learned how to write an item in terms of dynamic DB table with using

79
00:05:30,370 --> 00:05:31,860
the measurement console.

80
00:05:31,860 --> 00:05:35,610
So in the next video, we are going to focus on the data from a table.
