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 > database design

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-09-04, 04:45
frozty frozty is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
database design

Hi,

I have a scenario where an Order belongs to a customer, but the order also has a Referer - which can be a customer in other situation. i.e, customer A & B. In one situation, A could be a direct customer, but in another situation A could be just a referer for B, and that needs to be recorded in the Order table.

What would be the best way to design this? At the moment all I have in mind is just two relationships between Customers table and Orders table, but it doesn't seem right.

Please help..
Reply With Quote
  #2 (permalink)  
Old 03-09-04, 08:32
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
That sounds fine to me. One relationship from customer to order, and a second relationship from referer to customer. To borrow a phrase from an almond joy commercial: Some days you feel like a nut, some days you don't!

-PatP
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