Exercise: library books

You are building a very simplified beginning of the database for a library. The library, of course, owns (physical) books that are stored on shelves and checked out by customers. Each of these books is represented by a catalog entry (now in the computer, but think of an old-fashioned card file as a model of this). Assume that there is only one “title” card for each book in the catalog, but there can be many physical copies of that book on the shelves. Call the title card class a “CatalogEntry” and the physical book class a “BookOnShelf.”

• You might think of the book’s publisher as a simple attribute of the catalog entry—but in fact, the library will probably want to know more than just the publisher’s name (for example, the phone number where they can contact a sales representative).

• Describe each class in English.

• Draw the class diagram.

• Describe each association in English (both directions).

• Draw the relation scheme.

The solution to this exercise will be discussed in class or online at a later date.