Exactly. Thank you. MySQL Workbench asks for the type of connection then you draw it in and it adds code to your project. In this case it is too complex for a simple abstract visual tool.
Gary Jeurink -----Original Message----- From: Ted Roche [mailto:[email protected]] Sent: Saturday, October 13, 2012 7:54 AM To: [email protected] Subject: Re: on line class Gary: I don't know the details of the diagramming tool you are using, but I certainly understand the conceptual idea behind teams and games: The Team table is actually being used twice, aliased as "Home" and "Visiting" teams. Each team record in the table has a zero-or-one-to-many relationship with the records in the games table. So, on the conceptual level, the games table is a many-to-many table between "Home" and "Visiting." Since the two team tables are really one physical table, that means there are two relations from the team PK to the home_fk and visit_fk fields in the games table. Games is more than a simple many-to-many of course, since teams can meet more than once (and in the case of a double-header, on the same date, so that's a bad differentiator!), so the games table would include additional information like when the game took place, what the score was, etc. Does this make sense? On Fri, Oct 12, 2012 at 2:59 PM, Gary Jeurink <[email protected]> wrote: > I'm taking my football database from vfp-9 and making a new one using mysql > workbench. The tutorial wants me do a diagram and draw the relationships > between tables; 1 to 1, 1 to many and so on. I have a table of col_teams and > a table of col_games. The games table has a home_tm and visit_tm fields so > how do I draw the relationship from the team table to the game table when it > could be home team or visiting team? It makes sense when I do views but how > do you do an EER diagram. > > > > Gary Jeurink > > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/0ED52CD2CEEF45BD8786893466AA8EE8@OwnerPC ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
