The Escuela

← From E-R diagram to MySQL: all 6 parts

Databases ยท Free practice

From E-R Diagram to MySQL, Part 2: Integrity Constraints and a New Database

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

  • The company database: Employees(eid, lname, fname, age, address, dname), Departments(dname, city, state), Drivers(dl_number, eid).
  • Integrity constraints: eid is a 9-digit number; last and first name are required; age > 17 and age < 70; state is one of five states; a driver works in a Texas department and is 25 or older.
  • create database myq; then use myq; before creating the tables.

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