Question

In: Computer Science

Consider the following ER diagram, which models an online bookstore. As per the attached picture in...

Consider the following ER diagram, which models an online bookstore.

As per the attached picture in the attached link :
https://www.google.com/imgres?imgurl=https://media.cheggcdn.com/study/45a/45a5708f-f2b8-4864-99a3-284d8c13e235/5924-7-20EEI1.png&imgrefurl=https://www.chegg.com/homework-help/consider-e-r-diagram-figure-729-models-online-bookstore-lis-chapter-7-problem-20e-solution-9780073523323-exc&tbnid=q173_TY0HXF25M&vet=1&docid=hPpMlzEq8SYJYM&w=756&h=688&hl=en&source=sh/x/im

A. List the entity sets and their primary keys.

B. Map the ER to appropriate schema showing the different relations.

Solutions

Expert Solution

Question A:

Entity sets in the given Diagram :

1) Author entity set :

  • Attributes are : name , address , URL
  • Primary Key : name

2) Publisher entity set:

  • Attributes are : name , address , phone ,URL
  • Primary Key= name

3) book entity set :

  • Attributes are : ISBN , title , year , price
  • Primary Key = ISBN

4) Shopping_basket entity set

  • Primary key = basket_id

5) warehouse entity set

  • Attributes are : code , address, phone
  • Primary Key =code

6) Customer entity set

  • Attributes are : email , name , address, phone
  • Primary Key = email

Question B:

Map the ERD to relational schema :

1) There are one and more books written by one author so there are M:1 relationship between book and author so the PK of Author table is act as FK in Book table .

2) As one or more books are published by one publisher so there are M:1 relationship between book and publisher . so the PK of Publisher table act as FK in Book table

3) There are  one or more books are contains in one or more Shopping_basket so there are M:N relationship between them. And for M:N relationship a different relation is create for them in which the PK of both table act as FK.

4) As one or more books are store in the stocks of one warehouse so there are M:1 relationship between Book and warehouse where the PK of warehouse act as FK in Book table.

5) There are one or more shopping basket is used by one customer so there are M:1 relationship between Shopping_basket and Customer . The PK of Customer table is used as FK in Shopping_basket table.


Note : Both name of author and publisher are written by same name so I put the name of publisher by pub_name  to differentiate them.

ERD :

ERD Mapping:

Thank you.............


Related Solutions

Construct an ER diagram for a database system that models data of the following situation. You...
Construct an ER diagram for a database system that models data of the following situation. You are creating a database for a stock trading company. The company has clients and financial officers. Each client is either an individual or another legal entity (e.g. another company). A client has a name, social security number, address, contact information, the date that entered the database system, and also a ranking that the trading company keeps internally (high, med, low). Financial officers have a...
) Consider a physical bookstore, such as in a shopping mall. Make a use case diagram...
) Consider a physical bookstore, such as in a shopping mall. Make a use case diagram for a physical bookstore checkout system
5.Consider again the picture you selected in question #3. What’s attached to the 5’ end of...
5.Consider again the picture you selected in question #3. What’s attached to the 5’ end of this molecule? (BOLD the correct answer)    A phosphate group    OR    An OH group (which is attached to the ribose sugar) 6.Consider again the picture you selected in question #3. The way it’s drawn on this page, the bottom end of this molecule is considered to be the…(BOLD the correct answer)             3’ end      OR      5’ end
Draw the diagram (ER / MR / UML) for a database containing the following characteristics: •...
Draw the diagram (ER / MR / UML) for a database containing the following characteristics: • Presence sensor that stores presence information with its timestamp and its location. • Distance sensor that saves distance information with its timestamp and its location. • An actuator of a switch that energizes a bulb, where the record of its been with your timestamp and your location. • An actuator of a motor that opens a door, where the record of its been with...
Draw the ER diagram for the following: Emerging Electric wishes to create a database with the...
Draw the ER diagram for the following: Emerging Electric wishes to create a database with the following entities and attributes: (10) • Customer, with attributes Customer ID, Name, Address (Street, City, State, Zip Code), and Telephone • Location, with attributes Location ID, Address (Street, City, State, Zip Code), and Type (values of Business or Residential) • Rate, with attributes Rate Class and RatePerKWH After interviews with the owners, you have come up with the following business rules: • Customers can...
Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of...
Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of accounts and amounts reported in its accounting records. The accounts have normal debit or credit balances. Assume the year ended on September 30, 2018. Accounts Payable $ 591 Accounts Receivable 291 Accumulated Depreciation 891 Cash 291 Common Stock 191 Deferred Revenue 191 Depreciation Expense 291 Equipment 3,191 Income Tax Expense 291 Interest Revenue 91 Notes Payable (long-term) 191 Notes Payable (short-term) 491 Prepaid Rent...
ElecBooks Corporation provides an online bookstore for electronic books. The following is a simplified list of...
ElecBooks Corporation provides an online bookstore for electronic books. The following is a simplified list of accounts and amounts reported in its accounting records. The accounts have normal debit or credit balances. Amounts in the list of accounts are rounded to the nearest thousand dollars. Assume the year ended on September 30, 2017.      Accounts Payable $ 221   Accounts Receivable 191   Accrued Liabilities 354   Accumulated Depreciation 300   Cash 307   Contributed Capital 151   Depreciation Expense 340   General and Administrative Expenses 357...
ElecBooks Corporation provides an online bookstore for electronic books. The following is a simplified list of...
ElecBooks Corporation provides an online bookstore for electronic books. The following is a simplified list of accounts and amounts reported in its accounting records. The accounts have normal debit or credit balances. Amounts in the list of accounts are rounded to the nearest thousand dollars. Assume the year ended on September 30, 2017.      Accounts Payable $ 233   Accounts Receivable 195   Accrued Liabilities 358   Accumulated Depreciation 304   Cash 311   Contributed Capital 155   Depreciation Expense 344   General and Administrative Expenses 361...
Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of...
Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of accounts and amounts reported in its accounting records. The accounts have normal debit or credit balances. Assume the year ended on September 30, 2015.      Accounts Payable $ 590   Accounts Receivable 290   Accumulated Depreciation—Equipment 890   Cash 290   Common Stock 190   Depreciation Expense 290   Equipment 3,190   Income Tax Expense 290   Interest Revenue 90   Notes Payable (long-term) 190   Notes Payable (short-term) 490   Prepaid Rent 90   Rent...
Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of...
Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of accounts and amounts reported in its accounting records. The accounts have normal debit or credit balances. Assume the year ended on September 30, 2018. Accounts Payable $ 602 Accounts Receivable 302 Accumulated Depreciation 902 Cash 302 Common Stock 202 Deferred Revenue 202 Depreciation Expense 302 Equipment 3,202 Income Tax Expense 302 Interest Revenue 102 Notes Payable (long-term) 202 Notes Payable (short-term) 502 Prepaid Rent...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT