1
00:00:00,810 --> 00:00:01,650
Hello, everyone.

2
00:00:02,130 --> 00:00:09,180
Today, I will show you how you can work with databases, so in this video, I will show you how you

3
00:00:09,180 --> 00:00:15,790
can create or connect the surveys so that after this we will use it for our up.

4
00:00:16,410 --> 00:00:22,620
So the first thing that you have to to know that we will use the function, the database is with the

5
00:00:22,620 --> 00:00:30,060
library escalatory, which is already included in the list that you don't need to install it or download

6
00:00:30,060 --> 00:00:31,130
it or something like this.

7
00:00:31,500 --> 00:00:33,360
We have just to it to our program.

8
00:00:33,660 --> 00:00:38,430
So the first thing we have to do to survive is to import.

9
00:00:38,730 --> 00:00:44,240
So import askey light.

10
00:00:46,820 --> 00:00:54,110
As, for example, will make its name base work with the name as an object.

11
00:00:54,140 --> 00:00:58,880
We have an object base from the lability escalating.

12
00:00:59,540 --> 00:01:02,810
So to connect it or to create it.

13
00:01:02,840 --> 00:01:05,870
There is one function called connect this function.

14
00:01:05,870 --> 00:01:13,970
Connect will either create a database or will connect it if we have already a database.

15
00:01:14,240 --> 00:01:17,000
So to this we have just to create a variable.

16
00:01:17,000 --> 00:01:20,660
For example, call it data base.

17
00:01:21,320 --> 00:01:22,090
This is very important.

18
00:01:22,220 --> 00:01:26,240
We have the role of our database, so we will work with just this primary.

19
00:01:26,990 --> 00:01:33,860
So here we have a database here to analyze the object, which is a base that we have created from the

20
00:01:33,860 --> 00:01:34,510
library.

21
00:01:35,060 --> 00:01:39,430
Then that here will provide the quality function, connects this function.

22
00:01:40,280 --> 00:01:45,860
It will either connect our database to the program or create it.

23
00:01:46,400 --> 00:01:55,640
In this case, we have, for example, the right, for example, data base that the the the extension

24
00:01:55,640 --> 00:01:58,640
DB means that this fight is a database.

25
00:01:59,000 --> 00:02:07,760
So if we write database, does DB the program we search, if there is a find or if there is something

26
00:02:07,760 --> 00:02:15,380
like this in the project folder, if we have already a program file or a database with this name, the

27
00:02:15,380 --> 00:02:22,910
program we just connected to to our project and we would work with it then if the program will not find

28
00:02:22,910 --> 00:02:29,140
it in this case, it will create a new one for us with this name, which is database that DB.

29
00:02:29,930 --> 00:02:32,370
So that is the important thing database.

30
00:02:32,390 --> 00:02:34,910
The first thing is to create it or connect it.

31
00:02:35,660 --> 00:02:38,660
The second thing is to commit all the changes.

32
00:02:38,660 --> 00:02:40,580
And the third thing is to Close's.

33
00:02:41,630 --> 00:02:46,100
What meaning this if we have if we wanted to work with database.

34
00:02:46,290 --> 00:02:54,110
So the first thing we have to take it and open it and take something or put something on it after that,

35
00:02:54,110 --> 00:02:55,550
we have to close it.

36
00:02:55,880 --> 00:02:57,730
So this is how you do this.

37
00:02:57,730 --> 00:03:01,250
The function is for this to connected or created.

38
00:03:01,250 --> 00:03:05,060
There is this function to connect and to commit all the changes.

39
00:03:05,300 --> 00:03:11,390
If we have if we want to do something in the core of this database, we have to put something or take

40
00:03:11,390 --> 00:03:12,500
something this.

41
00:03:12,530 --> 00:03:19,760
After that, we have to commit the changes to copy the changes we have just to write the the function,

42
00:03:19,760 --> 00:03:25,040
which is, for example, we have this variable database that the function commits this action.

43
00:03:25,370 --> 00:03:27,910
We commit all the changes that we have to do here.

44
00:03:28,850 --> 00:03:31,230
That means that we have to call this out.

45
00:03:31,260 --> 00:03:38,570
And after that, we work with the database, because if we we put it here, for example, we will commit

46
00:03:38,570 --> 00:03:39,080
the changes.

47
00:03:39,230 --> 00:03:44,470
After that, we will do some stuff on the database here on what we did hear.

48
00:03:44,480 --> 00:03:45,470
It doesn't work.

49
00:03:45,500 --> 00:03:47,440
It doesn't be saved in the database.

50
00:03:47,450 --> 00:03:47,770
Why?

51
00:03:48,000 --> 00:03:51,980
Because, for example, if you are working in Microsoft Word, fine.

52
00:03:52,490 --> 00:04:00,330
If you don't see every changes or everything, you end to your project, the program, the the project

53
00:04:00,330 --> 00:04:02,120
doesn't will be saved.

54
00:04:02,340 --> 00:04:04,820
So the same thing with the database.

55
00:04:04,820 --> 00:04:09,830
If we will do something in the service, we have always to commit all these changes.

56
00:04:10,190 --> 00:04:17,150
After that, when we complete all our work, we have to close's actually if we don't use it, if we

57
00:04:17,150 --> 00:04:20,520
don't close it by ourself, it will be closed.

58
00:04:20,540 --> 00:04:24,580
After that we stop the program, but preferably we have to close it by ourself.

59
00:04:24,860 --> 00:04:28,700
So we have to write a database that close.

60
00:04:29,810 --> 00:04:33,740
Does this function weekly database, this function we connect.

61
00:04:33,740 --> 00:04:41,800
It will make a comment here, creates or connects on that

62
00:04:44,900 --> 00:04:58,730
data base and this function will commit all the changes that we need in the database and this function

63
00:05:00,800 --> 00:05:03,830
will close the data

64
00:05:06,440 --> 00:05:06,880
base.

65
00:05:07,370 --> 00:05:10,510
So as I told you, there is these three important things.

66
00:05:11,300 --> 00:05:14,780
The first thing you have to do connected then work on is here, for example.

67
00:05:14,780 --> 00:05:15,710
There is a lot of work.

68
00:05:16,220 --> 00:05:24,160
Then we have to commit all the changes that we did in this database and at the end we have to close

69
00:05:24,170 --> 00:05:24,340
it.

70
00:05:24,800 --> 00:05:26,300
So that was for today.

71
00:05:26,300 --> 00:05:28,390
And I see you in the next video.

72
00:05:28,940 --> 00:05:30,260
Stay safe by.
