What is a table and what is a table in the relational model?
Well, we've looked at multiple, multiple examples of how to break down data.
And each and every time we've broken down data, we've broken them down into these entities or objects
or concepts, whatever you want to call them, be it a user, a student, a teacher, and a table is
a representation of that object.
So here we have the object user and we have a table.
And when we create a table, we give it a name.
That name is of that object.
So we're going to call it user.
So a table has a name that's the first and foremost important thing we need to know.
Each table has a name and that name relates to the concept of the data we're going to store.
Think of an Excel sheet and giving the Excel sheet a name.
And then when we look at a table, we can see that we have these things at the top called columns.
And each column represents a specific type of data.
We have ID here, which is an incrementing number.
It goes up one, two, three, four or five.
Then we have first name that contains the name of the user, the first name and last name.
And then we have their gender, male, female and so forth, and then we have their date of birth.
Which follows a specific year, month, day, so what we can see here is that a table has a name and
a table has columns that store specific types of data, kind of like an Excel sheet, but an Excel sheet.
The names of the columns are already named.
If you've seen Excel, you can see A, B, C, D here we get to choose the names.
So that's very important because we're specifying what type of data we want to store in each column.
And then here next to the columns, we have these rows also like an Excel sheet, these rows of data
and each and every row is a singular piece of data.
It represents one single piece of data for that table.
So here you can see McGeeney, me, the instructor, and you can see my date of birth, my sex and my
ID as a user.
That is one piece of data and that data is split up into columns that represent each and every piece.
Very, very important.
So here we can see the relationship between what a table is and what an Excel sheet is, like I said,
you can see over here every sheet has a name, kind of like a table, has a name, and every sheet has
columns, A, B, C, D, E, F.
Kind of like our table has columns, but our columns are more specific.
We are actually saying what we want to store in each and every column where in Excel the columns are
generic, they're pre named, so to speak, so that it doesn't matter what data you put in here, it's
going to accept any type of data.
You just know that your column name is A, B or C.
You can go a bit farther and excel and give specific columns at row one, you could put first name here,
last name here, date of birth here, just so you know what's going to be in these columns.
But you you would lose a row.
But that being said, the relationship between the two is very close, except in the relational model,
a table has much more nuance.
What do I mean by nuance?
There's a lot more details here.
We're very, very, very specific in what we want to store and how we want to store it.
So now that we know that, let's take a closer look at what a column is and how that gets defined.