We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Database designer?

Thread ID:

Created:

Updated:

Platform:

Replies:

56465 Feb 15,2007 08:24 AM Apr 30,2014 03:09 PM Windows Forms 39
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On February 15, 2007 08:24 AM

Hi,
Is it possible to use SyncFusion.Diagram for showing structure of the database tables and links between them?
The table structure would be obtained on runtime and diagram would be created on the fly?

If so, could you give some appropriate example?

Thanks in advance

J.Nagarajan [Syncfusion]
Replied On February 16, 2007 02:12 PM

Hi Ok,

Yes, it is possible to show the structure of database tables and links using Essential Diagram. I have attached the sample for your reference. In this sample you can drag and drop the data table symbols from the palette. Click Links->OrthogonalLink to activate the Orthogonal link and you can connect the symbol by using this link.

Please refer to it and let me know if you have any questions.

Thanks for using Syncfusion product.

Regards,
Nagaraj

CustomSymbols.zip

Felice Russo
Replied On May 29, 2009 09:03 AM

Hi,
I'll need to use Your Digram Tool for drawing database tables.
Is it possible to draw tables, fields, indexes, relations, ecc... as is it possible in Visio?
I have tried to download Your example but it gives me an error. Can You upload a new file with some sample?
Thank You very much.
Felice

Gowri Manohari D [Syncfusion]
Replied On June 1, 2009 06:11 AM

Hi Felice,

Here i have mentioned the link for the sample for Database Diagram.Visio diagram also supports database tables,relations,entities etc.Here i have mentioned the sample Visio database diagram.Please make use of it.


http://www.syncfusion.com:91/Support/user/uploads/CustomSymbols_8919d152.zip

http://files.syncfusion.com/support/Diagram.Windows/Forums/Database.zip


Thanks & Regards,
Gowri


Felice Russo
Replied On June 5, 2009 04:33 PM

Hi Gowri,

I have tried Your sample code with the last trial version of Syncfusion (7.2.0.20)...and Visual Studio 2005, but I get some errors.

1)
this.diagram1.Controller.MaxHistory = 256;

D:\Downloads\Tools\Syncfusion\CustomSymbols_8919d152\CustomSymbols\Form1.cs(191,29): error CS0117: 'Syncfusion.Windows.Forms.Diagram.DiagramController' does not contain a definition for 'MaxHistory'

2)

this.diagram1.Model.ShadowStyle.AlphaFactor = 128;

D:\Downloads\Tools\Syncfusion\CustomSymbols_8919d152\CustomSymbols\Form1.cs(205,36): error CS0117: 'Syncfusion.Windows.Forms.Diagram.ShadowStyle' does not contain a definition for 'AlphaFactor'

I have tried to remark this code lines but I get an exception on:

3)

((System.ComponentModel.ISupportInitialize)(this.diagram1.Model)).BeginInit();

Object reference not set to an instance of an object.

Can You help me?
Is there an upgraded code sample?

Thank You very much.
Felice

Gowri Manohari D [Syncfusion]
Replied On June 10, 2009 07:45 AM

Hi Felice,

Sorry for the inconvenience caused. I have created another sample for your requirement.

The sample provided meets the requirement by means of placing an UserControl inside a control node. The UserControl has a System Label and TreeView control in it.

Please refer the word document given in the attachment

Please download the sample from the below link,

http://files.syncfusion.com/support/Diagram.Windows/Forums/F56465/main.htm

Regards,
Gowri

Felice Russo
Replied On June 21, 2009 10:11 AM

Hi Gowri,

Your sample code now is ok.

I'd need to draw a database diagram with 1000 tables. Using the tree for each table I thing is expensive in memory.
I'd like to abtain a graphical table representation like Visio (a column for key type, a column with fields and a column with datatype).
Can You help me to draw correctly the table (visio-like) object considering the 1000 tables to design?

Thanks
Felice

Gowri Manohari D [Syncfusion]
Replied On June 22, 2009 08:17 AM

Hi Felice,

I have created sample for your requirement.

The sample which we have provided to you meets the requirement by means of node grouping,add labels to the child node and connect the ports inside the Group node.

Please download the sample from the below link,

http://files.syncfusion.com/support/Diagram.Windows/Forums/F56465_new/main.htm


Regards,
Gowri

Felice Russo
Replied On June 29, 2009 10:42 AM

Hi Gowri,

Great!
Just what I need!

I'm trying your suggest and I have another question.

I create the table with field, field type, ecc. Each field can have different length.
Suppose this:

Table1 |->38 chars
PK ThisIsPrimaryKeyField Integer |
ThisIsShortField String |

Table2 |->15 chars
PK Cod Integer |
Des String |

The two tables have different width.
How can I size this tables, while creating, differently on their content?

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On July 6, 2009 03:40 AM

Hi Felice,

We can get the size of the TextNode by using TextNode.Size property. It will return the width and height of the textnode. Here I have mentioned sample code for TextNode with text (which you are given in the post).

/* code snippet */

Syncfusion.Windows.Forms.Diagram.TextNode t = new TextNode ("MyTable\nPK Cod: integer fsf sff f\nDes: integer");
t.SizeToText(SizeF.Empty);
diagram1.Model.AppendChild(t);

/* Ends */

In the above lines of code there is a property called SizeToText, it will fit the textnode into text size.We can get the size of the textnode (t) by t.Size property.

Let me know the above solution meets your requirement.

Regards,
Gowri


Felice Russo
Replied On July 19, 2009 12:27 PM

Hi Gowri,

Your suggest is Ok!
Tables now are sized correctly.

The attachment show an image of my DbViewer.
It has many relations between tables.
I'm using LineConnector but it's not right.
I have tried OrthogonalConnector but lines are drawn on tables...
I would like to obtain with a TableLayoutManager, tables with relations and with lines not crossing tables and all visible (like Visio).

Is there a Connector for my need?
The TableLayoutManager is right?

Regards,
Felice




DbViewer_6fe98957.JPG

Felice Russo
Replied On July 19, 2009 12:35 PM

Hi Gowri,

Just another question.

I need to read diagram node (each node is a Group) for getting location an size.
I need to store these data on a custom file for reading the next time I load the diagram.

I would like to save and load only location and size of nodes.
Can You give my any suggest for doing it?

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On July 20, 2009 06:57 AM

Hi Felice,

For your first requirement, You can use TableLayoutManager for your requirement. Before layouting the nodes we should enable LineRouting and LineBridging property of the diagram in order to avoid the crossing the line over the node.

The properties are,

this.diagram1.Model.LineRoutingEnabled = true;
this.diagram1.Model.LineBridgingEnabled = true;


For your second requirement we don't have any direct method to save the location and size of the node. You can use the LoadSoap() and SaveSoap() method, in order to save the diagram into XML format. The XML file may be helpful for your requirement


Regards,
Gowri



Felice Russo
Replied On July 25, 2009 04:24 PM

Hi Gowri,

Ok, for Your suggest.

I have enabled Routing but when I have a lof of tables (60 group of textnodes) it's too slowly.
Do you have any suggest about?

I enabled orthogonal connector with decorator.
When I move the rectangle in the design area the decorator isnt drawn.
With the line connector, decorator drawing works fine!
See the attachment. In (A) it's right. in (B) it's no right. In (C) and (D) with line connector drawing is right.
Any suggest?

Regards,
Felice.



Connector_84109521.JPG

Gowri Manohari D [Syncfusion]
Replied On July 27, 2009 03:17 AM

Hi Felice,

You can Generate the nodes within the below diagram methods, it will increase the performance time.

diagram1.BeginUpdate();
// Node Generation Code
diagram1.EndUpdate();

For your second requirement i have mentioned link for the sample. The sample which i have used will create Orthogonal Connector with Decorator. Please make use of it.

http://files.syncfusion.com/support/Diagram.Windows/Incidents/I55409/main.htm

Regards,
Gowri


FeliceR
Replied On July 27, 2009 05:26 PM

Hi Gowry,

I tryed Your sample.
It's good when the two object aren't aligned (see attachment). Elsewhere the decorator isn't drawn.
Help me...

About routing and slow rendering, I'm using BeginUpdate() and EndUpdate() on startup (first draw).
The trouble is when I move an object. The diagram redraw everything and this slow down application.
Any suggest?

Is there a way to lock connector?
I need to draw connector but they must not be disconnected by user action. I need the user select connector for info on relation, so I cannot disable selection.

Regards,
Felice



connectorHorz_7222d6fe.JPG

Gowri Manohari D [Syncfusion]
Replied On July 28, 2009 04:46 AM

Hi Felice,

For your first point, it is a known issue in Connector. We have already logged defect report for that.

For your second point, while generating the node some events will be fire internally. So you should stop those events, it will automatically increase the performance.

diagram1.Model.BeginUpdate();
diagram1.Model.HistoryManager.Pause();
// Node Genaration Code
diagram1.Model.HistoryManager.Resume();
diagram1.Model.EndUpdate();

For your third requirement, diagram supports Node.EditStyle property in order to make diagram read only. The property which i have mentioned here will not allow to move the connector at any direction.

connector.EditStyle.AllowMoveX = false;
connector.EditStyle.AllowMoveY = false;

Regards,
Gowri

Felice Russo
Replied On July 30, 2009 04:47 AM

Hi Gowri,

ok, for disabling history manager, but must I disable it on dragging?
The diagram and line routing slow down during drag of textnodes (not during load operation).
I need to detect dragging and disabling history manager?

About EditStyle, ok for disabling moving, but I need to disable dragging of ports, because this disconnect my connector.

I can't set
EditStyle.AllowSelect = false
or
EditStyle.Enabled = false
because I need to select it for display properties info.

Any suggest?

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On July 30, 2009 06:31 AM

Hi Felice,

The below code snippet solves your first requirement.

diagram1.Model.EventSink.PinPointChanged+=new PinPointChangedEventHandler(EventSink_PinPointChanged);

private void EventSink_PinPointChanged
(PinPointChangedEventArgs e)
{
diagram1.Model.HistoryManager.Pause();
diagram1.Invalidate(); // It will repaint the region object
diagram1.Refresh(); // It will refresh whole diagram
diagram1.Model.HistoryManager.Resume();
}
You can use either of the above two methods diagram1.Invalidate() or diagram1.Refresh(), in order increase the performance.

I could not get it your second point. Please provide the some more details about your requirement.

Regards,
Gowri

Felice Russo
Replied On July 31, 2009 06:36 AM

Hi Gowri,

see the attachment for disconnection operation on connector.
I should need to avoid this kind of operation, but I need to select connector for properties.

Regards,
Felice




disconnect_5a08bf5c.exe

Gowri Manohari D [Syncfusion]
Replied On July 31, 2009 07:31 AM

Hi Felice,

Thank you for the update.Please use the below code snippet for your requirement.

LineConnector ln = new LineConnector(PointF.Empty, PointF.Empty);
ln.HeadEndPoint.AllowMoveX = false;
ln.HeadEndPoint.AllowMoveY = false;
ln.TailEndPoint.AllowMoveX = false;
ln.TailEndPoint.AllowMoveY = false;

The above code will disable the endpoint movements. Let me know whether the above solution meets your requirement.

Regards,
Gowri

Felice Russo
Replied On July 31, 2009 08:30 AM

Hi Gowri,

ok, for your hints, they match my needs.

Getting back to orthogonal connector.

If I have more orthogonal connectors attached to a diagram node, they are overlapped.
Is there a way to space out tail/end-points of each connector?
See the attachment for a sample.
I have a node with more connector but I can't see each one.
Any suggest?

Regards,
Felice



orthogonal_504ec50d.exe

Felice Russo
Replied On August 2, 2009 08:37 AM

Hi Gowri,

I would like to handle "pointer" and "panning" cursor simultaneously.

When the cursor is over a text node it handles selection and dragging. When the cursor is over a page area it handles panning of diagram.
...I need both "PanTool" and "SelectTool" active...based on cursor position...

Is it possible?
Can You give me any hint about?

Regards,
Felice

Felice Russo
Replied On August 2, 2009 08:56 AM

Hi Gowri,

I need some info about "SymmetricLayoutManager" and SpringFactor, SpringLength and MaxIteraction.

I have used it for laying-out my diagram.
When I have 100 table (textnodes) with the following:
SpringFactor=0,3
SpringLenght=600
MaxIteraction=100
the diagram seems good.
When I have 1000 table (textnodes) with the same settings it's wrong and tables overlap.
What's the meaning of this 3 parameter and how should I use they?

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On August 3, 2009 09:26 AM


Hi Felice,

1. We have already logged Feature Request for your first requirement. That is avoid Connection Overlapping.

2. For your second requirement I have provided the code snippet. Please make use of it.

private void diagram1_MouseMove(object sender, MouseEventArgs e)
{
Node n = (Node)diagram1.Controller.GetNodeUnderMouse(e.Location);
if (n != null && n is Syncfusion.Windows.Forms.Diagram.TextNode)
{
diagram1.Controller.ActivateTool("SelectTool");
}
else
{
diagram1.Controller.ActivateTool("PanTool");
}
}

3.For your third requirement

SpringFactor - Minimum distance between the connected nodes
SpringLength – Distance between the connected nodes.
MaxIteraction – Maximum count of iteraction of node layouting.

Regards,
Gowri

Felice Russo
Replied On August 3, 2009 03:19 PM

Hi Gowri,

You hints are good!

1) I will wait for it...
2) Ok
3) about minimum distance between the connected nodes, what does it mean 0,3? Why is it decimal?

4) I have tried Your previous hint using the following code snippet

---
LineConnector ln = new LineConnector(PointF.Empty, PointF.Empty);

ln.EditStyle.AllowMoveX = false;
ln.EditStyle.AllowMoveY = false;

ln.HeadEndPoint.AllowMoveX = false;
ln.HeadEndPoint.AllowMoveY = false;
ln.TailEndPoint.AllowMoveX = false;
ln.TailEndPoint.AllowMoveY = false;
---

for avoiding disconnecting connector from nodes. It's OK for disconnecting but when I select both textnodes and their connector I can't move/drag the selection.

Removing the code lines
---
ln.EditStyle.AllowMoveX = false;
ln.EditStyle.AllowMoveY = false;
---
it's ok.
I should need multi selection...
Any hints?

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On August 4, 2009 08:16 AM

Hi Felice,

For your first requirement Spring factor accepts decimal values because it indicates minimum distance between the nodes.

For your second requirement, you can select more than one node at a time by using the functionality ctrl key+left mouse button like in other application.

Regards,
Gowri


Felice Russo
Replied On August 6, 2009 03:04 PM

Hi Gowri,

see the attachment for details.
If I select a single textnode I can drag (or move) it.
If I select more textnodes (for moving) it doesn't drag (or move).

I have set the following code lines for connector.
---
LineConnector ln = new LineConnector(PointF.Empty, PointF.Empty);

ln.EditStyle.AllowMoveX = false;
ln.EditStyle.AllowMoveY = false;
___

If I set AllowMoveX/Y = true I can drag and move selected textnodes.

Regards,
Felice



nodrag_52178c7e.exe

Felice Russo
Replied On August 11, 2009 03:26 PM

Hi Gowri,

I have a DB with about 1000 tables. The load operation takes minutes. It's too long!
Can I load and create diagram nodes in a thread, updating UI progressively?
So the user can use the application while the thread complete operation...and eventually he can abort it.

Regards,
Felice

Felice Russo
Replied On August 11, 2009 03:33 PM

Hi Gowri,

the function SizeToText() compute erroneously the height of the text.
See the attachment for details.
There is a space after the field "Note". If the table contain 2/3/4 fields the height seem right.
More field more tail space.
Any hint?

Regards,
Felice



errorHeight_20617196.exe

Gowri Manohari D [Syncfusion]
Replied On August 12, 2009 01:12 AM

Hi Felice,

1. For your first requirement, I have seen the attached file. In that you are selecting the TextNode using selection rectangle that time the connectors which are connected to TextNodes also selected. But you have set Connector.AllowMoveX and Connector.AllowMoveY to false. So that you could not move the textnodes in that case.

For that you should use multiple selection with the help of Ctrl + Mouse Left Key. Select the textnodes individually and move it.


2. For your second requirement, we have already logged Feature Request for this issue, that is loading diagram nodes using Thread.

Regards,
Gowri.

Felice Russo
Replied On August 31, 2009 03:38 PM

Hi Gowri,

I'm back! :-)

1) It's ok. So I must select textnodes and not connectors for moving.
But...what about selection rectangle? Can't I use it for fast selection? If I need to select 40 tables for reordering diagram it can be useful scaling out diagram...

2) Ok. I will wait for it.

Any suggest about the post dated:

---
Felice Russo at 8/11/2009 3:33:07 PM:
---
the function SizeToText() compute erroneously the height of the text.
See the attachment for details.
There is a space after the field "Note". If the table contain 2/3/4 fields the height seem right.
More field more tail space.
---

Any hint?

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On September 2, 2009 05:04 AM

Hi Felice,

Thank you for your update.

The issue which you have mentioned is suspected as defect.And we have logged the defect report for this issue.

Regards,
Gowri


Felice Russo
Replied On September 12, 2009 12:12 PM

Hi Gowri,

I'm trying to put a text over/near a connector.

I have 2 methods:
1) using labels available on connector
2) using a TextNode grouped with connector

Using them arise the following problem:
1) the text rotates togheter with connector It's unreadable when rotated (see attachment).
2) the TextNode can go far from connector (see attachment).

I expect text will remain horizontal, readable and near connector during drag operation.

Have You any suggest?

Regards,
Felice



connectorlabel_79e31a35.zip

Gowri Manohari D [Syncfusion]
Replied On September 14, 2009 01:59 AM

Hi Felice,

1. Currently diagram control does not support the feature which you have mentioned in the first point. For that we have created workaround with Customized Label class, it will show the label in horizontal direction when connector is rotated. Please download the sample from below link.

http://files.syncfusion.com/support/Diagram.Windows/Incidents/I56446/main.htm

2. The normal behavior of the Group while rotating individual nodes in the group it wont affect other nodes. That is when you move the connected nodes it affect only the connector not the textnode of the Group. That's why TextNode did not move when the lineconnetcor is getting moved.

Let me know the above answer solves your issue.

Regards,
Gowri


Felice Russo
Replied On September 21, 2009 03:37 PM

Hi Gowri,

Ok, for Your answer.
I will try that!

Regards,
Felice

Gowri Manohari D [Syncfusion]
Replied On September 22, 2009 01:16 AM

Hi Felice,

Thank you for the update.

Regards,
Gowri

Administrator [Syncfusion]
Replied On July 1, 2010 12:56 AM

Hi,

I'd like to take a look at the example you've provided but the link is no longer valid:

http://files.syncfusion.com/support/Diagram.Windows/Forums/F56465_new/main.htm

Any chance you can give me the new url?

Thanks!
-Andrew

Jaffersathick B [Syncfusion]
Replied On July 2, 2010 12:07 AM

Hi Andrew,

You can download the sample from the following link:

http://files.syncfusion.com/support/Diagram.Windows/Forums/F56465_new/Diagram_WF_DatabaseDesign.zip


Thanks for using Syncfusion products and let me know if you have any other concerns.

Regards,
Jaffer.B

Sachin
Replied On April 30, 2014 03:09 PM

http://files.syncfusion.com/support/Diagram.Windows/Forums/F56465_new/main.htm

i would like to download the above example, but the link isn't working!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;