Latest

6/recent/ticker-posts

Consider the E-R diagram in the following Figure , which models an online bookstore.a. List the entity sets and their primary keys.b. Suppose the bookstore adds music cassettes and compact disks to its collection. The same music item may be present in cassette or compact disk format, with differing prices. Extend the E-R diagram to model this addition, ignoring the effect on shopping baskets.c. Now extend the E-R diagram, using generalization, to model the case where a shopping basket may contain any combination of books, music cassettes, or compact disks.

 Consider the E-R diagram in the following Figure  , which models an online bookstore.




a. List the entity sets and their primary keys.

Solution:

The entity sets are:

i) Author ( name, address, URL)

ii) Book(year, title, year, ISBN)

iii) Warehouse(code, phone, address)

iv) Publisher(name, address, URL, phone)

v) Shopping Basket(basket ID)

vi) Customer(name, address, phone, email)

b. Suppose the bookstore adds music cassettes and compact disks to its collection. The same music item may be present in cassette or compact disk format, with differing prices. Extend the E-R diagram to model this addition, ignoring the effect on shopping baskets.

Solution:



c. Now extend the E-R diagram, using generalization, to model the case where a shopping basket may contain any combination of books, music cassettes, or compact disks.

Solution:



Post a Comment

1 Comments