MySQL Forums
Forum List  »  MySQL Workbench

Re: Create database with relationships using diagram
Posted by: Mike Lischke
Date: January 25, 2010 02:43AM

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/

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Create database with relationships using diagram
1531
January 25, 2010 02:43AM


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.