Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Table node, edge connects to cell

0 votes
I'm designing SQL databases. Relations between tables.
It would be good to have a yEd table node like this:
1) header cell (table name)
2) N cells below header (fields in sql table)
3) possibility to connect yEd edge to one cell

Basically this is one column table with ability to connect
edges to each cell

So if i have two sql tables then i can create field to field relation
Table should remain as one single block when doing layout.

Currently im grouping yed elements and using group as "table"
but when layouting then group will resize to very tall or very wide and that is not what is needed, and items in group will be spreaded.

Another option is to "group" selected elements so that relative layout of this group is locked.
asked Sep 26, 2012 in Help by teeell (130 points)
recategorized Sep 28, 2012 by teeell

1 Answer

+1 vote

You could use an empty "Pool (Columns)" node from the BPMN palette section to model your database node. Another possibility would be to use any normal node with N + 1 labels. (Use right-click to open the node's context menu and choose "Add Label" to add additional labels.)

Sample graph.

Although yEd does not support connecting edges to cells, you can fake such a connection by selecting an edge and moving its port into the desired cell. (The port is the small black rectangle that appears inside the node after selecting the edge.) Aside from moving the port with the mouse, you can also edit the edge's "Source Port X", "Source Port Y", "Target Port X", and "Target Port Y" properties for pixel perfect port placement.

To ensure that the manually positioned edge ports are not modified by layout algorithms, select the corresponding edges, open "Tools" -> "Constraints" -> "Port Constraints", choose "From Sketch" as "Configuration Method" and "Ports at Selected Edges" for option "Act On", and click "Ok" before starting a layout algorithm.

answered Sep 26, 2012 by thomas.behr [yWorks] (120,480 points)
good to know that there is a way to do it
but it is too much nibbling
i dont have just 10 tables, i have hundred(s)

- no time to set up each port
- later when i change my field position or resize it
then edges are mess since there is no real connection
As a feature request, if we could group a bunch of boxes together (not in a yEd-style collapsible group, but in a drawing-software type group), and have them stay together, then they could represent the cells.
Alternatively, is it possible to prevent yEd rearranging a number of nodes? That would achieve the same thing.
Imprint | Privacy Policy