I'm mapping out an entity relationship diagram to try learn more about database design. I currently have approximately 17 tables that map out a quotation management system that quotes customers prices for products and/or services. I've been working on it for a number of days now but I am unable to find resources/help relating to the following
The entities/tables within the scenario I'm having trouble with are as follows:
- Customer
- Quote
- QuoteItemListing
- ProductItems
- ServiceItems
- Products
- Services
Relationships
Customer (requests) Quote
Quote (has) QuoteItemListing
QuoteItemListing (may have) ProductItems
QuoteItemListing (may have) ServiceItems
ProductItems (are) Products
ServiceItems (are) Services
Essentially, I wish to be able to reference the IDs of the Products and Services a customer wishes to get a quote on in one table (QuoteItemListing). Could anyone please point me in the right direction? Thanks a lot.
My tables at present:
Customer
ID
name
address
phone
Quote
ID
customerFK
QuoteItemListing
ID
quoteFK
ProductItems
ID
productFK
quantityRequired
quoteOrderFK
ServiceItems
ID
serviceFK
quoteOrderFK
Product
ID
name
price
Service
ID
name
hourlyRate
hoursRequired