Book a Demo

Author Topic: How To Create Table Relationships in a Schema  (Read 5517 times)

CoffeeAddict

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
How To Create Table Relationships in a Schema
« on: April 28, 2010, 12:02:49 pm »
This is my first time using EA.  I created a new schema, added Primary keys to all of them, stubbed out the rest of the fields.  I haven't created any FKs or anything...not sure how.

Right now I want to figure out how to create one-to-one relationships, one-to-many and so fourth.

There's so many options in both the context menus as well as table properties that I'm having a tough time just trying to understand this so I can simply show that one-to-many link between tables and so on.

Is it easy to do this?  What are the steps? >:(  Sure would be nice if there were some example tutorials...cause the help docs aren't doing it for Schema Help.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #1 on: April 28, 2010, 12:38:20 pm »

CoffeeAddict

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #2 on: May 02, 2010, 12:24:39 pm »
Thanks.  For some reason though I'm not able to move attributes up and down in the Foreign key dialog.  I am doing what that help section is stating but when I click on the little hand arrows to move a column down for the foreign key relationship on either side (target or source) it doesn't do a thing.  The field does not move down.

Not sure why that would be.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #3 on: May 02, 2010, 09:58:58 pm »
Which version of EA are you using? On what platform?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

CoffeeAddict

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #4 on: May 03, 2010, 03:28:44 am »
Enterprise Architect Corporate Edition 7.5.843
Windows 7

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #5 on: May 03, 2010, 11:48:00 am »
Do you have multiple columns on each side of your foreign key constraint?  How many database columns are visible in the bottom two lists in the "Foreign Key" dialog?   Have you clicked on one of the database columns in the list before trying to use the up/down buttons?

Just to make sure there is no confusion, these up/down arrows are only for ordering the columns in the foreign key constraint, shown in the list boxes at the bottom of the dialog.  They do not sequence the columns in the table itself.

CoffeeAddict

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #6 on: May 04, 2010, 12:07:59 am »
at the top I see columns on both sides but in the bottom two buckets I do not see any fields.

Yes, I tried numerous times to click on a field at the top to highlight it and then clicked the hand to move it down.  Nothing moved down.

Ah, it's confusing the way this UI is laid out.  It makes you think those hands are for moving fields up and down from box to box, not sorting.

So I guess I'm not sure then how to get fields to show up in the bottom two buckets which I guess is what is missing here?  I'm so lost even after reading that help article on how to get these foreign keys setup because clearly I'm missing something here if those fields are not showing at the bottom.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #7 on: May 04, 2010, 10:28:21 am »
As per the instructions on the help page referenced earlier, you need to select the columns on both sides that make up your foreign key relationship and then click the "Save" button (see steps 6 and 7).

The up/down buttons above the bottom list boxes are only relevant when working with composite foreign keys (i.e. referencing more than one column on each side).  See below the heading "Composite Foreign Key".

CoffeeAddict

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: How To Create Table Relationships in a Schema
« Reply #8 on: May 04, 2010, 10:39:43 am »
Aaron, thanks for sticking with this.

I have to say though the UI and the docs both blow.

"#6 Highlight the columns involved in the Foreign Key relationship."

Highlight WHAT columns.  What is "THE" mean.  For God sakes, I can even draw a couple arrows illustrating exactly where.  It's about the most general line ever.  While now I get it, and it's obvious, that is a waste of a line.  Why not "Highlight a column on the top left then highlight the matching FK column on the right".  Click save and it will create the FK relationship.

It's clear that developers are creating this UI...which I am a developer but that screen is the most confusing piece of shit ever.  The docs even worse.  Do I have an idea how to improve it?  Sure do.  I wonder if EA is at all interested in making this more usable.  I can guarantee you I am not the only one who had trouble with this window or others.

The windows sucks, and needs a redesign.  You need to have some kind of add button THEN save to see it actually happen.  You know the common select from 2 lists click add or whatever and see some kind of read-only FK name after the fact and then you know it's working and done.  Then click save.

While now it's very obvious, I will argue to the death that this blows and is not always inferred at first in many of the parts of EA even with the docs.  Both need to be improved and looked at by a usability expert/graphic designer...not developers.
« Last Edit: May 04, 2010, 10:46:18 am by CoffeeAddict »