WEBVTT 00:00.420 --> 00:01.310 Welcome back. 00:01.320 --> 00:07.200 Now in this lecture let us stop working on our table to create a table we need to use table query in 00:07.200 --> 00:10.740 the execute method with the help of our cursor object. 00:10.770 --> 00:16.130 We just need to use execute method and just call out our table query. 00:16.140 --> 00:23.910 Suppose we need to create employees table in which we are willing to take i.e. Name Salary Department 00:24.000 --> 00:26.810 position and maybe few other fields. 00:26.820 --> 00:32.240 So all I have to do is just use this castle object and then we need to use execute method. 00:32.710 --> 00:35.960 And inside this as a parameter we need to pass. 00:36.090 --> 00:41.010 CREATE TABLE equity create table and then the table name that is employees. 00:41.220 --> 00:42.440 And then I need to pass. 00:42.440 --> 00:44.480 Column name and then their data right. 00:44.910 --> 00:47.920 So I would be using I.T. As Integer. 00:48.060 --> 00:53.610 Because each employee should have an idea and I'm using a primary key with this keyword. 00:53.620 --> 00:57.230 I'm defining that this particular value as primary key. 00:57.240 --> 01:02.700 It cannot be duplicated and it would be unique for each and every individual entry. 01:02.790 --> 01:06.210 So that means I would never repeat itself. 01:06.240 --> 01:13.200 Then second quarter my mapping as name which is fixed then salary as year department sticks and then 01:13.200 --> 01:14.920 position sticks. 01:14.940 --> 01:17.630 So if I talk about different data types. 01:17.630 --> 01:25.620 So there are null integer clear text and blob null means there is no value in these are beyond no then 01:25.620 --> 01:28.290 real contains all the floating points. 01:28.290 --> 01:35.190 Text is basically string and then is for data that need to be stored maybe in some form of images and 01:35.190 --> 01:36.370 everything is. 01:36.390 --> 01:39.060 So these are five types that I am currently using. 01:39.900 --> 01:46.320 So what I've done is basically with the help of cursor I open a sheet and then I executed this program. 01:46.350 --> 01:47.920 Then I need to commit them. 01:47.940 --> 01:54.720 That means I need to save and modify my changes so all I have to lose I need to use my connection object 01:54.900 --> 01:56.220 and then use it. 01:56.550 --> 02:02.730 Remember whenever we are going to modify anything in our database we need to perform commit to execute 02:02.730 --> 02:08.840 will be perform on object of cursor and commit what we perform on object of connection. 02:08.850 --> 02:15.780 I hope this is clear now and currently we have an empty database in and then we only perform create 02:15.780 --> 02:16.770 table ones. 02:16.770 --> 02:23.430 That means that means if we have created a table defined all the rules we are not going to perform this 02:23.430 --> 02:29.490 create table every time what we have to do is maybe we are going to add new fields in that particular 02:29.490 --> 02:30.300 table. 02:30.300 --> 02:32.310 Maybe we are going to delete any field. 02:32.370 --> 02:37.890 Maybe we are going to update any field but we are not going to create a table every time it is created 02:37.890 --> 02:40.710 for the first time and it is going to remain team. 02:40.740 --> 02:43.970 These are just heading the remaining data we are going to use. 02:44.010 --> 02:47.220 Instead we are going to use update we are going to use delete. 02:47.460 --> 02:50.800 But this creation of table is only once. 02:50.820 --> 02:54.530 So let me run this program. 02:54.600 --> 02:57.070 I hope you just saw a blinker. 02:57.360 --> 03:03.840 If I need to check my database right now you need to check out our DB browser for a school like and 03:03.840 --> 03:08.520 after that you can radically open your database find in that DB browser. 03:08.520 --> 03:15.210 Once that is downloaded just open your browser for a school like and hey you can see it's currently 03:15.210 --> 03:15.660 empty. 03:15.660 --> 03:18.720 All I have to do is just add my database 03:23.750 --> 03:27.470 and you can see now I have a table that does employ people. 03:27.470 --> 03:36.310 If I open this one I have I.T. name Saturday Department position and I have also defined the fields. 03:36.330 --> 03:37.920 This looks fine. 03:37.920 --> 03:39.160 Let me browse data. 03:39.210 --> 03:43.480 It's currently empty so there is nothing in my current field. 03:43.620 --> 03:46.500 I have to insert data that that. 03:46.560 --> 03:52.350 I hope I understand about creating a table in the next lecture let us talk about creating data updating 03:52.350 --> 03:56.780 the time deleting data and also setting all the data from the database. 03:56.790 --> 03:58.260 Hope this lecture was helpful. 03:58.260 --> 03:59.520 See you in the next 1.