Re: Create database with relationships using diagram
Andy,
creating a relationship will also create the foreign key in the referencing table.
There are a few options to create a relationship. You can do that with the (1)-(6) tools (the number in parentheses is the hot key you can press to activate it after you selected a table). These tools create new columns in the participating tables and connect them in the relationship. Or you can use tool (7) to create a relationship which uses existing columns. Tool (6) has the side effect to create a helper table that is used to model the n:m relationship. The "identifying" setting can be changed at any time by double clicking a relationship to open its editor and changing the appropriate setting on the "Foreign Key" tab.
Mike
Mike Lischke, MySQL Developer Tools
Oracle Corporation
MySQL Workbench on Github:
https://github.com/mysql/mysql-workbench
On Twitter:
https://twitter.com/MySQLWorkbench
On Slack: mysqlcommunity.slack.com (#workbench)
Report bugs to
http://bugs.mysql.com
MySQL documentation can be found here:
http://dev.mysql.com/doc/refman/8.0/en/
Subject
Views
Written By
Posted
3302
December 01, 2009 01:38PM
1878
December 01, 2009 03:17PM
1611
December 01, 2009 03:34PM
1650
December 08, 2009 10:26AM
1618
January 20, 2010 09:17AM
1260
January 21, 2010 12:26PM
Re: Create database with relationships using diagram
1531
January 25, 2010 02:43AM
1587
January 25, 2010 07:51AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.