By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Many to many relationship problem

P: 4
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_motivetype] and [Motivetype] is easy, but I get this message as I try to connect Photonr and Photonr2 in the tables [PHOTO] and [Photo_motivetype]



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

/Chris
Jan 14 '10 #1
Share this Question
Share on Google+
2 Replies


OraMaster
100+
P: 135
Try to post some more details like tables structure and expected relationship.
Feb 19 '10 #2

P: 4
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_motivetype] should also be deleted.
Feb 19 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.