Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    10

    Unanswered: One to many relationship

    Hi

    I have 2 tables Image and ImageSet

    Image
    ImgID = AutoNumber pk
    Path = Text
    File = Text

    ImgID Path File
    1 C:\Images abc.jpg
    2 C:\Images def.jpg
    3 C:\Images ghi.jpg

    ImageSet
    ImageSetID = AutoNumber pk
    ObjID = Number
    Img1 = Text
    Img2 = Text
    Img3 = Text

    ImgSetID ObjSet Img1 Img2 Img3
    1 1 1 2 3 (the values from Img1 to Img3 refer to ImgID)

    I'm not sure if I can have a One to many relationship between Image at the one end and ImageSet at the many end.

    Each of the fields in ImageSet needs to get an ImageID value in order to avoid repeating data. Can someone advise me whether I'm heading in the correct direction

    Thanks ViRi

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Whenever you have or are tempted to put numbered fields in a table it indicates a table design problem - it indicates that you need another table for those fields you are numbering.

    I'm not sure what goal you are trying to answer with this design either, so I can't advise much further.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Feb 2008
    Posts
    10
    Thanks for your reply.

    I've decided to do away with table Image altogether and just store the image paths in the ImageSet Table

    thanks again

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Sounds wise

    And you're welcome.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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