Library Database (cont’d)
Step 3. Determine relationship type. Ask:
- Each book is written by how many authors? Each author writes how many books?
- Each book may be authored by zero (anonymous), one, or more than one author and each author may write zero, one, or more than one book. The relationship type is many-to-many or:
- For PUBLISHER-publishes-BOOK, each publisher publishes zero, one, or more books and each book is published by exactly one publisher. The relationship type is one-to-many where BOOKS is on the many side and PUBLISHER is one the one side.