1 00:00:00,440 --> 00:00:06,870 Hello and welcome to the simulation and this lesson, you will learn how to prepare yourself a secure 2 00:00:07,070 --> 00:00:12,810 database after signing up for a hosting account and setting up your domain name. 3 00:00:13,250 --> 00:00:20,750 You can log in just like we explained in the previous lesson to your panel or the similar dashboard. 4 00:00:21,710 --> 00:00:28,910 After that, you need to follow my steps to create your database username, password and your Ezekial 5 00:00:28,910 --> 00:00:29,300 table. 6 00:00:30,290 --> 00:00:34,100 Now let's first create a database and a user. 7 00:00:34,790 --> 00:00:40,370 The first step is go to the tools section and select a database manager. 8 00:00:42,920 --> 00:00:48,850 As you can see, this is the database manager, just click a new database, and here you need to enter 9 00:00:48,950 --> 00:00:53,990 your database name and database user name and database password. 10 00:00:55,550 --> 00:01:02,150 The first step that we need to do is choose your database name and our example, it will be E.S.P data 11 00:01:03,560 --> 00:01:06,140 because we are handling E.S.P 32 data. 12 00:01:08,010 --> 00:01:12,790 Then we need to choose our password and our username. 13 00:01:13,140 --> 00:01:22,960 So let's call them now, I usually prefer choosing the database username name wisely and make it relevant. 14 00:01:23,070 --> 00:01:27,660 Now, our database username will be E.S.P board. 15 00:01:31,300 --> 00:01:33,950 And you should enter your password here. 16 00:01:34,090 --> 00:01:39,050 I will enter my password and you should write it down. 17 00:01:39,690 --> 00:01:47,230 OK, but you need to make sure that you are using an uppercase letter and that your password is at least 18 00:01:47,620 --> 00:01:52,780 12 character long and include no special characters. 19 00:01:53,380 --> 00:01:57,850 So you can create that password or choose a random one. 20 00:01:58,300 --> 00:02:05,200 As you can see, it will create one for you and you should take this information and save them. 21 00:02:06,290 --> 00:02:08,480 In art, not politics bad. 22 00:02:09,480 --> 00:02:16,770 So here's not bad, what you need to do is copy the username best it could be the. 23 00:02:18,840 --> 00:02:22,600 So that's the best name, username and password. 24 00:02:24,720 --> 00:02:29,340 That's it now click create after copying this information. 25 00:02:30,430 --> 00:02:32,290 Hey, I don't want to save. 26 00:02:32,890 --> 00:02:37,410 OK, now here's our database and now it's creating the database. 27 00:02:37,410 --> 00:02:40,050 So you should wait a minute or two. 28 00:02:40,920 --> 00:02:45,810 The database limit is one gigabyte and you can create up to 100 table. 29 00:02:45,810 --> 00:02:47,010 We only need one table. 30 00:02:47,010 --> 00:02:49,970 And this is more than enough again for testing. 31 00:02:50,220 --> 00:02:53,570 You can create two databases using the free hosting. 32 00:02:54,060 --> 00:03:00,180 So I think it's a very good way to start testing. 33 00:03:04,600 --> 00:03:05,660 It shouldn't take long. 34 00:03:06,440 --> 00:03:09,740 Now you can use localhost as a condition hostname. 35 00:03:11,970 --> 00:03:18,920 And you can copy this information and placed them in the notepad that you created earlier. 36 00:03:22,620 --> 00:03:30,880 OK, now that we created this is what you need to do is create a skill table, click here and go to 37 00:03:31,140 --> 00:03:38,490 HP, my admin, you can delete the space or change your password or see the statistics from these two 38 00:03:39,240 --> 00:03:39,870 lines. 39 00:03:40,170 --> 00:03:42,240 Just click through my admin. 40 00:03:46,520 --> 00:03:54,540 And you'll be redirected to this window, and this is the PSAP, my advents, a very famous interface 41 00:03:54,540 --> 00:04:00,830 to control your database and create tables, delete tables, create queries and other stuff. 42 00:04:01,340 --> 00:04:05,990 Now, creating the actual data base is the second step. 43 00:04:05,990 --> 00:04:15,410 After creating your database and using what you need to do is go to the left side of this database, 44 00:04:15,420 --> 00:04:19,100 as you can see, and this will be your database name. 45 00:04:19,460 --> 00:04:27,020 Now, usually we did name E.S.P data, but they don't give you, let's say, access to this name. 46 00:04:27,380 --> 00:04:29,430 So they add an idea before. 47 00:04:29,490 --> 00:04:31,730 So this is our database name. 48 00:04:32,780 --> 00:04:34,040 Now you need to click it. 49 00:04:35,610 --> 00:04:43,500 And once you click it, you have access to your database, you need to go and click on the actual tab. 50 00:04:44,810 --> 00:04:53,840 This is Hilltop will help us create our table and make sure we have open the database that you have 51 00:04:53,840 --> 00:04:56,930 created, then click the asphalt up. 52 00:04:57,200 --> 00:05:04,430 If you haven't selected this database and click the actual tab, it will take you to a new or a general 53 00:05:04,430 --> 00:05:06,880 database that you don't have control over. 54 00:05:07,460 --> 00:05:13,460 If you don't follow these exact steps and run the actual query, you might create a table in the wrong 55 00:05:13,460 --> 00:05:14,120 database. 56 00:05:15,080 --> 00:05:25,350 Now, to create the query, query is basically a simple lines of code that you execute using this window. 57 00:05:25,460 --> 00:05:33,110 You will paste them here and once you click go, it will execute this query and this query will create 58 00:05:33,320 --> 00:05:41,030 the columns of our table and will create a new table for us with the name that we do choose. 59 00:05:41,660 --> 00:05:45,440 Now to create that query, you need to do the following. 60 00:05:45,690 --> 00:05:46,520 Look, Muscleman. 61 00:05:48,570 --> 00:05:58,590 The first step is try to create and as you can see, it's recognizing and trustable then sensor data 62 00:05:58,710 --> 00:06:11,120 or any other thing, you can simply write S or E.S.P data, then you need to open and close to parentheses. 63 00:06:11,700 --> 00:06:14,680 Now you need to write your query in between. 64 00:06:15,210 --> 00:06:23,830 Now, this will write the E.S.P data, which is basically creating a new table and naming it E.S.P data. 65 00:06:24,540 --> 00:06:32,610 The next step will be is I create the columns inside this table. 66 00:06:33,010 --> 00:06:35,430 The first step is creating the idea column. 67 00:06:36,360 --> 00:06:39,210 It's a very common one that will be end. 68 00:06:39,870 --> 00:06:51,810 And let's make it six now to be unsigned, so left unsigned and so I auto increment. 69 00:06:51,810 --> 00:06:53,180 We needed to increment. 70 00:06:53,190 --> 00:06:58,510 We don't need to enter it manually and choose primary key. 71 00:06:59,010 --> 00:07:01,260 So it will be the primary key for our table. 72 00:07:01,740 --> 00:07:04,080 This is a secure UL 73 00:07:06,450 --> 00:07:10,320 database query, so if you are not familiar with it, it's OK. 74 00:07:10,350 --> 00:07:16,990 You can just copy and paste the code that I will provide for you in the resources lecture of this section. 75 00:07:17,640 --> 00:07:19,290 So no worries. 76 00:07:19,290 --> 00:07:28,860 If you don't understand what I'm doing at this point now, I will paste the lines and then I will explain 77 00:07:28,860 --> 00:07:33,180 them to you so that we won't waste time creating a circle. 78 00:07:34,320 --> 00:07:38,490 Next, we we need to create, let's say, value one. 79 00:07:42,890 --> 00:07:45,950 And we make it far character. 80 00:07:49,120 --> 00:07:51,000 Let's give it our first. 81 00:07:52,170 --> 00:07:56,160 And make sure that it's recognized as not normal. 82 00:07:56,330 --> 00:07:56,580 OK. 83 00:07:59,850 --> 00:08:09,510 Now, this needs to be 30, not 10 and unsigned here has a red line underneath it because, OK, let's 84 00:08:09,510 --> 00:08:15,600 make this stem because we misspelled it, OK, and sign. 85 00:08:18,980 --> 00:08:20,630 Signed, OK? 86 00:08:23,040 --> 00:08:27,900 Now everything's OK, now let's move on, we need to create other variables as well. 87 00:08:29,700 --> 00:08:34,320 The second one is called value to a third one. 88 00:08:34,320 --> 00:08:39,210 We can call it value three, depending on how many values we need to create. 89 00:08:39,360 --> 00:08:43,060 We can create other values as well as we go with this code. 90 00:08:43,920 --> 00:08:45,780 Now, the next step will be. 91 00:08:47,370 --> 00:09:04,170 Adding a timestamp, so let's add reading time and make a time stamp default and choose current time. 92 00:09:05,230 --> 00:09:10,810 Stand on update on timestamped. 93 00:09:12,670 --> 00:09:19,120 This will make sure that we have a column that will print the time at which these values were received. 94 00:09:20,940 --> 00:09:27,690 Now, the next step is creating other variables, if we if we need, we can create a variable and call 95 00:09:27,780 --> 00:09:33,710 sensor so it will be sensor data. 96 00:09:35,590 --> 00:09:49,900 And it will be very variable character and let's give it a value of 10 or let's make it 30 and make 97 00:09:49,900 --> 00:09:52,670 sure that it's not not. 98 00:09:55,720 --> 00:09:57,040 We can be the same. 99 00:09:57,920 --> 00:10:05,420 And based it here to create another variable and let's call it location data. 100 00:10:10,530 --> 00:10:13,860 OK, location data available shot 30 Natnael. 101 00:10:14,670 --> 00:10:15,240 That's it. 102 00:10:15,600 --> 00:10:18,120 Now let's review what we have done here. 103 00:10:18,510 --> 00:10:21,180 We created a table and named it E.S.P data. 104 00:10:21,210 --> 00:10:22,370 You can change this name. 105 00:10:22,800 --> 00:10:26,090 We created an I.D. which will auto increment. 106 00:10:26,100 --> 00:10:28,310 It's basically the idea of the table. 107 00:10:28,320 --> 00:10:32,400 It will be one, two, three, four, five and will keep increasing. 108 00:10:33,170 --> 00:10:37,840 It's the primary key that we are going to use to access any of these values. 109 00:10:38,280 --> 00:10:45,270 Now we have created a character named Census Data and another character named Location Data. 110 00:10:45,450 --> 00:10:49,380 We created value one to three to pass other values. 111 00:10:49,380 --> 00:10:54,330 If we want, we can leave them to be zeroes or we can pass data. 112 00:10:54,780 --> 00:10:57,570 So these are basically variable creation. 113 00:10:58,230 --> 00:11:01,200 Now here we are creating a timestamp. 114 00:11:01,200 --> 00:11:07,470 Whenever we create or send our new census data, it will print out the time at which this census data 115 00:11:07,470 --> 00:11:08,130 was sent. 116 00:11:08,580 --> 00:11:09,690 That's it for this lesson. 117 00:11:09,720 --> 00:11:10,590 Thanks for watching. 118 00:11:11,020 --> 00:11:14,550 This is Ashira from Educational Engineering Team. 119 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 a 120 00:11:22,590 --> 00:11:29,070 minute, as you can see, my security and an empty ResultSet, which is Xeros. 121 00:11:29,470 --> 00:11:33,180 And as you can see now, this is our database and this is our table. 122 00:11:33,450 --> 00:11:40,500 If you click once on your table, you can see that you have already since data location data value one 123 00:11:40,960 --> 00:11:44,250 value to value three and the reading time. 124 00:11:44,520 --> 00:11:46,140 So that's it. 125 00:11:46,170 --> 00:11:48,680 This is our table and these are all columns. 126 00:11:48,990 --> 00:11:55,050 If you got this smashers and you got this this result, it means that you have done everything correctly. 127 00:11:55,860 --> 00:12:01,430 If you have any problem or if you faced any problem, please do ask in the Q&A board. 128 00:12:01,620 --> 00:12:02,730 I'm here to help you. 129 00:12:03,030 --> 00:12:05,790 This is Ashara from educational engineering team.