Database diagram - represent relations in c#

  • Hi! 🙂

    I am developing an application in c# .net that allows user to select tables, columns, designing queries..

    but one problem i face is that i don´t know how to represent relations between tables(the arrows between tables), like in query designer in Sql Server 2005.

    If anyone could help me, i will appreciate!

    Thanks in advance!

  • I've just gotten to the end of a long project doing exactly that. And it's not an easy thing to do. I started out about 2 1/2 years ago, thinking 'this will be simple'. But it's not. It's *so* not. At the time I started, I thought I knew a lot about SQL. I now realise I was actually a complete SQL numpty.

    To give you an idea, the code which is responsible for loading the schema from the database, and storing it, is about 140 thousand lines of code.

    While this is obviously entirely unhelpful to you, I just wanted to let you know - it's not as easy as you think right now.

    Something that may be helpful to you - is to look at the system views [sys].[foreign_keys] and [sys].[foreign_key_columns].

    Atlantis Interactive - SQL Server Tools
    My blog[/url]
    Why I wrote a sql query analyzer clone

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply