Okay, welcome to chapter 1. By now, I hope everyone has actually got a copy of the textbook because this is going to be required, right? Okay. Um, also, did you uh print out the the journal questions before watching the videos? That come in really, really handy. Okay, good. So, we're ready to start. So, page two, introduction to chapter 1. So let's just talk about the learning objectives of what it is we're supposed to be learning from this chapter. It's about the importance of database in the you know the web and and smartphone era. Okay. The nature and characteristics of a database. That's pretty straightforward. And then kind of a general understanding of tables and relationships. We'll get into that in a lot more detail later on. And then the functions of the database management system. It's like, wait, there's two things, a database and a database management system. Yeah. Yeah, there is. Okay. So, on page three, the importance of a database. So, it's fairly obvious that u you know with PCs everywhere and local area networks, uh you know, databases became really big. You know, in the old days, you had a mainframe computer where the database was and you had a dumb terminal that connected, but that's just not the way we do it anymore. Now we have centrallylo databases and servers or perhaps you have databases installed on your PC you know with the internet and the web you know it look when I go do an Amazon search for something you know that's a database right I mean I click in you know I want kumquats and it pops up a search results page with tons and tons of stuff on it that's all done in a database so if everyone is using a database trust me everyone every website you've ever heard of Except for, you know, mom and pop shops, they've all using database. Yes, Twitter uses database. Everybody uses database. And then, of course, cell phones. Now, here is kind of a dichotomy because, you know, the size of a cell phone kind of dictates, you know, you know, how much physical storage it can have? And so, you know, do I really want to copy all the data down to a cell phone and have you run a database operation on the phone or do I want to have it just use the network capability? You know, one doesn't cost you any any connection charges like there's no data charges but consumes all your your space on your phone. And the other option, of course, is go ahead and consume data resources. Maybe you have an unlimited plan and you don't care and so you connect to the database over the web. So there's some choices on where the database should reside and that has kind of sort of changed over time. You know, if storage is a premium, well, then the answer is fairly obvious. But if and if but if connectivity is is inexpensive or cheap um or free, well then maybe that you'd go in the other direction. And then internet of things, you know, this is talking about, you know, your smart refrigerator and your I don't know, you hooked up your doorbell camera and, you know, your thermostat and all the all the smart devices in your f in your house and um yes, they all in some instances all use databases. I mean, for example, Android uh which is a typically a good operating system to have on an internet of things kind of a device. um it has a built-in version of um a database called MySQL. I mean, it's kind of cut down, but it it it exists and it's there. It's all by default. Okay, here's some database terms. Don't get excited because you you know darn well that I'm not going to ask you to define the terms, but you still know what we're talking about. So, data. So, data is, you know, just recorded facts and figures. You know, if I if I had data about a student, I would know, you know, what your first name is and your last name and your address and your phone number and your major, you know, just facts and figures pertaining to you. A database is a structure that kind of holds this stuff. And structure is kind of an important word here because a database is not just a bucket where you you drop stuff, okay? That's not what it's about. It's a very ordered bucket. There's a slot over here for your name and that's where it goes. And there's a slot in the bucket for your address and that's where that goes. I mean, it's very very precise. So again, you know, Facebook, Twitter, Amazon, you know, everything um is using a database. So let's let's reverse that. What is not using a database? Um well, okay, I'm using Microsoft Word. I'm probably not using a database. I'm using a spreadsheet in Microsoft Excel. I'm probably not using a database. What about email? Is that a database? Yeah, my inbox, my scent box, and all my folders. Yeah, that's in a database somewhere on some server. You guys got this? Okay. So, the the the definition of information and information is it's it's kind of a cool um definition. It's doing something useful with data because you could have lots and lots of data but don't know what any of it means. You know, like if you're a retailer and you record tons and tons of data about all the transactions, but you don't really have any useful information until you've gone through and digested it a little bit and figured out, ah, it looks like on Tuesdays people buy this type of hamburger and on Wednesdays they type they buy this type of hamburger. Therefore, I need to make some changes in my schedule. That kind of thing. So information just you doing something useful uh with data. Okay. So I mentioned that practically all commercial websites uh certainly any ecommerce website is using a database. I mean you don't go to eBay and get a listing of stuff without it going through a database right just okay. So all e-commerce websites particularly you know Amazon. So I'm going to go to Amazon. I'm going I'm going to hunt for a product here. Okay. And I'm gonna go there and I want to buy some kumquats. By gosh. And there we go. I can buy me. So this search results page, it contains you a photograph and some description, some links and all that is from a database search. Now you didn't actually get to see the database. You don't get to play with it. You don't get to directly add in things kind of sort of at the search. I mean you could put a lot more things in here. You could say and you know something something or or something something. You you could actually put in some query type logic at the prompt here. Most people don't but that's okay. All right. So typically a database is a client server kind of a scenario. And so what we mean by that is you over here in the user column is using you know a PC a smartphone or whatever and you're connecting via whatever to maybe like a web server which is then connected to the database. So there there are distinct parts I mean the database part on the right hand side is you know basically just a database sitting on some server somewhere and how you connect to it by what technique is what we're talking about now. So the client could be a web browser or a smartphone app or you know a smart speaker kind of you know an internet of things kind of thing. You could have your your your smart uh device talk directly to the internet over some sort of a of a connection going to some sort of a database. So the database is the server you know that's where the well not the database the the this this column here the web server app server and app server those are the servers that are connected to the database so the human or the PC never skips over and jumps directly to the database they always go through some sort of a server to be able to get there okay and so the client is typically things like a PC or a browser or a smartphone those kind of things the client typically isn't the human. I know it sounds a little weird, but that's the way it works. Okay, so on page six, they talk about characteristics of a database. So, there's a thing called a relational database. And we're going to talk an awful lot about that later on. But what that basically means is uh when you have a bunch of data, you uh you organize it in such a way that the that related things are all separated out. In other words, if I have uh information about students, well then that's one table about students. And then I have information about classes that are being offered in a particular semester. Well, then that's a separate thing. And so you keep them separate because it just kind of makes sense. Now, they're related because a student could have a have a class and a class could have a student, right? But but you don't combine them together. So a relational database is all about building a database so that it stores one thing in a table but you can go back and later relate them together. Okay, that's a kind of a key thing. So uh tables, you know, have rows and columns, right? I mean and there there's some funky terms that they throw in. you know, I would I typically say like row and column because it's kind of familiar like with, you know, with uh Microsoft uh Excel that that in your brain, you know, just kind of makes sense, right? Rows and columns. So, here's, you know, a row of data and a column of data, right? Okay. Well, databases have the same thing except sometimes they change them, change the vocabulary a little bit. So it the columns could be called attributes or they could be called fields and the rows uh could be called an entity. Ooh, okay. Don't get hung up over all these terms, but uh just trying to make it all point out. So here's an example of a a relational database between student and class. So a single student can have multiple classes and a single class could have multiple students. So clearly there's a relationship here, right? Okay. So this only contains information about students and this only contains information about classes. You don't mix them together in the same table. That's the whole point. Now let's contrast this. This we've been talking about a relational database. So let's contrast that with something that's not a database. Okay? So for example, this might look an awful lot like that, right? I mean it's still got rows and columns. I mean, this particular example isn't that much different looking. This happens to be a a screenshot of something done in Microsoft Access, which we'll get to shortly, but these kind of sort of look the same, but they're not. This is kind of dumb. Uh, what happened here is this information for this particular whatever it is, could be a customer, could be a student, whatever it is. Um, there's no there's no controls in here. So, for example, could I type a number in a uh in a text field or can I type text into a number field? For example, for state, can I go in here and type in 1 2 3? And machine goes, sure, whatever, dude. I'm happy with that. So, there's no controls. There's no there's no data checking, right? So, I can type numbers and text fields or text fields and numbers. I can have an extra column that, you know, maybe maybe one row just has an extra column. None of the rest of them do, but one of them does. That's kind of funky. I can have duplicate rows without too much trouble. Well, that's not how it works in the database world. So, what we're describing, believe it or not, we're actually describing something called a relation. Uh, and we're going to be talking about this in great detail. So, if I ask you like on a test question, what's the difference between a database and a and a spreadsheet? you'd be able to tell me, right? Okay, good. So, let's talk about naming convention. So, the textbook uses full caps for table names like student and class. Okay? Uh but I I will tell you right off the bat, I when I'm doing demos, I don't I don't do it that way. I I just use uppercase first letter. Okay? I don't do the full caps thing. I mean, it's just a naming convention. There's no rhyme or reason to it. Um, columns begin with a capital letter. Yeah, I do it that way. And so I I I'll tell you what the rules are. Then I'll tell you what the the the real real world rules. The real world rules is let's make sure we're consistent. If we're going to call something last name, always call it last name. You know, last with name all crunched together. Be consistent. Consistency is very important. Um the SQL standard is not case-sensitive. So when you type this in like I want to query against something and if I typed in uh student number all in caps or all in lowercase it will still find student number with a capital S and a capital N. So this is for the benefit of the human because SQL is not case sensitive. Okay. So for the benefit of the human and um I would always avoid having spaces in column names or table names for that matter. In other words, it's not student space number or last name space, you know, last space name. Now you can use like an underscore if you want something like that. Um but most people just cram the words the two words together with using a capital letter in the middle to kind of separate them out. That's typically the way it's done. Now, does the SQL standard allow you to put uh spaces in the column names? Yeah, it will. Don't do it. Please do not do it. It'll drive you nuts. So, just remember that. And then avoid keywords. I mean, later on, we're going to be using u a select statement. So, I I don't really want a column name called select because that would drive the machine insane. It won't be able to figure out what you're talking about. I can't have a column name called table because table is a name of something. Okay. So in the SQL standard uh typically when you're using when we start typing on the keyboard um we're going to be typing in uh strings you know like Bob. And when you do that you you typically put that single quotes around the the Bob part. Now, Microsoft Access will allow you to use double quotes or single quotes, but I want you to kind of get in the mood uh of doing single quotes because it'll be a little bit more universal later on. Okay, we're coming up on the 15 minute mark. You guys know how this work. I'm going to pause this guy and we're going to pick it up again in just a few.