1
00:00:00,240 --> 00:00:06,210
Very early in the course in application number one, we built this application where you could, as a user

2
00:00:06,210 --> 00:00:10,010
you could enter a word in English and get the definition of that word.

3
00:00:10,200 --> 00:00:15,510
And we used Json file to store the data which is quite flexible.

4
00:00:15,510 --> 00:00:20,040
The problem with that solution is that Json file could be big.

5
00:00:20,040 --> 00:00:28,200
So you have to load that Json file any time you run the program, and that could give you a problem

6
00:00:28,200 --> 00:00:30,790
with the performance of your application.

7
00:00:31,830 --> 00:00:39,210
So in this lecture I want to show you how to use a mysql database instead of using a Json file.

8
00:00:39,240 --> 00:00:44,880
We're going to build the program up to a point and then I'm going to ask you to build the rest

9
00:00:44,880 --> 00:00:47,430
the program as an exercise for you.

10
00:00:47,430 --> 00:00:50,530
So earlier we had the data stored in Json.

11
00:00:50,580 --> 00:00:54,360
This time the data will be stored in a database.

12
00:00:54,360 --> 00:00:55,320
This is the database.

13
00:00:55,320 --> 00:01:01,410
This is a remote database I'm going to give you the credentials so that you connect and query data from

14
00:01:01,410 --> 00:01:02,890
this database.

15
00:01:02,950 --> 00:01:05,410
And this here is a graphical interface.

16
00:01:05,430 --> 00:01:06,400
It's called phpMyAdmin.

17
00:01:06,400 --> 00:01:15,480
It allows you to see the data in the database to query data and so on but you can also do

18
00:01:15,480 --> 00:01:18,990
that with Python so that's what I'm going to show you in this video.

19
00:01:18,990 --> 00:01:20,430
But first let me show you.

20
00:01:20,460 --> 00:01:22,610
Let me make you familiar with the database.

21
00:01:22,680 --> 00:01:25,580
The database has some tables. Ths is the table we're going to use.

22
00:01:25,580 --> 00:01:33,880
Dictionary. If you click that in phpMyAdmin you see that the table has two columns, expression  which

23
00:01:33,880 --> 00:01:38,080
is the word in English, there's many of them.

24
00:01:41,130 --> 00:01:43,610
You see you can show more if you like.

25
00:01:43,790 --> 00:01:46,790
And so then you have the definition column.

26
00:01:46,790 --> 00:01:49,610
So every word has a definition.

27
00:01:49,610 --> 00:01:51,880
So expression and definition.

28
00:01:51,890 --> 00:01:59,630
So now let's go back to our program, to our python file and let's start building the application that,

29
00:01:59,720 --> 00:02:01,850
is going to query data from that database.

30
00:02:02,270 --> 00:02:03,130
So let's start from the next video.

