WEBVTT 00:00.610 --> 00:01.170 Hey guys. 00:01.180 --> 00:03.430 Welcome back to our in that application. 00:03.430 --> 00:07.040 I hope by now you are familiar with database and school queries. 00:07.150 --> 00:09.220 We need to perform four important queries. 00:09.280 --> 00:16.690 That is insert a bit delete and fetch data so I'll be performing that on our calendar application. 00:16.690 --> 00:22.090 First thing we need to do is we need to change this list and missionary type into a database. 00:22.510 --> 00:27.340 So we need to connect our Esquire database with our content application. 00:27.340 --> 00:30.400 For that we need to start with importing lot of school. 00:30.640 --> 00:34.590 Then creating our database then creating our table. 00:34.690 --> 00:36.430 And then we need to move further. 00:36.910 --> 00:38.320 So let us get started. 00:38.320 --> 00:41.940 The first step is to import our school library. 00:41.980 --> 00:44.710 Once that is done we need to connect with our database. 00:44.710 --> 00:50.320 So let me take a variable corn and then it's green light 3 connect and I would be taking my database 00:50.320 --> 00:52.430 name as kind or Beebe. 00:52.630 --> 00:55.770 Then with the help of corn I need to create a cards an object. 00:55.780 --> 00:59.740 I wouldn't be calling a task outside of Egypt once that is done. 00:59.770 --> 01:00.850 We are in good shape. 01:01.220 --> 01:03.470 And remember once were important as school. 01:03.470 --> 01:07.970 Once you have created a connection with your database don't forget to add close statement. 01:08.230 --> 01:14.070 So just scroll down at the last update loop and you need to close your database connection. 01:14.140 --> 01:16.450 So just use your cursor object and close. 01:16.580 --> 01:18.370 And also you need to close your connection. 01:18.370 --> 01:23.270 That would be corn if I may add this quite important and don't forget to execute both of them. 01:23.680 --> 01:29.350 So if I run this particular file right now I would be going to get or Bebe in my file attic tree. 01:29.380 --> 01:30.990 That is my bike rental. 01:31.060 --> 01:31.960 Let me run this one. 01:36.170 --> 01:41.750 You can do your application is running fine and you can also see I gotta point out Bebe which is currently 01:41.750 --> 01:42.610 empty. 01:42.770 --> 01:46.640 So I just need to shift all this data into my kind of baby. 01:46.700 --> 01:50.020 The first thing is what data we need to extract from database. 01:50.450 --> 01:58.070 So we need to store kind name price number of coin on and we'll be creating I.T. so all the data which 01:58.070 --> 02:04.070 are currently present in our additionally and list we need to shift deck rest all the data we are calculating 02:04.130 --> 02:05.100 by our formula. 02:05.120 --> 02:11.870 My logic so if I talk about total amount current price profit and loss everything is calculated with 02:11.870 --> 02:12.380 logic. 02:12.980 --> 02:20.360 All I need is these two data I do so that would be quite simple I just need to execute creative equity. 02:20.570 --> 02:23.870 So what I need to use is my castle object then execute. 02:23.870 --> 02:25.890 Come on and then I need to write. 02:25.940 --> 02:29.500 Create table if not exist my table name. 02:29.540 --> 02:36.350 I would be using coin and then I need to parse these for column my first column will be I.T. which will 02:36.350 --> 02:39.640 be an integer and I would be assigning a primary key. 02:39.680 --> 02:43.790 Second will be my symbol and I would be assigning it as a text. 02:43.820 --> 02:50.420 Then the third would be amount I would be assigning or does integer and then rise and I would be assigning 02:50.570 --> 02:53.150 real This looks fine to me. 02:53.160 --> 02:57.430 We are going to have a coin table in which we are going to have these several items. 02:57.480 --> 03:01.970 And don't forget to commit all the execution that you are doing along with our database. 03:02.070 --> 03:07.210 The next thing we are going to do is we are going to replace all our current data with our database 03:07.250 --> 03:10.450 data are not currently our database will be empty. 03:10.500 --> 03:11.190 So let me. 03:11.220 --> 03:17.280 I mean it does let me use my console object then executed method and let me write my insert query that 03:17.280 --> 03:24.150 is insert into a coin then values and then all I need to pass these for Fields today is my column fields. 03:24.320 --> 03:31.620 I would be taking ideas 1 then symbolize the coin for BTC amount will be 2 and then price will be 2 03:31.620 --> 03:33.090 2 5 0 dollars. 03:33.090 --> 03:37.530 And don't forget to commit all the execution that you are doing along with their database. 03:37.650 --> 03:41.270 Once that is done let us run our program and add some dummy data 03:45.480 --> 03:46.420 things goes fine. 03:46.430 --> 03:49.790 Let me close this one and go back to my DV browser. 03:49.850 --> 03:52.130 Here you can see we have our data now. 03:52.210 --> 03:57.740 This is the data that is in our database and currently all our data which we are fetching is strong 03:57.850 --> 03:59.300 list and missionaries. 03:59.330 --> 04:01.890 So in the next lecture let us improve the system. 04:01.940 --> 04:07.160 We need to fetch data from our database and remove all this list an additional system are currently 04:07.160 --> 04:07.880 in this lecture. 04:07.880 --> 04:09.220 We executed some data. 04:09.530 --> 04:10.970 I read our dummy line. 04:11.300 --> 04:16.870 Let me remove this one and in the next lecture let us fix all this thing so see you in the next one.