Hi,
I'll just give a little guidance, so you could get
started.
From the problem description, the following entities are
necessary:
STORE,
PRODUCT,
COMPONENT,
VENDOR,
CUSTOMER.
With these, we can establish relationships between
them:
STORE - sells - PRODUCT (1-many),
PRODUCT - has - COMPONENT (many-many),
VENDOR - supplies - COMPONENT (many-many),
CUSTOMER - buys - PRODUCT (many-many),
STORE - buys - COMPONENT (1-many).
These tables may be possible:
PRODUCT (Prod #, ...),
COMPONENT (Comp #, Vendor #, ...),
VENDOR (Vendor #, ...),
CUSTOMER (Cust #, ...),
CUST_SALE (Sale #, Cust #, Prod #, ...),
STORE_PURCHASE (Purchase #, Store #, Comp #, ...).
Hope all these pointers will help you to complete
your assignment! Thanks.
P.S. ERD is not difficult:
1. The main thing is to identify the main players (i.e.
entities) and establish appropriate relationships between them.
2. For relationships, one should know that there are several
types, i.e. 1:1, 1:many, many:many.
3. For a table specific to an entity, one should always have a
unique serial number, plus some logical attributes.
4. For a table related to two entities, like CUST_SALE, the
table must capture the keys of both entities.
Cheers,
Wen Shih