Database Concepts

John Elder
A free video tutorial from John Elder
Founder of Codemy
4.5 instructor rating • 58 courses • 148,708 students

Learn more from the full course

Learn SQL with Microsoft SQL Server

Understanding Databases and SQL

01:54:49 of on-demand video • Updated November 2020

  • Understand and Use Databases
  • Understand and Use SQL with Databases
  • Know How To Install and Use Microsoft SQL Server
English [Auto] OK in this video I want to talk about some basic database concepts. Just very broad things that we sort of have to wrap our brain around before we can learn this stuff. So what exactly is a database. Well we know it's something that stores data it stores stuff and you can add things and remove things but what is it. It's kind of important to be able to visualize what a database is even though they're kind of abstract things right. So one way I like to look at it is like a spreadsheet. And I've got Microsoft Excel open right here and I've just got a basic empty spreadsheet and you can think of this as a database because it basically is it's set up in the same sort of general way a database is. And by that I mean there are columns these things that go up and down and there are rows and there are tables different tables different worksheets and databases are really set up the same way even if you don't look at them in this exact visual way they act and they act in the exact same way they have columns. They have rows they have tables you can put stuff in the cells and all that good stuff. So think of Excel as a database and think of this particular spreadsheet as a table and databases are made up of tables and inside of your database Excel. You can have lots of different tables you see here at the bottom we can click through sheet one sheet to sheet three you know put different things in each one could move back and forth between them. So each of these worksheets is a table and each table has columns and rows. So let's just very quickly let's go first name last name email address scope phone number city state zip code and I'm just going to just to make these look nicer I'm going to make them fold OK so we have these headers these headings and then we could have say John Elder. OK so this is a row and rows are also called records and everything in this row. Everything in this record goes together. You know my name is John my e-mail address is this my phone number is that my city is this my state my zip code. These are all related to John to John Elder. They all go together and we can have lots of different you know whatever whatever like is. Now this record are things that relate to Tina Smith they all go together just like this record this row all goes together. Columns on the other hand are sort of groupings and a column is also called a field. So each of these columns can only store data of a certain type like right here. This is a number. This column can only hold numbers or in our case integers. This field holds text and it can only hold text. You wouldn't put like that in that field. Right. So in a very very real way this is exactly how a database functions. You have a column each column has a heading. Everything in that column is the same they're all last names all of these different fields are last names we have Rose also called records and everything in that row goes together. They're all different types of data for this person or this person or this person or this person. So when you're thinking of databases and if you don't have a real good picture in your brain of what a database is or looks like. Think of them as the spreadsheets because basically this is what a database is. So just to recap Excel is the database. And you'll notice we're not doing anything with Excel. Right. It's the database but we're not doing anything with it it just sort of exists in the background. The database basically just holds the table and it's in that table whichever table you are using at the time that you do all your stuff. You put all your data you take data and you take data out you modify data everything you're going to want to do. You're going to do inside of a table which is inside of the database. So that's all for this video. And the next video I want to talk very quickly about something called data types.