WEBVTT

00:00.690 --> 00:05.040
So all in advanced quite in four I'll teach.

00:05.480 --> 00:13.080
If you are it says there are different files but not my kind of files or what I need to do is maybe

00:13.080 --> 00:15.250
I'll change directory.

00:15.390 --> 00:27.330
Go back and go back or change directory to the colon.

00:40.490 --> 00:42.350
Right.

00:43.180 --> 00:44.200
OK.

00:45.300 --> 00:49.320
So you're allowing me to do that.

00:49.360 --> 00:51.860
It's quite ok.

00:51.860 --> 00:58.990
So what are you going to do is instead of creating the database out there in the OR in the same thing

00:58.990 --> 01:08.680
I can just put all you know I'll just put it in well that's quite weird though.

01:09.220 --> 01:10.940
And allow me to access

01:13.420 --> 01:20.010
OK anyway so I'm just going to put it in C colon.

01:20.800 --> 01:22.990
C colon slash

01:25.510 --> 01:28.450
slash school levy.

01:28.790 --> 01:32.570
Ari you know let's see if this works fine.

01:32.570 --> 01:39.400
Control Chip 10 unable to open data file OK.

01:39.470 --> 01:51.220
But Swannie create one colon or some database file isn't right.

01:51.280 --> 01:59.910
DE indeed quite some projects advance quite in priority databases.

01:59.930 --> 02:02.130
There is the database file.

02:02.330 --> 02:06.000
So why you might not opening.

02:06.130 --> 02:10.000
It's OK.

02:10.290 --> 02:17.910
So you fyce If I open up a terminal which is going to be quite algea

02:28.080 --> 02:31.570
OK so this is the virtual environment you're working in.

02:32.250 --> 02:45.560
Let's call so if I would open that in normal the saying it's a fight not terminal that's in the command

02:45.560 --> 02:46.290
prompt.

02:46.370 --> 02:50.280
I would say C D.

02:54.610 --> 02:59.120
OK.

03:03.070 --> 03:05.540
Cannot find the parts specified.

03:05.700 --> 03:07.880
OK so.

03:08.250 --> 03:14.680
So you open it up or let's read it directly using the program itself without having to go through the

03:14.680 --> 03:17.800
hassle of so screen or not creatures or like that.

03:17.920 --> 03:18.400
Right.

03:18.400 --> 03:26.770
So we created one school school that DV write that has already created all these tables all of them

03:26.770 --> 03:27.880
are already created.

03:27.880 --> 03:32.610
Now all I need to do is I need to read that now how why the right.

03:32.720 --> 03:34.660
How do we read from each of these databases.

03:34.660 --> 03:36.910
That's my major question.

03:37.180 --> 03:44.460
So this is all let me say in databases let me say a new quited file right there in sort of.

03:44.680 --> 03:51.820
So I'm going to see now reading from dieta beasts then you see reading from the texts now in reading

03:51.820 --> 03:59.000
from the Daviess what am I gonna say is I'm again going to put it up to your import again the same things

03:59.000 --> 04:06.010
simple escalatory right and create a connection

04:08.620 --> 04:09.970
with the database.

04:10.040 --> 04:18.900
That's school TV and whatever connection that I've created storing no cable connection.

04:18.940 --> 04:35.720
And from the connection create a curso and Diskos can be stored in a variable cursor cursor talks.

04:35.770 --> 04:42.580
Now I'm going to do execute right a query which is going to be what's going to be the query I want to

04:42.580 --> 04:55.840
query you know select select star from school.

04:55.840 --> 04:56.910
Correct.

04:57.010 --> 04:59.340
And so this is the query.

04:59.560 --> 05:03.340
Sorry I need to put it in a variable query in Oct.

05:03.550 --> 05:03.870
Right.

05:03.900 --> 05:11.170
So the Square-D and I just execute the query when I execute the query cursor or execute query that will

05:11.170 --> 05:13.150
return.

05:13.390 --> 05:14.930
Or just execute it.

05:15.070 --> 05:16.600
The result will be stored.

05:16.720 --> 05:21.720
To a cursor cursor docked fetch.

05:22.210 --> 05:32.170
If I do cursor or fetch all and whatever the fat shaming of that will be their end result if I print

05:32.560 --> 05:41.090
the cursor also sorry print the result in the result.

05:41.140 --> 05:43.870
Sorry all.

05:44.280 --> 05:57.890
And let me say print up close the connection connection dropped pulse rate close connection and that's

05:57.900 --> 06:00.430
after printing the results.

06:00.690 --> 06:03.350
So let's do that control should f 10.

06:03.420 --> 06:14.310
No such table scope readings from data step b y so in data so-called DP There is.

06:14.590 --> 06:16.930
There's one school Dalty.

06:17.070 --> 06:21.950
OK so connect us to connect.

06:21.960 --> 06:28.120
OK just a second because oh Sinixt are from school there's no such Stabil school of course.

06:28.120 --> 06:29.440
That is a school.

06:29.740 --> 06:30.490
There is a table.

06:30.480 --> 06:33.370
College students a table of teachers.

06:33.370 --> 06:36.210
So what we can do is we can do both.

06:36.280 --> 06:38.070
Print this result.

06:38.470 --> 06:42.670
Sorry controlled set lets say print

06:45.280 --> 06:52.440
student details and then execute the query to get all the students.

06:52.580 --> 06:55.710
Then print teacher use

06:58.280 --> 06:58.740
it

07:01.760 --> 07:11.180
and let me execute the same thing except except I will be having

07:14.680 --> 07:17.710
no having instead of star from students.

07:17.750 --> 07:28.730
I will say Silex star from teachers so certain details all of them are printed OK but Kennie's you see

07:28.830 --> 07:31.650
the deals are printed one after the other.

07:31.650 --> 07:34.620
They are in a list of top notes.

07:34.650 --> 07:42.240
They are in a list of all scrollable name gender and none is what Nanna's.

07:42.600 --> 07:44.660
I guess the GOP was not.

07:45.000 --> 07:51.090
So this is a list of Stupples So all the certain details are there one after the other.

07:51.090 --> 07:55.440
If you want to print all of them one after the other or if you want to access any one of the sort of

07:55.440 --> 08:00.830
details you need to save for for every student.

08:00.930 --> 08:04.550
Same result for every student and results.

08:04.680 --> 08:07.090
Trained students.

08:07.290 --> 08:08.360
Great.

08:08.790 --> 08:17.600
So that's how I have a student or I can all say over here for every teacher.

08:17.910 --> 08:26.860
End result friend teacher so far under control chipped in.

08:27.070 --> 08:33.580
First friends all the students and their friends the Stupples of one of each.

08:33.960 --> 08:41.700
Now what I'm going to do is instead of getting all the students I want to know axes or leave those students

08:41.940 --> 08:49.890
who are you know only the female students I just want the names of those who are female or let's say

08:50.110 --> 08:52.220
only the surance which are male.

08:52.340 --> 08:53.940
Again it just ruins me.

08:53.940 --> 08:55.860
I just want to execute that.

08:56.270 --> 08:58.070
OK so how do we do it.

08:58.110 --> 09:11.290
Then I should say select star from students where gender are equal to an agenda equal to.

09:11.300 --> 09:15.050
Now comes the question I need to put this in.

09:15.170 --> 09:20.610
You know I can put a single quote here and a single quote here then I can have a double quote.

09:21.560 --> 09:26.820
OK so now insurgents can you see all the male students came up.

09:26.940 --> 09:31.100
Re not the female student then there was only one male student.

09:31.100 --> 09:36.130
There were two female students only one means in the first case of printing the result.

09:36.130 --> 09:43.170
I don't want to print the result as a whole I just want to print each of those teachers she writes in

09:43.180 --> 09:44.710
detail for male.

09:44.750 --> 09:54.710
So in the other case I want to print the female specific star from teachers where gender equal to female.

09:55.040 --> 09:59.000
So I need to put this in a single.

09:59.240 --> 10:01.940
This entire.

10:02.460 --> 10:04.270
So then they'll be really one.

10:04.380 --> 10:08.070
If I put this male they'll be two teachers.

10:08.110 --> 10:11.040
Which of them were me ISDN.

10:11.520 --> 10:17.570
So these are the ways that you can use for accessing data from their parents.

10:17.610 --> 10:24.450
Now never going to use the same principle for dealing with the checkbook app and putting up you know

10:24.480 --> 10:28.890
data with databases in the chat or in the chat.

10:28.890 --> 10:36.510
So rather than the next video where we make use of data when every client sends it there'll be stored

10:36.540 --> 10:40.120
them in databases and X calling the access right.

10:40.230 --> 10:41.320
So let's do that.
