Results 1 to 8 of 8
  1. #1
    Iain is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Aberdeenshire, Scotland
    Posts
    42

    Table Relationships - Multiple use of the same table

    I'm trying to work out a suitable relationship in a database containing a number of routes made up from locations and would like to know if the following relationship is sound.


    Each route can consist of one location or be as long as the number of RelatedLocations entered.
    It would be helpful for the user to select each Location and RelatedLocation by LocationName.
    There is more that a thousand Locations which can be imported from another table and a combo box used to select.



    Click image for larger version. 

Name:	Relationships.jpg 
Views:	38 
Size:	38.9 KB 
ID:	8233

  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,849
    Please tell us more about what you are trying to do. Perhaps 3 or 4 lines about what the database is about.

  3. #3
    Iain is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Aberdeenshire, Scotland
    Posts
    42
    This is still in the embryonic stage but very roughly:

    The database is essentially a personal log of mountain walking routes completed by a club member.
    Each Mountain can be climbed on it's own or with other mountains.
    So, Mtns 1, 2, 3, 4, & 5 could be climbed on their own or in any combination depending on the route compiled by the club member.
    E.g Mtn 1 could be climbed with along with Mtn 2 and Mtn 3 but another route might be possible in conjunction with Mtn 4 & 5.
    The order the mountains appear on the log would reprsent the order they are climbed in.
    The relationship in #1 was thought to be a way in which the same table might be used for selection of the mountains from a table populated with all the mountain names, to minimise data imput on the part of the user.

  4. #4
    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,849
    Interesting, but not something I am familiar with. Do you have some sample data of
    the routes compiled by the club members
    ?

  5. #5
    Iain is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Aberdeenshire, Scotland
    Posts
    42
    Unfortunately not yet.
    The mountain names are all Scottish Gaelic names and not user friendly to non Gaelic speakers hence why I gave a generic description in #1.
    I suppose what I'm trying to achieve is a log record where one of the fields can hold multiple mountain names selected from the same table, and display these on a form like a small table or something, in a similar same manner which an attachment field works, where one record can have several attachments.

  6. #6
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    I noticed this thread some time ago and nothing has moved for four weeks. Orange please forgive me for jumping in but I have some ideas for Iain.

    Iain: You appear to be using a multi-value field in the Routes table. I don't think this is such a good idea. Instead what I believe would work for you is a separate table of route locations - for brevity I shall call this table, Waypoints. Each Waypoint record is a member of a chain (a chain could have only one link). Each Waypoint record 'points' to the next record, or points to the previous record, or both (or simply has a sequence number thus avoiding all those multiple table requirements). Here's what a 'sequence number' solution may look like for tblWaypoints.

    WaypointID (autonumber PK)
    RouteID (FK)
    LocationID (FK)
    SequenceNumber (number)

    The sequence number would have to be managed programmatically - quite easy to do actually.

  7. #7
    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,849
    No problem Rod. The ball is in Iain's court and I've heard nothing back on this forum.
    So, perhaps your post can get Iain's project re-activated.

    orange

  8. #8
    Iain is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Aberdeenshire, Scotland
    Posts
    42
    Quote Originally Posted by Rod View Post
    You appear to be using a multi-value field in the Routes table.
    Hi Rod,

    thanks for that suggestion.

    I have actually given up on this idea and instead of the multi-value field, I now use a series of foreign keys, pointing to the hills table, each with it's own combo box. This allows me to select a series hills that effectively act as waypoints.

    It is very basic but it serves the purpose and prevents any mispellings on the part of the user.

    That effectively closes this thread.

    Thanks again.

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

Similar Threads

  1. How to create multiple table relationships
    By robi212 in forum Access
    Replies: 1
    Last Post: 03-30-2012, 07:59 AM
  2. Table Relationships
    By ledbyrain in forum Access
    Replies: 1
    Last Post: 09-07-2010, 05:05 PM
  3. Table Relationships
    By goestejs in forum Database Design
    Replies: 3
    Last Post: 08-23-2010, 07:39 AM
  4. Table Relationships
    By seanp in forum Access
    Replies: 2
    Last Post: 04-15-2010, 07:12 AM
  5. Table Relationships
    By jp2access in forum Database Design
    Replies: 3
    Last Post: 06-19-2009, 10:20 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