WEBVTT 00:00.300 --> 00:00.870 Welcome back. 00:00.870 --> 00:05.490 Now let us convert everything into some functions and play with some parameter. 00:05.970 --> 00:12.450 So if I want to create some table so instead of using this particular table command I can also use CREATE 00:12.450 --> 00:15.940 TABLE IF NOT exist and then the table name. 00:16.080 --> 00:18.380 So I don't need to commit this one. 00:18.390 --> 00:21.580 So if this table is created then I don't have to worry. 00:21.630 --> 00:24.570 And this dribble is not created so our program. 00:24.570 --> 00:29.680 That is our query is going to create a table with all the requirements that we have past. 00:29.700 --> 00:31.020 So I just need to use. 00:31.020 --> 00:33.720 CREATE TABLE IF NOT exist. 00:33.720 --> 00:34.290 That's all. 00:34.300 --> 00:35.030 So this is done. 00:35.040 --> 00:38.720 So I don't have to mess with this line anytime in future. 00:38.760 --> 00:41.340 The next thing is if I want to insert anything. 00:41.520 --> 00:43.220 So let me create a function. 00:43.240 --> 00:49.190 Nicole this one as insert value or add value or maybe add imply something like that. 00:49.350 --> 00:51.240 So you can use any of your name. 00:51.430 --> 00:58.650 And let me come in these and instead of these values what I can do is I can take these parameters so 00:58.650 --> 01:06.420 I can take IDI Name Salary Department position and instead of these values I can just pass these parameters 01:06.840 --> 01:08.810 that would solve my problem. 01:08.830 --> 01:10.120 So this looks fine. 01:10.130 --> 01:15.370 Now the second thing is if I want to update anything so far currently let me suppose I want to update 01:15.420 --> 01:18.870 department so I can create a function to update department. 01:19.380 --> 01:26.800 So let me create that also uncommon these values and here I can simply take out parameters so I would 01:26.800 --> 01:29.800 be using them and simply parse this one here. 01:30.280 --> 01:35.570 I will also need I need to specify that that's done. 01:35.610 --> 01:41.160 Now if I want to delete something or if I want to fetch some data I can simply create a function regarding 01:41.160 --> 01:46.750 that would be taking function name as a school fetch 01:50.150 --> 01:51.880 and put them inside. 01:51.890 --> 01:55.130 Now here is the thing I am currently passing some specific column. 01:55.250 --> 02:02.470 Let me use all and also remove my condition so it could return me everything that is inside my database. 02:02.540 --> 02:08.210 You can also create functions specifically according to a requirement that is for your condition like 02:08.210 --> 02:09.450 we are doing for body. 02:09.620 --> 02:11.180 Now the next thing is to delete. 02:11.990 --> 02:13.580 So let me create a function. 02:13.650 --> 02:21.170 So I would be taking it as delete on I suppose I need to insert some value in my database what I can 02:21.170 --> 02:28.220 do is I can just call this function pass out my I.D. I would be taking it as one then if I need to pass 02:28.220 --> 02:34.480 out my name I would call it that some salary maybe as eighty thousand then department maybe a spy it 02:34.490 --> 02:42.900 on and then position as developer if I run this one you can see I haven't got any error and let me go 02:42.900 --> 02:48.530 back to my database hey you can see out my design so that I work and it worked really well. 02:48.870 --> 02:52.860 And if I want to delete anything or I have to is use my delete all game on 02:57.030 --> 03:05.620 me done this one again the flesh out my database that's done so had the reference of function I am talking 03:05.620 --> 03:11.230 about this just because in our counter application or in any adult application that you are working 03:11.500 --> 03:13.670 you are going to create functions like this. 03:13.780 --> 03:16.840 So this solve a lot of our problem. 03:16.840 --> 03:23.680 I hope this session was helpful regarding the basics of database also a school database from our next 03:23.680 --> 03:30.320 lecture we'll be talking about that as well as a school like database and how to create connectivity. 03:30.610 --> 03:35.980 I hope the series was helpful soon the next one and let us start working again on our content application.