1
00:00:00,470 --> 00:00:06,890
Hello and welcome to this new lesson and this lesson, you will learn how to prepare to use a secure

2
00:00:07,070 --> 00:00:12,770
database after signing up for a hosting account and setting up your domain name.

3
00:00:13,250 --> 00:00:16,880
You can log in, just like we explained in the previous lesson.

4
00:00:17,600 --> 00:00:20,720
Do you see panel or the similar dashboard?

5
00:00:21,710 --> 00:00:28,880
After that, you need to follow my steps to create your database, username, password and your actual

6
00:00:28,900 --> 00:00:29,260
table.

7
00:00:30,290 --> 00:00:34,070
Now, let's first create a database and a user.

8
00:00:34,790 --> 00:00:40,340
The first step is go to the tools section and select database manager.

9
00:00:42,950 --> 00:00:45,050
As you can see, this is the database manager.

10
00:00:45,200 --> 00:00:53,330
Just click new database, and here you need to enter your database name, database, user name and database

11
00:00:53,330 --> 00:00:53,930
passport.

12
00:00:55,550 --> 00:01:02,150
The first step that we need to do is choose your database name in our exam, but it will be ISP data

13
00:01:03,560 --> 00:01:06,110
because we are handling, yes, P32 data.

14
00:01:07,980 --> 00:01:12,780
Then we need to choose our password and our username.

15
00:01:13,170 --> 00:01:15,760
So let's call them now.

16
00:01:15,780 --> 00:01:19,510
I usually prefer choosing the database.

17
00:01:19,530 --> 00:01:22,950
Use our name wisely and make it relevant.

18
00:01:23,070 --> 00:01:27,630
Now our database username will be ESB board.

19
00:01:31,330 --> 00:01:33,910
And you should enter your password here.

20
00:01:34,150 --> 00:01:35,780
I will enter my bus home.

21
00:01:37,270 --> 00:01:38,920
And you should write it down.

22
00:01:39,640 --> 00:01:47,170
OK, but you need to make sure that you are using an uppercase letter and that your password is at least

23
00:01:47,620 --> 00:01:52,720
12 character long and include no special characters.

24
00:01:53,410 --> 00:01:57,820
So you can create that password or choose a random one.

25
00:01:58,330 --> 00:02:00,310
As you can see, it will create one for you.

26
00:02:01,030 --> 00:02:05,200
And you should take this information and save them.

27
00:02:06,320 --> 00:02:08,450
And art, not politics, bad.

28
00:02:09,480 --> 00:02:11,550
So here's not bad.

29
00:02:11,850 --> 00:02:16,730
What you need to do is copy their username bursted, copy the.

30
00:02:18,520 --> 00:02:22,570
Creating this database name, username and password.

31
00:02:24,750 --> 00:02:29,310
That's it now click Create after copying this information.

32
00:02:30,390 --> 00:02:32,040
OK, I don't want to save.

33
00:02:32,910 --> 00:02:40,050
OK, now here's our database and now it's creating the database, so you should wait a minute or two.

34
00:02:40,920 --> 00:02:43,500
That's the base element is one gigabyte.

35
00:02:43,980 --> 00:02:45,780
You kind of create up to 100 table.

36
00:02:45,780 --> 00:02:49,980
We only need one table and this is more than enough again for testing.

37
00:02:50,250 --> 00:02:53,550
You can create two databases using the free hosting.

38
00:02:54,090 --> 00:03:00,150
So I think it's a very good way to start this thing.

39
00:03:04,640 --> 00:03:05,660
Shouldn't take long.

40
00:03:06,440 --> 00:03:09,710
Now you can use localhost as a connection hostname.

41
00:03:12,030 --> 00:03:18,900
And you can copy this information and place them in the note that you created earlier.

42
00:03:22,710 --> 00:03:29,040
OK, now that we created this, the base, what you need to do is create the basketball table, click

43
00:03:29,040 --> 00:03:32,220
here and go to HP my admin.

44
00:03:32,700 --> 00:03:39,810
You can treat us a base or change a password or see the statistics from these two lines.

45
00:03:40,170 --> 00:03:42,210
Just click phpMyAdmin.

46
00:03:46,580 --> 00:03:49,220
And you will be redirected to this window.

47
00:03:49,580 --> 00:03:58,280
This is the PSP, my administer very famous interface to control your database and create tables, delete

48
00:03:58,280 --> 00:04:00,790
tables, create queries and other stuff.

49
00:04:01,420 --> 00:04:08,780
Now, creating that skill base is the second step after creating your database and username.

50
00:04:09,950 --> 00:04:18,050
What you need to do is go to the left side of this database, as you can see, and this will be your

51
00:04:18,050 --> 00:04:19,100
database name.

52
00:04:19,490 --> 00:04:26,990
Now, usually we did name it speed data, but they don't give you, let's say, access to this name,

53
00:04:27,410 --> 00:04:29,470
so they add an I.D. before it.

54
00:04:29,480 --> 00:04:31,730
So this is our database name.

55
00:04:32,780 --> 00:04:34,010
Now you need to click it.

56
00:04:35,640 --> 00:04:38,520
And once you click it, you have access to a database.

57
00:04:39,450 --> 00:04:43,410
You need to go and click on the Ask tab.

58
00:04:44,810 --> 00:04:53,810
This assault top will help us create our table and make sure we have open the database that you have

59
00:04:53,810 --> 00:04:54,530
created.

60
00:04:54,830 --> 00:04:56,900
Then click the built up.

61
00:04:57,230 --> 00:05:05,030
If you haven't selected this database and click the top, it will take you to a new or general database

62
00:05:05,240 --> 00:05:11,150
that you don't have control over if you don't follow these exact steps and run the school query.

63
00:05:11,450 --> 00:05:16,820
You might create a table in the wrong database now to create that query.

64
00:05:17,830 --> 00:05:25,410
A query is basically in billions of codes that you execute using this window.

65
00:05:25,430 --> 00:05:30,770
You will paste them here, and once you click go, it will execute this query.

66
00:05:31,250 --> 00:05:39,860
And this query will create the columns of our table and will create a new table for us with the name

67
00:05:39,870 --> 00:05:43,190
that we do choose now to create that query.

68
00:05:43,430 --> 00:05:46,520
You need to do the following looking newswoman.

69
00:05:48,570 --> 00:05:55,350
The first step is right, create and as you can see, it's recognizing and choose stable table, then

70
00:05:56,220 --> 00:06:05,220
sensor data or any other thing, you can't simply write this or ISP data.

71
00:06:06,180 --> 00:06:11,100
Then you need to open and close to parentheses.

72
00:06:11,670 --> 00:06:14,670
Now you need to write your query in between.

73
00:06:15,210 --> 00:06:23,790
Now this will write the ISP data, which is basically creating a new table and naming it ISP data.

74
00:06:24,570 --> 00:06:32,610
The next step will be is create the columns inside this table.

75
00:06:33,060 --> 00:06:35,430
The first step is creating the idea column.

76
00:06:35,980 --> 00:06:39,150
It's a it's a very common one that will be end.

77
00:06:39,930 --> 00:06:45,630
And let's make it six now to be unsigned.

78
00:06:45,840 --> 00:06:51,780
So like unsigned and so I auto increment.

79
00:06:51,780 --> 00:06:53,160
We need it to auto increment.

80
00:06:53,160 --> 00:06:58,530
We don't need to enter it manually and choose the primary key.

81
00:06:59,010 --> 00:07:01,260
So it would be the primary care for our table.

82
00:07:01,740 --> 00:07:08,150
This is a school, uh, database query.

83
00:07:08,160 --> 00:07:10,310
So if you are not familiar with it, it's OK.

84
00:07:10,320 --> 00:07:16,320
You can just copy and paste the code that I will provide for you and the resource of the lecture of

85
00:07:16,320 --> 00:07:16,980
this section.

86
00:07:17,640 --> 00:07:19,290
So no worries.

87
00:07:19,290 --> 00:07:28,830
If you don't understand what I'm doing at this point now, I will paste the lines and then I will explain

88
00:07:28,830 --> 00:07:33,180
them to you so that we won't waste time creating a school.

89
00:07:34,320 --> 00:07:38,460
Next, we we need to create, let's say, value one.

90
00:07:42,950 --> 00:07:45,890
And we make it far character.

91
00:07:49,090 --> 00:07:50,700
Let's give it our first.

92
00:07:52,200 --> 00:07:56,570
And make sure that it's recognized as not not okay.

93
00:07:59,910 --> 00:08:09,480
Now this needs to be 13, not 10 and unsigned here, has a headline underneath it because, OK, let's

94
00:08:09,480 --> 00:08:14,190
make this 10 because we misspelled it, OK?

95
00:08:14,460 --> 00:08:15,600
And sign.

96
00:08:19,010 --> 00:08:20,030
Signed.

97
00:08:20,180 --> 00:08:20,620
OK.

98
00:08:23,070 --> 00:08:25,650
Now everything's OK, now, let's move on.

99
00:08:25,680 --> 00:08:27,900
We need to create other variables as well.

100
00:08:29,760 --> 00:08:34,290
The second one is called value to a third one.

101
00:08:34,290 --> 00:08:39,180
We can call it value three, depending on how many values we need to create.

102
00:08:39,360 --> 00:08:43,050
We can create other values as well as we go with this code.

103
00:08:43,920 --> 00:08:45,750
Now the next step will be.

104
00:08:47,340 --> 00:09:03,720
Adding a timestamp, so let's add the reading time and make a time stamp default and choose current

105
00:09:03,720 --> 00:09:04,140
time.

106
00:09:05,290 --> 00:09:10,720
Stand on update, call on time stamp.

107
00:09:12,700 --> 00:09:19,090
This one makes sure that we have a column that will put in the time at which these values were received.

108
00:09:20,940 --> 00:09:27,660
Now, the next step is creating other variables, if we if we need, we can create a variable and call

109
00:09:27,660 --> 00:09:33,660
it sensor, so it will be sensor data.

110
00:09:35,650 --> 00:09:38,560
And it will be very variable character.

111
00:09:40,930 --> 00:09:52,660
And let's give it a value of 10 or let's make it 30 and make sure that it's not lost.

112
00:09:55,720 --> 00:09:57,010
We can't commit the same.

113
00:09:57,980 --> 00:10:05,390
And based it here to create another variable and let's call it location data.

114
00:10:10,560 --> 00:10:11,090
OK.

115
00:10:11,130 --> 00:10:13,860
Location data variable shot Thursday, not null.

116
00:10:14,670 --> 00:10:15,210
That's it.

117
00:10:15,630 --> 00:10:18,090
Now let's review what we have done here.

118
00:10:18,510 --> 00:10:21,170
We created that table and named it Yes, B data.

119
00:10:21,180 --> 00:10:22,350
You can change this name.

120
00:10:22,800 --> 00:10:26,060
We created an I.D. which will auto increment.

121
00:10:26,070 --> 00:10:28,280
It's basically the idea of the table.

122
00:10:28,290 --> 00:10:32,370
It will be one two three four five and will keep increasing.

123
00:10:33,150 --> 00:10:37,830
It's the primary key that we are going to use to access any of these values.

124
00:10:38,310 --> 00:10:45,240
Now we have created a character named since data and other character named location data.

125
00:10:45,450 --> 00:10:49,350
We created value one two three to pass other values.

126
00:10:49,350 --> 00:10:54,300
If we want, we can leave them to be zeros or we can pass data.

127
00:10:54,810 --> 00:10:57,570
So these are basically variable creation.

128
00:10:58,230 --> 00:11:03,810
Now here we are, creating a timestamp whenever we create or send a nuisance or data.

129
00:11:04,080 --> 00:11:08,070
It will print out the time at which this sense of data was sent.

130
00:11:08,580 --> 00:11:09,690
That's it for this lesson.

131
00:11:09,720 --> 00:11:10,560
Thanks for watching.

132
00:11:11,040 --> 00:11:14,520
This is Ashraf from educational engineering team.

133
00:11:15,870 --> 00:11:22,590
Now, before moving on, we need to click the goal button to create this table, and it will take some

134
00:11:22,590 --> 00:11:28,600
minutes, as you can see, my car returned, an empty result resulted, which is zero.

135
00:11:29,490 --> 00:11:33,150
And as you can see now, this is our database and this is our table.

136
00:11:33,480 --> 00:11:40,200
If you clicked once on your table, you can see that you have I.D. sensor data, location data value

137
00:11:40,200 --> 00:11:44,220
one, value two, value three and reading time.

138
00:11:44,550 --> 00:11:46,090
So that's it.

139
00:11:46,140 --> 00:11:48,660
This is our table and these are all columns.

140
00:11:49,020 --> 00:11:55,020
If you gave this matches and you got this, this result, it means that you have done everything correctly.

141
00:11:55,920 --> 00:12:02,400
If you have any problem or if you faced any problem, please do ask you on a board and we have to help

142
00:12:02,400 --> 00:12:02,700
you.

143
00:12:03,030 --> 00:12:05,760
This is Ashraf from educational engineering team.
