Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
Primary keys - the basics
Single-column primary keys
10. Primary keys in ERD
Multicolumn primary keys
Auto-increment columns and sequences


Alright. As you can see, it's possible to use a varchar column as the primary key, but it is not advisable.

Primary keys are important, so we mark which column the primary key is in ERD diagrams too. We usually use the abbreviation PK:

The movie table


Try to create the database using the following ERD diagram:

The account table

Stuck? Here's a hint!


CREATE TABLE account (
   user_id int PRIMARY KEY,
   first_name varchar(32),
   nickname varchar(24),
   description text