Many to many relationship problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chrisbo
    New Member
    • May 2007
    • 4

    Many to many relationship problem

    I have three tables and want to create a many-to-many relationship between them. The main table [PHOTO] has a composite primary key



    This can't be done, though. The relationship between [Photo_motivetyp e] and [Motivetype] is easy, but I get this message as I try to connect Photonr and Photonr2 in the tables [PHOTO] and [Photo_motivetyp e]


    It feels like I'm missing something here. How can I do to establish this relationship?

    /Chris
  • OraMaster
    New Member
    • Aug 2009
    • 135

    #2
    Try to post some more details like tables structure and expected relationship.

    Comment

    • chrisbo
      New Member
      • May 2007
      • 4

      #3
      Ok.
      I have a number of records with information about photos. Each one could correspond to zero or more motivetypes from the list.

      A photo is identified by two integers, photonr and photonr2.

      I want to use this relationship as if there was only a single primary key in the [photo] table instead of two.

      One purpose with the relationship would be that when deleting a [photo] record, the corresponding record(s) in [Photo_motivetyp e] should also be deleted.

      Comment

      Working...