The Escuela

← MySQL Stored Functions: all 3 parts

Databases ยท Free practice

MySQL Stored Functions, Part 1: The University Database

Watch the lesson by Dr. J. Ubaldo Quevedo, then practice as many times as you want: every New button gives you a new data set or function.

1. Watch

  • Four tables: faculty(fid, fname, deptid), student(snum, sname, major, standing, age), class(name, meets_at, room, fid), enrolled(snum, cname).
  • class.fid references faculty; enrolled.snum references student and enrolled.cname references class.
  • enrolled's primary key is the pair (snum, cname): a student can take many classes, but not the same class twice.

2. Try it yourself

Practice as many times as you want. Every New button builds a new data set or function. It's free, and you don't need an account.

Correct so far: 0