Results 1 to 3 of 3
  1. #1
    jongar is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    1

    Relationship between Orders and Customers

    Hi guys!

    I am creating my first real database and I ran into a problem and would like some help.

    I am having trouble creating the right relationship between two tables, Customers and Orders. Normally people think of orders as having one customer, my orders have 2 customers. In my Customers table I have the key field for customer number (CustomerID)and their name, phone etc. In the order table I have the key field order number (OrderID) and other info pertaining to the order, I also have the Sender Customer field (SendCustID) and the Receiver Customer Field (RecCustID). My question is, Is it correct to create a 1 to many relationship between CustomerID and SendCustID PLUS CustomerID and RecCustID? so that is 2 relationships for the same field in the Customers table


    For some reason this feels incorrect and I do not want it to come back to haunt me later.
    Thanks guys!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    see this link for more info

    If you are new to database, work through this tutorial to get an appreciation of design concepts.
    It will take 30-45 minutes, but you'll learn.

    Good luck.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    There is nothing wrong with linking your customers to your orders multiple times, I do it all the time for things like survey questions and answers where I have 1 table holding all the questions on the survey and another table holding all the answers and the questions they belong to. However when you build queries etc. you will have to add your customers table 1 time for each link you intend to establish. In this case you have a SendCustomerID and a ReceiveCustomerID so you'd have to add your customer table 2 times when you go to produce reporting.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-09-2014, 11:29 PM
  2. Enter Orders for Multiple Customers in a Form
    By nelsonsbrian in forum Forms
    Replies: 1
    Last Post: 07-16-2013, 03:29 PM
  3. Replies: 5
    Last Post: 08-08-2012, 05:35 AM
  4. Purchase orders 2 in 1
    By jordanturner in forum Forms
    Replies: 1
    Last Post: 09-09-2010, 03:38 AM
  5. Replies: 1
    Last Post: 05-05-2010, 10:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums