|
|
|
Due date: Wednesday, Jan. 30 at the start of class (1:30PM).
Instructions: Please turn your homework in at the start of class.
Weight: The homework will count approximately 5% of your final grade.
Each question has the same weight.
- Convert Figure 2.8 on page 44 of Korth and Silbershatz to a
schema in the network data model. The schema should diagram the records and
co-sets in the network data model.
- Exercise 2.8
- Consider a supplier-parts example database (modified from
an example in a book by C. J. Date). The database has three
relations, with the schema listed below.
Supplier (SName, City)
Part (PName, Color, Weight)
Shipment (SName, PName, Date)
Formulate the following queries in the relational algebra, tuple relational
calculus, and domain relational calculus.
- What are the dates on which a red part has been shipped by a
supplier in Paris?
- What is the name of the part(s) that was shipped earliest?
- List the cities that ship a part which is also shipped by a supplier
in Paris (in a different shipment)?
- Which suppliers have shipped at least two parts on the same date?
- On which dates has exactly one supplier made a shipment?
- What parts have been shipped by all of the suppliers?
- (Relational algebra only)
What is the name of the supplier that has shipped the fewest
parts, and how many parts did they ship (note that there
might be more than one such supplier)?
- Exercise 5.7
- Exercise 5.9
- Exercise 10.15
|