The Artima Developer Community
Sponsored Link

Design Forum
Ternary relationship (many-to-many)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
The Searcherrr

Posts: 1
Nickname: searcherrr
Registered: Aug, 2006

Ternary relationship (many-to-many) Posted: Aug 4, 2006 1:10 AM
Reply to this message Reply
Advertisement
This question does not so much pertain to MySQL as it does database design in general. I am however using MySQL for my project and I've been stumped for a couple days now on the many-to-many relationship issue even though I've had two other friend developers explain it to me. What I need is someone who can articulate an answer from basic to advanced in description. My main problem is that I understand "how you set it up", but I'm failing to see how (what method of thinking or whatever) the join or junction table gets updated (how its managed) after the relationships are established. I will site an example:

Tables
employee | fields: employeeid (PK) and employeename
project | fields: projectid (PK) and projectname
emp_proj (junction table) | fields: employeeid & projectid - both form a composite PK

I have these relationships SETUP in a sample MS Access Database just to play around with, but again I am using MySQL in my project that this whole issue pertains to.
I can insert and delete to the employee and project table just fine, but I get constraint violations when I try to update/manage the junction table. What am I missing? What is the SQL I'd use to update the junction table and make it useful data?

Whats really bothering me is that I could be this far along with understanding the many-to-many relationship and still not be getting it.... how to manage the junction table itself. Like: When do I manage it? How do I manage it? I think a lot of this has to do with stress and anxiety too since I'm a lil behind on the project. I think I have the answer, but I need someone to shake it out of me so anyone that can help would be greatly appreciated.

Topic: web designers and web developers Previous Topic   Next Topic Topic: Where does CORBA stand today?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use