← From E-R diagram to MySQL: all 6 parts
Databases · Free practice
From E-R Diagram to MySQL, Part 3: Departments: Allowed Values with SET
Watch the lesson by Dr. J. Ubaldo Quevedo, then practice as many times as you want: every New button gives you a new example.
1. Watch
- Create the “one” side first: departments has no foreign keys.
dname varchar(15) primary key: unique, and at most 15 characters.state set('Arizona','California','Illinois','Texas','Wisconsin')accepts only the listed values.
2. Try it yourself
Practice as many times as you want. Every New button builds a new diagram, new constraints or new data. It's free, and you don't need an account or a MySQL installation.
Correct so far: 0