All right, everybody, it's exercise time, and in this exercise, we're going to build Amazon or at
least understand how Amazon uses databases.
Now, I want to take us back all the way into the 90s.
That is Amazon before Jeff Bezos look like a superhero.
We're talking Jeff Bezos in the 90s.
Now, imagine you're starting Amazon.
You just started.
You're starting to deliver some books.
You are getting your first customers.
If you're a Jeff Bezos, what's your first thing that you're going to do?
Well, maybe you will use a notebook, a pen and paper and say, Joe just ordered a Harry Potter book.
I'm going to write down his name, grab their credit card information or check and grab their address
so that I can ship them that book.
Now, eventually, this notebook, pen and paper is going to overwhelm Jeff and he decides, you know
what, let's use Excel.
Let's use a spreadsheet.
And Jeff starts using a spreadsheet.
And now look at that, things look a lot better, a lot cleaner instead of pen and paper on the computer.
Now Jeff has some orders.
We have Andre myself.
I ordered a toy duck.
I wanted two of them.
And this is my address now.
My real address.
Don't try and send me mail.
We have Mo, who likes candy and just bought 100 candies.
Wow, that's a lot.
Bruno, again, has perfect hair and he buys a lot of hair gel.
And then finally, Sally is buying a Harry Potter book.
Awesome.
So Jeff is keeping tracks of orders.
He knows when to send those items because he has the address.
He has a quantity, he has the name.
Everything is great.
But then comes a problem.
The Excel sheet gets a little bit bigger.
And now we have something confusing that Andre has done.
You see, I wanted to get some cool glasses, so I order some cool glasses and there you go, order
them.
But once I see them, I didn't really like them.
I don't think they were as cool as I thought.
So while I, I decided to return them and a week later I decided, you know what, I wasn't thinking
straight.
Those cool glasses, they were actually very, very cool.
So I decide to order another pair of glasses, but oh, just a heads up.
I actually moved to Japan in the meantime.
So Jeff looking is this is saying.
Hold on, hold on.
Well, OK.
So is this the same Andre?
There's two different addresses.
There's a minus one here and in his head has to keep track of all these things, all these changes,
and imagine having more and more rows.
Imagine this Excel sheet getting bigger and bigger and bigger, more information, more data.
Things start to get confusing.
And this is why databases exist.
Instead of this, let's imagine a better system that Jeff implements now for you.
I want you to go to this length that will link in this lecture and try this out.
This is an interactive playground.
This is a website that actually has a database already as part of it.
You can see here that this is your database and it has different tables with different records.
So there's ninety one customers.
There's eight categories.
And there's also a playground for you to run.
Ask all statements.
Now, we haven't really learned about school yet, so this might be gibberish for you, but I just want
you to click run school.
And by the way, your school statement here might be different than mine.
That doesn't matter.
Just click run.
This is essentially what a database does, we kind of get the same results as a spreadsheet, but we
use ask you all statements and we grab information that we need.
But it's not just one big Excel file, right?
There's different pieces of data.
So if I go to customers, I see all my customers, each customer has an ID, has different columns with
important information like address, like the contact name if we go to orders.
We have some order date, we have some customer ID, so who ordered the orders?
If we go to products, we see all the products that we have.
And all of these are grabbed using school statements.
Now, I know this is still confusing, might not understand what the difference between this and an
Excel spreadsheet is, but before we do, before I go into the next video and show you the exact difference
and why this system might be more beneficial to Jeff, I want you to play around over here, start clicking
on some of these categories around the school commands and just kind of understand what we're trying
to do.
Essentially, when we select staff from something, we get some data, see if we can modify this information
right over here to perhaps match different databases and find out about our Amazon store.
So play around, even though you have no idea maybe what these statements do, and in the next video,
we're going to dive deeper into Jeff's Amazon database.