Solved

MySQL Workbench - drawing 1:n relationships on model diagram

Posted on 2015-02-14
4
124 Views
Last Modified: 2015-07-22
In the graphical display of tables and fields,
When i add a       1-to-many    relationship,      it does draw the line between the two tables,
but    (in Connect to Columns mode)   it adds a new field instead of using the foreign key already there which i had defined.

How can i connect from a specific EXISTING field (foreign index)  (on the "many" end of the arrow)  (which my naming convention uses, ColorID)   instead of having it add a new field in the table
tblColors_ID.

I'm also open to learn of tools other than WorkBench that can display/manipulate schema graphical diagrams.
I had used  FlashMySQLAdmin for years (albeit a few bugs, but workable and great looking results), which had a very nice graphical table interface and relationship editing interface, but alas it is no longer supported (PHP4, etc.).  (Someone should take it on and update it and sell it, quite a useful tool)

my example from above....

tblProducts            tblColors
ID                             ID
ColorID                   ColorName
0
Comment
Question by:willsherwood
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Evan Cutler earned 500 total points
ID: 40892813
When working with MYSQL  workbench,  on the diagram toolbar, look for the 1-n icon that has the eyedropper.  It will have the ability to select FK columns and PK columns referring to them.  

When you click the 1-n icon with the eyedropper, a black dialog box will appear asking for you to select the FK then the PK.

Hope this helps
0
 

Author Comment

by:willsherwood
ID: 40893361
thanks for this help!
it explains the eyedropper.
when i do this, indeed i can individually select the fields to specify the exact field
(it seems to want the primary key first then the usage of it as a FK)
however,  the resulting graphics shows only table to table.
it does not point field to field.
i had been spoiled by another tool (now defunct)  which
has the lines pointing specifically to the fields within each table  (not just a somewhat random placement to the edge of the table)
any thoughts?
0
 
LVL 9

Assisted Solution

by:Evan Cutler
Evan Cutler earned 500 total points
ID: 40893624
Try this:In the main menu bar go to: Model -> Relationship Notation -> Connect to columns.
0
 

Author Closing Comment

by:willsherwood
ID: 40893661
excellent - the combination of these two tips is the solution!!

THANK YOU!
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now