Exercise: book authors

Refer back to the library book exercise if necessary. Remember that we couldn’t include authors in the CatalogEntry class because there might be more than one author for each book.

In a real (old-fashioned) library catalog (WikiPedia), there was an additional card for each author of a book. (Author and title cards were contained in different sets of card drawers.)

Design a database that shows the catalog entry plus authors, the attributes of each class, and the association between the classes by completing the steps below.

  1. Start by identifying and describing each class in English.
  2. Continue by drawing the UML class diagram by drawing the classes, but avoid filling in the attributes for now, just name the classes.
  3. Next, determine what relationships exist between the classes you identified. Draw each association in the diagram including the multiplicity constraints and describe in English (both directions) to make sure you've correctly modeled the information given.
  4. Now complete each class by filling in the attributes and their corresponding data type.
  5. Map the UML class diagram to the relational model by drawing the relation scheme diagram. Be sure to model all constraints such as any non-null attributes, primary key, and foreign key.

Your first version of this model might not have included a way to identify which author should be listed first, second, and so on. In real life, authors are very sensitive about this. Revise your model if necessary to accommodate this requirement.

The solution to this exercise may be discussed in class by your instructor or posted online at a later date.