WEBVTT

00:00.270 --> 00:00.690
All right.

00:00.690 --> 00:07.260
So we're going to start off by taking a bit of a step back and talking about two very high level general

00:07.260 --> 00:12.960
questions that are pretty central to everything this course is about and they are.

00:12.960 --> 00:18.780
First off what is database seems like a pretty straightforward question but there is a little bit of

00:18.780 --> 00:21.060
terminology you need to discuss.

00:21.870 --> 00:24.670
And then secondly why do they matter.

00:24.810 --> 00:30.690
So let's start off with the first one what is a database what actually makes something database and

00:30.750 --> 00:33.830
there are a couple of definitions that we could go with here.

00:33.840 --> 00:38.410
I kind of synthesized some of them into my own definition that has two parts.

00:38.610 --> 00:45.200
And the first part is that it's a collection of data which seems pretty straightforward.

00:45.210 --> 00:51.090
There are all sorts of collections of data around us in the real world things like when you go to your

00:51.090 --> 00:57.810
doctor's office and there's a filing cabinet full of medical records or even just that a to do list

00:57.810 --> 01:04.260
or a list of things to buy at the grocery store qualifies as a collection of data or going back a little

01:04.260 --> 01:05.000
bit in time.

01:05.040 --> 01:12.360
If you remember what Rolodexes word a Rolodex full of different people's contact information that qualifies

01:12.360 --> 01:13.120
as a database.

01:13.140 --> 01:14.450
Under this definition.

01:14.610 --> 01:18.560
Speaking of archaic technology like a Rolodex.

01:18.630 --> 01:22.620
Another example of a database is a phone book.

01:22.770 --> 01:28.920
So I say this mainly jokingly but I actually have some siblings who don't know what phone book is or

01:28.920 --> 01:30.990
they've never seen one or used one before.

01:30.990 --> 01:36.670
It's a gigantic book basically that you look up people's phone numbers based off of their name.

01:37.050 --> 01:40.920
So it's usually organized by last name alphabetically for people.

01:40.950 --> 01:45.090
So you would look through the book until you find someone's last name and then you would try and match

01:45.090 --> 01:47.300
the first name and then you find the phone number.

01:47.340 --> 01:49.700
So let's take a quick example here.

01:49.710 --> 01:51.610
This is a fictional phonebook.

01:51.750 --> 01:56.800
Think of it as just a little section of a phone book that has tens of thousands of entries.

01:57.030 --> 02:01.020
And these are fictional characters alphabetically organized by their last name.

02:01.020 --> 02:06.150
So Archie Andrews comes in for Betty Cooper who comes before Ned Flanders and so on.

02:06.510 --> 02:08.600
And then we have corresponding phone numbers.

02:09.490 --> 02:12.780
So imagine you have a gigantic phonebook with this information in it.

02:12.910 --> 02:19.390
And I asked you to do something like find Ned Flanders phone number Well it's actually pretty straightforward

02:19.750 --> 02:23.660
as long as you're comfortable using the alphabet in alphabetical order.

02:23.830 --> 02:29.380
You look through the book until you find f f l and so on until you find Ned Flanders and then you find

02:29.380 --> 02:30.570
his phone number.

02:30.600 --> 02:32.550
It's what the phone book is made for.

02:32.920 --> 02:38.920
However it gets a little trickier or a lot trickier it really if I ask you to do something like find

02:38.950 --> 02:41.330
everyone in the phone book who has the first name.

02:41.360 --> 02:45.360
Ned there isn't an easy way to do this.

02:45.560 --> 02:50.820
You basically would have to go through every entry in the book and check for how many thousands there

02:50.820 --> 02:53.180
are is this person's name.

02:54.860 --> 02:58.670
So I have a couple other questions that are similarly difficult.

02:58.760 --> 03:04.240
So the point here is just if you were to find all phone numbers with a particular area code or to find

03:04.240 --> 03:09.390
all people who have a three letter first name it's not easy and it would take a lot of time.

03:09.670 --> 03:11.560
Like a ton of time.

03:11.780 --> 03:17.410
So that brings me to the next component of the definition of what makes something a database.

03:17.690 --> 03:21.380
In my opinion which is not just a collection of data.

03:21.500 --> 03:26.310
It also contains a method for accessing and manipulating that data.

03:26.330 --> 03:32.720
So going back to this phone book we would want a way some sort of program or code that would allow us

03:32.720 --> 03:38.060
to do things like find everybody with the first name net or find all people who have a three letter

03:38.060 --> 03:45.980
first name or even do things like add a new person into the phone book or change area codes or change

03:45.980 --> 03:51.040
phone numbers or get crazy and just delete people from our phone book or delete everybody if we wanted

03:51.050 --> 03:57.260
to we would have some sort of program or code as part of our database that would help with that that

03:57.260 --> 04:00.220
would allow us to interface with the data.

04:00.770 --> 04:05.310
So I did say we were going to dive a little bit into the jargon and terminology.

04:05.450 --> 04:09.710
I usually try to stay away from that early on while I try and stay away from that in general but especially

04:09.710 --> 04:11.140
early on in the course.

04:11.530 --> 04:17.480
Basically if you've read about databases if you've used one before if you've read a blog post about

04:17.480 --> 04:23.600
them you may have come across the term database management system or relational database management

04:23.600 --> 04:29.170
system or DMX or RB DNS all these different acronyms.

04:29.450 --> 04:36.110
Basically this right here what I have on the screen database versus database management system refers

04:36.110 --> 04:42.260
to the fact that what I just talked about having data collection of data and then having an interface

04:42.260 --> 04:45.270
for that data are two different things.

04:45.380 --> 04:47.900
So let me show you a quick example.

04:47.900 --> 04:50.240
Imagine that you have an application.

04:50.600 --> 04:57.350
Let's say it is a dating app and then you have a database and you're storing all sorts of information

04:57.380 --> 05:03.080
all the different users all the different messages that have been sent the photos whatever else goes

05:03.080 --> 05:05.320
into your dating app but on its own.

05:05.360 --> 05:08.390
The database here is basically like our phone book.

05:08.390 --> 05:16.250
It's a gigantic collection of data which is great for storing data but it really doesn't do very much.

05:16.250 --> 05:19.940
You can almost think of it as if it was a gigantic file on your computer.

05:19.940 --> 05:28.070
So for our application to be able to do things like Update somebody's username in the database or edit

05:28.100 --> 05:34.700
their profile photo or delete a user if they want to leave our application whatever it is there's a

05:34.700 --> 05:39.140
database management system that allows us to interface with that database.

05:39.170 --> 05:43.900
So it's just the code to the program that does the talking to our database for us.

05:43.910 --> 05:48.360
So we talked to our database management system and it talks to the database.

05:48.380 --> 05:48.800
OK.

05:48.830 --> 05:52.170
So for the most part we're out of the weeds with the jargon here.

05:52.190 --> 05:58.940
The reason I brought this up though is that oftentimes when people talk about data rates you actually

05:58.940 --> 06:01.700
hear them referring to both of these things.

06:01.700 --> 06:07.190
The database management system and the database together just as a database.

06:07.580 --> 06:12.240
So what I have right here is a list of some of the more common databases you'll run into.

06:12.560 --> 06:17.110
And actually I just did it there when I was just talking about these four things.

06:17.160 --> 06:20.760
PostgreSQL my Eskew Well Oracle sequel lite.

06:20.810 --> 06:22.730
They're not technically databases.

06:22.850 --> 06:25.470
They're actually database management systems.

06:25.850 --> 06:29.160
But for the most part people just call them databases.

06:29.360 --> 06:34.700
So when we say things like my as well as one of the most commonly used databases it's actually one of

06:34.700 --> 06:37.820
the most commonly used database management systems.

06:37.910 --> 06:42.380
So it's not the end of the world if you forget about that but it is important because it will help you

06:42.380 --> 06:47.810
understand later on when we actually start talking about a sequel when we start talking about some of

06:47.810 --> 06:50.860
the code that you write to interact with the database.

06:50.900 --> 06:55.730
I think it will help you understand what you're doing and that you're giving commands to this database

06:55.730 --> 07:02.130
management system which then goes and gives commands to the actual data itself or to the database itself.

07:02.480 --> 07:08.360
OK so to wrap everything up here's a little bit of a synthesized definition.

07:09.560 --> 07:10.520
What is a database.

07:10.580 --> 07:15.930
Well it's a structured set of computerized data with an accessible interface.
