Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Tony Johansson" Newsgroups: comp.databases.ms-sqlserver Subject: Problem with E-R model Date: Fri, 6 Feb 2015 18:40:44 +0100 Organization: A noiseless patient Spider Lines: 45 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Injection-Date: Fri, 6 Feb 2015 17:40:23 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="8fdc2b5af81c338deb7045fc6c39b0e2"; logging-data="5718"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mYvkXhWvLjcOv6w3L0SxG" X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-Newsreader: Microsoft Windows Mail 6.0.6002.18197 Cancel-Lock: sha1:kCPYeT1vbWrgqTefXVHY9C8U2tc= X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com comp.databases.ms-sqlserver:1876 This is a question about horse jumping. I have these relations one Rider can have many horses but one horse can only be owned by one rider.So here we have one to many counted from the Rider side. One Rideclub can have many member which is Riders but one Rider can belong to only one RideClub. So here we have one to many counted from Rideclub One Rider can participate in many classes and one class can have many Rider so here we have many to many. For example Nisse Hult owns the two horses Trisdan and Sylfid. In my current E-R design I can tell which horse the Rider is using in a special class I can only know that Nisse Hult is using any of the horses that he owns. If I for example change the conditions so that I have one to one relationhip between Rider and Horse that will solve the problem because if Hisse Hult is starting in a class he owns only one horse. The other solution is that I can create a new table with is the contents of Horse and Rider and then remove the Horse and Rider. But if I do so I get a lot of double information as you can see here. So if I do this I can see directly which horse Nisse Hult is using becuse the Id will be put in the relation table in between Rider and Class Id social sec number Rider Horse ImgHorse DescHorse ImgRider RiderDesc Phone 1 123456-0001 NisseHult Trisdan ImgTrisdan Info about Trisdan img Nisse Hult Info Nisse Hult 123 45 2 123456-0001 NisseHult Kitty ImgKitty Info about Kitty Img Nisse Hult Info Nisse Hult 123 45 I hope you can understand what I'm trying to say. So what is the best solution if I want to know which Horse the Rider is starting with in a Class? //Tony