Topic Test 2 - Solutions: Book# Title Author Type Price
Topic Test 2 - Solutions: Book# Title Author Type Price
Books
Book# Title Author Type Price
23456 1812 Vidal 4 $39
834592 Gone With the Wind Mitchell 4 $19
4539 Webster’s Unabridged Dictionary Webster 3 $86
33982 Hunt for Red October Clancy 1 $22
33983 Hunt for Red October Clancy 1 $22
43928 Joy of Cooking – 5th Edition Smith 2 $45
Circulation
Borrow# Book# Date Borrowed Returned
A83765 4539 7/1/98 Yes
A83765 33982 7/1/98 No
C52938 4539 7/4/98 No
C77328 43928 7/6/98 Yes
Cardholders
Borrower# LastName FirstName Address City State Zipcode
A23457 Smith Michael 222 East 7th ST Bexley OH 43209
C52938 Jones Jennifer 18 Main Street Dublin OH 43218
A83765 Walters John 55 Elm Street Columbus OH 43213
The tables above represent the database system for the Fergie Library. The Book table lists the
names of all the books and periodicals owned by the library. The Cardholder table lists the
names of all authorized library users. The Circulation table is a running list of books that are
borrowed. When books are borrowed, they are entered onto this table, and when they are
returned, the original entry is noted as returned.
1. (2 points ) Database Relationships. Set up the relationships of this database. Using the
boxes below, fill in the primary key (if any) of each table and draw relationship lines
between tables. Label each relationship with the name of the foreign key(s).
Foreign Key
_Book#___
Table name:
Circulation
Primary Key
none Table name:
Table name: Cardholders
books
Primary Key
Primary Key Borrower#
Book#
Foreign Key
_Borrow#___
______
1
2. What field type (Text, Number, Currency, Date/Time, Yes/No, AutoNumber) is best suited
for each of the following fields:
3. Using the query design view below, construct a query to list the book titles and authors of all
the type 4 books in alphabetical order by author then book.
Total
Show x x
Criteria 4
OR
OR
4. List the dynaset created from the query in question #3 based solely on the data shown.
Author Title
Mitchell Gone With the Wind
Vidal 1812
2
5. List the title of all books that begin with the letters G or J.
Field Title
Table Books
Total
Sort
Show x
OR Like “J*”
OR
6. List the book# and borrow# of all books borrowed between June 1, 1998, and July 4, 1998.
Sort the list by the borrower’s number.
Total
Sort Ascending
Show x x
<=#7/4/98#
OR
OR
3
7. List the title of all books that are either type 1 and cost less than $25 or type 2 and cost less
than $50.
Total
Sort
Show x
Criteria 1 <25
OR 2 <50
OR
8. Write a query that will summarize the books by author. The query should list the author’s
name, the total number of books in your collection by that author, and the average price of
that author’s books.
Sort
Show x x x
Criteria
OR
OR
4
9. The library would like to calculate the accrued fines for lost books. You will assume that all
books borrowed before January 1, 2001, and not returned are lost. The following fine is
charged for all lost books: $.05 per day from the date borrowed plus a $10 flat fee handling
charge. For each lost book, list the book number, the borrower number, and the fine.
Total
Sort
Show x x x
OR
OR