Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    13

    Unanswered: Data for many to many hybrid table

    Hi all,

    This is my first time creating a real database with a real purpose and as such have never had to work this out.

    I have two tables: Deliveries and Locations. Each delivery has two (i.e. many) locations, pickup and drop off. And each location has (potentially) many deliveries. I've resolved this N:N relationship by using two hybrid tables (is there a more correct term?): PickupLocation and DropoffLocation. Each table has three fields: Pickup/DropoffLocationID, DeliveryID, and LocationID.

    How do these two tables acquire their data? I'm guessing that an insert query is the way it's generally done. Is this correct? If so, can you please provide details? If there's a better suggestion or method what is it and can you please provide details? Is my general solution to this N:N relationship correct?

    Second question: Pardon my post as I'm sure such a topic has been posted and answered already. However, my searches turned up fruitless... What keywords would you have searched under to research this topic?

    All the best, Sam

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by topdotter
    Hi all,

    This is my first time creating a real database with a real purpose and as such have never had to work this out.

    I have two tables: Deliveries and Locations. Each delivery has two (i.e. many) locations, pickup and drop off. And each location has (potentially) many deliveries. I've resolved this N:N relationship by using two hybrid tables (is there a more correct term?): PickupLocation and DropoffLocation. Each table has three fields: Pickup/DropoffLocationID, DeliveryID, and LocationID.

    How do these two tables acquire their data? I'm guessing that an insert query is the way it's generally done. Is this correct? If so, can you please provide details? If there's a better suggestion or method what is it and can you please provide details? Is my general solution to this N:N relationship correct?

    Second question: Pardon my post as I'm sure such a topic has been posted and answered already. However, my searches turned up fruitless... What keywords would you have searched under to research this topic?

    All the best, Sam
    Sam,

    Actually this is a 1:M relationship ... Location to deliveries. Where you would have 2 Location IDs within the Deliveries table for the pickup and dropoff locations ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jun 2004
    Posts
    13

    Locations relationship

    So are the fields PickupLocation and DropoffLocation in the Deliveries table actually lookup fields with no relationship to Locations?

    Sam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •