department ( name, chair ) professor ( ssn, name, employer ) student ( SID, name, dept ) course ( name, offered_by ) section ( course, number, taught_by, credits ) enrollment ( course, number, student )that has the following foreign keys:
department.chair → professor.ssn professor.employer → department.name student.dept → department.name course.offered_by → department.name section.course → course.name section.taught_by → professor.ssn enrollment.[course,number] → section.[course,number] enrollment.student → student.SIDBased on this schema, express the following queries in SQL (10 points for each query).
supplier ( sid, name, city ) customer ( cid, name, city ) product ( pid, name, category ) supplies ( sid, pid, quantity, price ) sales ( cid, pid, date, month, year, sale )with the following foreign keys:
supplies.sid → supplier.sid supplies.pid → product.pid sales.cid → customer.cid sales.pid → product.pidBased on this relational schema, express the following queries in SQL (10 points for each query).
You need to submit your homework solution online using the following web form. Acceptable document formats are: plain text, Microsoft word document, PDF, and postscript. You may submit it as many times as you like, but only the most recently submitted file will be retained and evaluated. Not that, this time we will not accept any email or hardcopy submission. If you cannot login or have a problem submitting the homework using this form, ask the GTA for help.
Last modified: 09/13/12 by Leonidas Fegaras