Genre Table
In genre table, we only need 2 attributes. There are Id and Name.
Therefore, our code shown like this.
CREATE TABLE Genre
(
Id int Primary Key NOT NULL IDENTITY(1,1),
Name nvarchar(50) NOT NULL
)
What does it means?
- Primary key identifies each record in a table that being assigned uniquely.
- Not null means that the column not accept null value.
- Identity (1,1) refers to Identity [(seed, increment)] attribute. Seed is the value for the first loaded row, while increment means the value will being added by 1 continously.
- Nvarchar basically means national char varying. It can stores unicode and non-unicode.