Time
7 hours 36 minutes
Difficulty
Beginner
CEU/CPE
3

Video Transcription

00:00
All right, welcome back to Module five. Siegel Development. This is less than one skimmer development, and we're currently in sub lesson 1.5 Implement the categories model and this lesson we're going to implement the categories model. It's the next easiest, modeled implement after the Tags model. And just as a note,
00:17
we're going to implement just the table slash models we need.
00:20
And then after that, we're gonna implement the constraints and the foreign keys that we need. So we're gonna break apart our work, create the models first, then add in the constraints that we need after we've created all our models with that said, let's get started.
00:35
So if we
00:37
left click on the tables within our CMA said base and select create new table,
00:43
go ahead and add a categories for the name
00:47
going to right click create new column
00:50
bigness t i d column. We're gonna make that a big ends on signed
00:56
or say that cannot be no.
00:58
Okay,
01:00
gonna add in a new column?
01:02
We call this the main column. I think marsh are 100 is just fine for that.
01:07
We're gonna say that it can't be No. So they must provide a name when it's added.
01:11
We're gonna create a new column,
01:15
and this is going to be a description column.
01:18
Bar char might not be enough. So we're gonna go ahead and
01:21
make that the text. Which means that can be a very, very large amount of text in this column.
01:27
I'm gonna say that can be null so they don't have to add a description, which is a common design pattern you see out there, you you often see applications where this description is not a required field.
01:40
We didn't click. Okay,
01:42
we're gonna go ahead and add in the constraint of the primary key.
01:46
Uh,
01:47
select I d hit. Okay,
01:49
let's go ahead and save this
01:52
and persist.
01:53
So we created our category tables.
02:00
And
02:02
so we created our categories table that completes this lesson. And the next lesson we will create the articles table. I hope to see you there. Thank you.

Up Next

Introduction to SQL

This introduction SQL training course teaches SQL core concepts that are applied in professional environments. Once completed with the course, students will be able to query and interact with an SQL database, and know how to design database schemas.

Instructed By

Instructor Profile Image
Kitt Parker
Instructor