Database Reference
In-Depth Information
Q&A
22
Question: A customer in branch 1 wants to purchase a copy of The Soul of a New Machine whose quality is
excellent. Is this topic currently in stock at branch 1?
Answer: No. Looking up the code for The Soul of a New Machine in the Book table, you find it is 3906. To
find out if copies are in stock at branch 1, look for a row in the Copy table with 3906 in the BookCode col-
umn and 1 in the BranchNum column. Because there is no such row, branch 1 doesn't have any copies of
The Soul of a New Machine.
Q&A
Question: You would like to obtain a copy of The Soul of a New Machine whose quality is excellent for this
customer. Which branches currently have it in stock, and how many copies does each branch have?
Answer: Branches 2 and 3 each have one copy of this topic whose quality is excellent. You already know that
the code for The Soul of a New Machine is 3906. (If you didn't know the topic's code, you would look it up in
the Book table.) To find out which branches currently have copies, look for rows in the Copy table with 3906
in the BookCode column. There are three such rows. The first row indicates that branch number 2 currently
has one copy of this topic. The Quality column indicates that the quality of this copy is excellent. The second
and third rows indicate that branch number 3 currently has two copies of this topic. The Quality column in
the second row indicates that there is one copy of this topic whose quality is excellent, and the third row
indicates that there is a second copy of this topic whose quality is good at branch number 3.
The E-R diagram for the Henry Books database appears in Figure 1-19.
Publisher
PublisherCode
PublisherName
City
Book
BookCode
Author
AuthorNum
AuthorLast
AuthorFirst
Title
PublisherCode
Ty p e
Paperback
Wrote
BookCode
AuthorNum
Sequence
Branch
Copy
BookCode
BranchNum
CopyNum
BranchNum
BranchName
BranchLocation
Quality
Price
FIGURE 1-19
E-R diagram for the Henry Books database
INTRODUCTION TO THE ALEXAMARA MARINA GROUP DATABASE CASE
Alexamara Marina Group offers in-water boat storage to owners by providing boat slips that boat owners can
rent on an annual basis. Alexamara owns two marinas: Alexamara East and Alexamara Central. In addition to
boat slips, Alexamara also provides a variety of boat repair and maintenance services to the boat owners who
rent the slips. Alexamara stores in a database the data it needs to manage its operations.
Search WWH ::




Custom Search