If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Design help [attached pdf diagram]

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-05, 02:40
DavePelz DavePelz is offline
Registered User
 
Join Date: Dec 2005
Posts: 2
Arrow Design help [attached jpg diagram]

Hi, just had few design questions about a database im working on.

1. The coffee and tea tables both have product_upc as a primary key, but this seems to be a problem when trying to use them both as a foreign key for inventory.

2. I was wondering if there are going to be possibly thousands of users per group, around 10 stores per group and around 300 inventory entries per store if i should make a seperate db for each group. The reason in had them in one db was because i wanted to keep the detailed product info together so it would be easy to update.
Attached Images
File Type: jpg ftb2ns-image2.jpg (42.1 KB, 88 views)

Last edited by DavePelz; 12-22-05 at 02:52.
Reply With Quote
  #2 (permalink)  
Old 12-22-05, 14:02
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
You've got your cardinalities wrong, but your design seems Ok to me. To give you a hint, the Inventory is actually the parent in a decomposition into coffee and tea.

-PatP
Reply With Quote
  #3 (permalink)  
Old 12-22-05, 16:57
DavePelz DavePelz is offline
Registered User
 
Join Date: Dec 2005
Posts: 2
Alright so then would these cardinalities be right?

What im trying to describe in the diagram is a price reporting system. Where each group represents a different geographic location and Where Inventory is a collection of all the prices and corresponding product_upc's, user_id's, and store_id's reported from every store in every region.

So there may be thousands of coffee and tea entries with only a hundred associated with the inventory table because not all will have prices reported by a user. And there may be multiple of each product in inventory because it could be reported at more than one store.
Attached Images
File Type: jpg ftb2ns-image3.jpg (56.8 KB, 99 views)

Last edited by DavePelz; 12-22-05 at 20:26.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On