SQL_Assignment1
SQL_Assignment1
Assignment 1
Note: there is no requirement on ER diagram drawing. You are allowed to draw ER diagrams
using any tool. But you need to make sure that your drawing is clear enough. If the diagrams
are not clear, points will be deducted.
For the submission, please pack all files and convert them into A SINGLE PDF FILE. Rename
the PDF file as XXXX.pdf, where XXXX is your student ID.
Q1. Suppose you are the manager of a company. You want to design an ER diagram for your
company under the following assumptions. [Remember to express all cardinality and
participation constraints in your diagram.] (50 marks)
- Each department has a unique manager, who is an employee. An employee can be the
manager for at most one department.
- Each employee works for a unique department. Each department contains more than
one employee.
- Some departments can design product series. Each product series is designed by at most
one department.
- Each product series has one or multiple products.
- Some customers buy some products from the company. For such purchasing, we want
to know the purchasing date and payment method.
Write a query for each following question. Assuming students’ name and instructors’ name are
unique. (10 marks for each)