120 likes | 225 Views
Amazom.com “Product/Book Information Management Business Process”. Exam 1 Solution Package ACCT 302 Spring 2009. description. name. main. name. code. 0,1. 0,1. recommendation list. Book Category. Publisher. Representative. 0,N. 0,N. 0,N. 0,1. 0,N. 0,N. code. phone
E N D
Amazom.com“Product/Book Information Management Business Process” Exam 1 Solution Package ACCT 302 Spring 2009
description name main name code 0,1 0,1 recommendation list Book Category Publisher Representative 0,N 0,N 0,N 0,1 0,N 0,N code phone number assistant name address 1,N 1,1 1,N id Book Author name 1,N 0,N e-mail 0,N bdate ISBN# edate 0,1 1,1 ranking 1,N id Review price Ranking List text rating 0,N 0,1 descript. name 0,n id has-expertise-in Reviewer location name 0,N e-mail nickname INTEGRATED SOLUTION 0,N status
1 • We record at least one author for each book. • Some books have more than ten authors; this is especially the case for computer books. • We only consider authors that have published at least one book. • We sell all seven Harry Potter books by J.K. Rowling (author). 2 3 4 2 4 Book Author 1,N 1,N 1 3 1
We categorize books into 25 categories – children, history, fiction, business, cardinalities, IT (Information Technology), etc. • We record between one and three categories for each book (at least one; at most three). • We currently sell more than 500 books of category “children.” • It is possible to have a category for which there are currently no books. 1 2 3 4 • (has 25 instances) Book Book Category 1 1,N 0,N 2 4 3 2
We also record a book’s publisher (publishing company). • We would like to record information about as many publishers as possible. Stated differently, we might include a publisher even when we don’t sell books from that publisher. • We currently have more than 1000 titles (books) from Addison-Wesley (a publisher) for sale. • There is exactly one publisher for each book. 1 2 3 4 1 Book Publisher 1,1 0,N 4 2 3 3
We ask each publisher for one main representative and a number of assisting representatives. • …. but we don’t have any representatives for Microsoft Press (a publisher) yet. • Each representative works for (is associated with) only one publisher. • A representative is either a main representative or an assistant representative. 1 2 3 4 2 1 4 3 main 0,1 0,1 Publisher Representative 0,N 0,1 assistant 2 1 4 3 4
1 2 • There are two recommendations for the “Databases for mere mortals” book. • There are two recommendations for the “Microsoft Access Inside Out” book. • “SQL for mere mortals” does not appear in the “Book 1” column/role. 1 2 0,N 0,N • “Databases for mere mortals” does not appear in the “Book 2” column/role. recommendation list Book Book 1 has as recommendation Book 2 has as recommendation 5
Not all books have reviews • but most books have many reviews. • There is exactly one book per review. 1 2 3 Book Review 0,N 1,1 1 2 4 6
Most reviews are anonymous. • It is possible for a reviewer to create an account without submitting reviews. • However, most reviewers submit many reviews after they have created an account. • There is at most one reviewer per review. 1 2 3 4 Review Reviewer 0,1 0,N 1 3 2 4 7
Expert reviewers are asked to write reviews for specific books (and we record that information in the database).Each “expert reviewer” is asked to review at least one book. • We have asked Jimmy Buffet, an expert reviewer, to review each of the Harry Potter books (i.e., seven books). • No expert reviewer has been assigned to “What Not How. The Business Rules Approach to Application Development,” the latest book by C.J. Date (an author). • We never assign more than one expert reviewer to the same book. 1 2 3 4 • “Non-expert reviewers are instances of the Reviewer entity but are not asked to write reviews for specific books” Book Reviewer 0,1 0,N 3 4 1 2 8
Each expert reviewer has at least one area of expertise. • We don’t have an expert reviewer for the (book) category “cardinalities” yet. • We have more than twenty expert reviewers for the “children” (book) category (area of expertise). 1 2 3 • “Non-expert reviewers are instances of the Reviewer entity but don’t have an area of expertise” Reviewer Book Category 0,N 0,N 1 2 3 9
We further record the ranking per book per list. • We like to keep a history for each list, so we also record the period to which the ranking applies. The period is defined by a start date and an end date. For example “the Historian” (a book) was ranked number 2 (ranking) on the “Top Sellers” list (a list) in March (the period between 3/1/2009 and 3/31/2009). • Not all books appear on a list. Actually most don’t. • There is at least one book for each list. 1 2 3 4 2 1 bdate edate ranking Book Ranking List • “Implied by relationship attributes” 0,N 1,N 3 4 10