All right, so columns, we already kind of talked about this when we defined what a table was, because
a table is a collection of columns and rows and each column has a specific data that it wants to store.
For instance, here, last name, we're being very specific about what we want to store.
And each and every column has a name.
But columns are a bit more complicated than that, they have more going on than seemingly just being
a place to store a specific type of data.
Now, what do I mean by that?
Well, one single column is called the column.
We know that.
But what would we call the collection of all the columns?
Well, that's what we would call the degree.
We call that the degree of the relation.
If we were to take a table and we were to say, OK, what is it we're storing in the table?
What we would say, like we're storing multiple columns, that's that's one way of saying it.
Or you could say the degree of the relation is I'd first name, last name, sex and date of birth.
It's a very theoretical thing to say.
Nevertheless, it's the term that we used to call out the collection of columns and each and every column
stores a specific type of data.
Here we can see that last name stores the last name and that sex stores male, female or otherwise.
And that date of birth follows a very strict year, month, day.
Well, when we talk about what a column can store, we call that the domain or the constraint we're
seeing, OK, in date of birth, we can only store dates.
So we have a lock here symbolizing you are constraining the data you're seeing only put this in this
field.
So we're saying and date of birth only put dates and the same we could say for sex only put one singular
letter M or F or otherwise.
So we're being very specific about the domain of the data, the domain of the column.
That's what we call domain.
It's the constraint of the data.
It's what can go in here.
And another way of talking about columns is saying, well, my table has these attributes with these
constraints.
So there's very theoretical ways of talking about this and all of these are used interchangeably.
You could say attributes, you could say degree of the relation.
You could see columns, you could see my columns have these constraints or these domains.
And the only reason I'm pointing these out to you is because when you go into the real world and you
talk to people that are making databases, they may use this terminology interchangeably.
And all you need to know is that a lot of them have synonyms or simpler ways of seeing them.
You could say call, you could say the table has these attributes.
You could say the table has this degree of relation being it.
First name, last name, sex, date of birth.
You could say one of my columns has these constraints or my column has this domain being date time or
a single letter.
So all of these are very important nuances to take into consideration.
Now, let's back that up a bit, we said.
Every table has a column, multiple columns, or you can have a singular column, but mostly you'll
have multiple columns and so every table has columns.
Columns are also called attributes, and the collection of columns is called the Degree.
And each and every column may or may not enforce a specific type of data to be saved in it, you could
see it can be only numbers.
Date of birth can only be daytime.
We call these constraints or the domain of the attribute attribute domains, so to speak.
Let's keep it simple and call them constraints because we're constraining the data to be a certain type.
All right, now that we know that, let's take a closer look at Rose and all the specifics around them.