0% found this document useful (0 votes)
51 views

Topic Test 2 - Solutions: Book# Title Author Type Price

This document contains information about a library database including three tables: Books, Cardholders, and Circulation. The Books table lists book information. The Cardholders table lists library users. The Circulation table tracks books that are borrowed and returned. Nine questions are provided to test understanding of the database structure and to write queries to extract and summarize information from the tables.

Uploaded by

Viet Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Topic Test 2 - Solutions: Book# Title Author Type Price

This document contains information about a library database including three tables: Books, Cardholders, and Circulation. The Books table lists book information. The Cardholders table lists library users. The Circulation table tracks books that are borrowed and returned. Nine questions are provided to test understanding of the database structure and to write queries to extract and summarize information from the tables.

Uploaded by

Viet Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Topic Test 2 - Solutions

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:

Borrow# (Circulation Table) __Text_____________________


Date Borrowed (Circulation Table) __Date/Time_____________________
Returned (Circulation Table) __Yes/No or Boolean___
Address (Cardholders Table) __Text_____________________

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.

Tables Used ___Books____________________________

Field Author Title Type

Table Books Books Books

Total

Sort Ascending Ascending

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.

Tables Used _____Books _________________________

Field Title

Table Books

Total

Sort

Show x

Criteria Like “G*”

OR Like “J*”

OR

Criteria could also be in the same box

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.

Tables Used ______ Circulation___________________

Field Book# Borrow# Date Borrowed

Table Circulation circulation Circulation

Total

Sort Ascending

Show x x

Criteria >=#6/1/98# And

<=#7/4/98#

OR

OR

Can also use criteria: between #6/1/98# And #7/4/98#

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.

Tables Used ___books__________________________

Field Title Type Price

Table books books books

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.

Tables Used ________books_______________________

Field Author any field Price

Table Books books Books

Total Group By Count Avg

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.

Tables Used ___circulation_________________________

Field Book# Borrow# Fine: 10 Date Borrowed Returned


+ .05*(#today’s
date# -
[Circulation}!
[Date
Borrowed])
Table Circulation Circulation Circulation Circulation

Total

Sort

Show x x x

Criteria < #1/1/01# No

OR

OR

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy