 So what does it mean to have a database? Well, if we use this graphic right here, we can just make the assumption This is what a database kind of looks like But what does this mean? Well, it has the same kind of idea That's something like Excel had except for it's a little different. We like to think of it as a collection of of Data I know that seems kind of generic But let's think about a few different companies for example like Twitter Amazon and Google Well Twitter, you know if you think about Twitter If you have a Twitter when you signed up for it, you had to input maybe your email address your Nickname or your Twitter name, however you want to kind of consider that you had to give it a password And then you have posts or tweets if you will and then finally you also Have friends as well who you follow Followers all of those things are being stored Somewhere for your account and then your friends account and then for everyone's account Well, then let's look at something like Amazon Amazon again the same kind of concept It needs to store something like your email your password But then it also probably needs something like your address your city your state and Then maybe your credit card number again, you know, that's where the one-click Shipping kind of comes in it'll immediately buy it and start shipping it to Well, okay, those were for more us these guys right here. These are for us But what about kind of the world and that's where something like Google can come into play if you kind of think about what Google is It's a search engine Search engine, but it still has to utilize a database What Google does is it'll go through every web page. So it has to have Everyone's web address It probably has to find the contents of That page and one of the things it'll do is if it finds a link a hyperlink It'll go to those pages as well. So These are things that it might store for Any given web page such as Amazon or Twitter? Now why does it do these types of things? Well, what this allows for us to do is now Take this data and sort of connect it together again Google for example Google is storing this data So that it might do some analysis on it For example, let's say for our sake. We go to a site like reddit Now reddit is just a site aggregator. It just collects data from other websites, but this guy has a lot of Links So what does Google do well Google for example is gonna go to reddit and it's gonna see that oh reddit has a bunch of links So what's it gonna do? Well, it's gonna go to every single one of those links and find out what the contents on that page is contents All of that's data then is going to get stored each one of these also has a web address each one of these has links That in turn goes to Google's database and gets stored You can also think of this like your bank account your bank account for example has your account ID your pin your balance And if you are so lucky it might have a little interest rate going on for your balance if you've got a savings account for example you get Maybe like three cents every month For just having money in there Well, these things need to be stored somewhere because how we sort of sort of break this down as it turns a little bit into Like a table we start to break it down in the same structure Let's take for example Let's take for example a phone book Well phone book again this sort of looks the exact same as how we would represent data inside of Microsoft Excel It looks like a table, but we have a few new words that we break in For example, let me just clean this up a little bit. There we are For example Again, if it's a phone book, I probably have a name that I want to store For there and it might not be the person's real name if you have Quirky little nicknames for everybody, you know, that's one thing that I would want to store inside of there Now I probably also because I'm dealing with a phone book. I probably want to also store their phone number But then I would also because we're in the technological era, you know, I might also want to store their email address Now we're gonna go with a very robust Phone book because now that I've got these few things. I might also want to store something like their date of birth That way, you know, I get a little reminder when their date of birth happens that hey, this is So-and-so's birthday wish them a happy birthday Now we'll keep on going with this same kind of concept. Maybe I happen to know You know if they Have an address, you know, I need to go hang out with them. I need to send them something So I might want to store their address as well Well each one of these things that I've just written out here these They're no longer known as columns like we learned inside of Excel and word when we dealt with a table They're slightly different. These are known as Fields fields and then we also have entries. So say for example I'm in your phone book and I'll change colors for that. Let me clean that up to maybe a red I'm in your phone book And here's my number nine three six two seven seven five nine a Guida I wrote this way too tiny At CFC see that edu My date of birth there There and then say for example, you also in turn have your friend Sarah Sarah You've got her number Eight six seven five three oh nine You've got her email her date of birth her address and Then you've also got say Billy You've got all of his information and then just to round it up. You've got Tina and all of her information Now each one of these that I've put in each one of these guys right here these are known as records And every time I want to put in a new record. I basically would insert it into my phone book Table this is still referred to as a table But just what we refer to the individual kind of parts of it are different again This is no longer a column. This is now known as a field The reason why is because there is no instinct or an instinctive order to it. Yeah name is here But name could be here and it wouldn't matter But that's where those things can come into play So to keep on going with this now we start to get into Different data types I can look at each one of these fields for example and I can actually give them a specific type of data to put in Now say for example name. Well names can store Text now what does it mean to have text? Well, it's letters It's actually numbers numbers can be considered text to what if I have a bunch of friends named Billy And I want to say Billy one that Billy two You know guy from bar three, you know or punctuation. I can actually put in punctuation marks And that way if I wanted to say something like Adam g period I could Then we get into Say, you know number since we're dealing with a bunch of numbers, but we're not doing necessarily math. That's probably also text Email same kind of concept. You notice how that's got an at symbol in it and a period So all right now date of birth. This is where things actually sort of change a little bit This is actually going to be considered. What's known as a date? time data type and Sort of just like we saw inside of Excel. It's got a specific format to it. So for example my birthday 112284 this is getting stored not as Text not as numbers and slashes, but it's actually being stored as a date now Date again is just numbers specifically formatted in a given way and again We can see address probably would be text as well Now what if I just happen to include another little Field here That will call. I don't know ID now we always this is actually an interesting thing ID even though it doesn't sound like much Think about your student ID number. You have this number. Well, it doesn't have letters in it It doesn't have symbols it has 0367 035 Well that I don't need to store as a text. I don't need to sort it as a date I would actually store that as a number Now why well if we can think about this for a second Maybe if I am doing this number system, I want to give for example, Sarah The next number in the list so in this case 0367035 0367036 I'm Incrementing and then I go to Billy and while he gets the next one 0367037 And then Tina 0367038 By being a number it allows me to do mathematical equations to it Again, let's think about it in this sense. Maybe maybe instead of a phone book. We're now dealing with some accounts Maybe I'm a bookkeeper or I'm a guy who people owe a lot of money to what I can currently expand on this is maybe creating a new record that will call Balance how much somebody owes me and again because I'm me. I don't owe you jack But Sarah Sarah. Hey, you know I loaned Sarah $20 last week So she owes me 20 bucks Billy Billy is a deadbeat and he never pays and he owes me a hundred bucks Tina Tina's actually good. I spotted her a five actually Let's say I owe Tina money You know, I actually have an outstanding balance with Tina's instead of Tina only me money I owe Tina money now this this is still a number But this is considered a currency data type because again, it's math It's numerical values, but in that sort of dollar sense So we can take all these things together and now you can see we can start to organize our data and Have it in a way that allows us to now research it look it up and In a second, we'll talk about making queries to it