[Main Page]
[Literature]
[Software]
[People]
[Conferences]
[Courses]
[Web-DB]
UNIVERSITY OF PITTSBURGH
School of Information Sciences
INFSCI 2710 - Database Management
(Spring 2000, CRN 20727)
Homework Assignment #2: ER-Model (Constraints)
Reading Assignment
Please read the following chapter from the book by Elmasri and Navathe
(3rd Edition):
- Chapter 4, "Enhanced Entity-Relationship and Object Modeling"
(39 pages)
We will treat this chapter only partially (4.1, 4.2, 4.3).
Exercise 2 (10 Points)
Suppose we want to store information about cities, countries, and rivers.
Please develop an entity-relationship schema for a database
containing the following information:
- For each country (e.g. "USA", "Germany"),
we want to store the name and the population.
Countries are uniquely identified by their name.
We also want to store the capital city of the country.
Each country has exactly one capital city.
- For each city,
we want to store the name, the state, the population,
and the country in which the city lies.
We assume that cities are uniquely identified by name and state together.
There can be cities with the same name in different states.
Also,
each city lies in a uniquely determined country.
- For each river,
we want to store the name and the length.
We also want to store through which countries the river flows.
We assume here that every river is uniquely identified by its name
(which is probably not true, but do not worry about this).
A river must flow through at least one country,
but can flow through many countries.
It is conceivable that there are countries without rivers
(at least without rivers in our database).
You do not have to specify data types for the attributes.
However, you must specify keys and cardinalities.
Please specify also one additional constraint in natural language
(which is not expressed by the diagram).
You may submit handwritten diagrams,
but please make sure that everything is readable.
Due Date:
Since we didn't finish the treatment of the constraints,
this homework is only due on Wednesday in two weeks (February 2)
before the lecture.
Stefan Brass
(sbrass@sis.pitt.edu),
January 19, 2000
Original URL:
http://www2.sis.pitt.edu/~sbrass/db00_2/h2_ermod.html
[HTML 3.2 Checked]