then list the relationships
Make a table for each entity, identify the key attributes.
Make a table for each relationship, in which the columns are keys in the tables for the
entities that the relationship is connecting.
Please apply this rule to the following problem for which no E-R diagram is given.
From here on you are (more or less) on your own.
The Computer Science Department has a small library.
Here are some examples of books you should expect to find in this library:
- Friedman,
- Knuth,
- Ullman,
- Gosling,
- Salomaa,
- Barendregt,
- Conway,
and many other outstanding books. Design and populate a database that a library could use.
Here's what's needed for this assignment:
- Books should be stored in the database.
- Library patrons (students) should be stored in the database.
- When a patron checks out a book that information should be stored in the database.
- When a patron returns a book we also want to store that information.
- When a patron returns a book the patron can rate the book (scale 0-4, 4 is best).
Books can be borrowed for a period of two weeks only.
You want to be able to query the database in the following ways:
- List all books currently overdue sorted by the patron's name.
- List all existing books sorted by their average ranking.
- List the patrons sorted by total number of books ever borrowed.
- List all good books (average ranking greater than 3.3) that are overdue.
- List all books on a particular topic (e.g., Access) sorted by their ranking.
Accomplishing each of these goals amounts to 10 points on a 0-100 scale.
I will post some sample data here tonight, and an example scenario.
Last updated: September 13, 2001 by Adrian German for A114/I111