7 hours 36 minutes
I welcome to Module five Sequel development This is Lesson one, skim a development. We're currently in sub lesson 1.4, implementation of the tags model
and the previous lesson we went over the requirements and this lesson we're gonna start with implementing the easier models. I believe the easiest malls to implement in this requirement document is going to be the tags and the categories tables. Now it is possible we could combine those into a single table and have a type column that indicates whether or not it's a tag or a category
that would work.
But in this example, I'm gonna go ahead and keep tags on its own table and categories on its own table. Just because from experience, I know that these two concepts can function differently. So
because of that, I'm gonna go ahead and
keep them on their own tables. With that said, let's go ahead and implement these.
I'm gonna start by making a new database by right clicking on the databases on my connection. That's letting create new database. We'll go ahead and call this CMS. I'm gonna leave the defaults for the character setting collation.
I'm gonna go ahead and open that new database. Expand the tables. I'm gonna right click and say Create new table.
I'm gonna wait for that screen to open up,
and here we go.
I'm gonna add a new column. We're gonna We're gonna
call it the idea column
because we want a primary key on all our table's. So we're gonna go ahead and implement That
is gonna be big in unsigned.
We're not gonna auto increment yet because D viewer doesn't Ah, put those actions in the right order and it causes an air.
You say that it cannot be No. So it has to have a value, but go ahead and click. Okay.
Well, go ahead and add another column
and this column We're gonna call it.
This is gonna be the tags name bar chart. 100.
That's plenty big enough. We're gonna go ahead and leave that as a default.
We're say that can't be. No, you have to have a name.
We just go ahead and click. Okay?
And now we need a way that we bind to the article. So let's add the foreign key that we will use. So we're going to create a new column,
and we're going to call this column
Art of Coal
And that's not allowed to be. No.
And I know that we're gonna make that type of big end on a signed. So let's go ahead and click. Okay,
Now, let's go ahead and name this table. We're gonna just name it tag
and we're gonna save.
I'm gonna go ahead and persist.
Now we're gonna finish up the ah increments step of the imager or the i D column.
So flip on the auto increment and click save.
Actually, I think we need to make that a key for a stowaway.
So let's go ahead and make that a key.
We'll go to the constraints for a click. Create new constraint. Primary key. Select the ideas calm.
I'll leave the others as the false and
Good. And save that.
Okay, Go back to the columns
and were to turn on the auto anchorman again.
Okay, so we have our tax table implemented. We have our tag name, which is of our char,
which means it could be a string of attacks upto 100 characters long. We're gonna bind later to our article table by a four key constraint. But right now we just added the column
and, ah, that's all we need for the tax table. So I hope you're able to get the tax table implemented. And I'll see in the next lesson where we implement the category stable.