The Escuela

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

Databases · Free practice

From E-R Diagram to MySQL, Part 1: From E-R Diagram to Relations

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

  • Each entity becomes a relation; its key attribute becomes the primary key (underlined).
  • In a 1-to-many relationship, the “many” side gets the key of the “one” side as a foreign key: Employees(…, dname).
  • A subclass (ISA) keeps its own attributes plus the key of its superclass: Drivers(dl_number, eid).

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