473,695 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Read (and Visualize) DB Schema from SQL Server

Hi experts,

which approaches would you suggest for:

- Reading a database schema (tables, fields, relationships) from SQL
Server 2005?
- Visualizing the DB schema?

For developing a DB tool the schema should be read from the server and
then be visualized, e.g. like the SQL Server BI Development Studio
does when importing the whole schema to a data source view.

Any ideas and hints on how to start approaching this (either reading
schema and/or visualizing it) using .NET (preferably C#) are welcome!
Regards,
Max

May 17 '07 #1
8 2728
Max,

http://support.microsoft.com/kb/309488

I usually display the schema table info in a grid by binding the returned
table to a control like a datagridview.

Kerry Moorman
"se************ ***@googlemail. com" wrote:
Hi experts,

which approaches would you suggest for:

- Reading a database schema (tables, fields, relationships) from SQL
Server 2005?
- Visualizing the DB schema?

For developing a DB tool the schema should be read from the server and
then be visualized, e.g. like the SQL Server BI Development Studio
does when importing the whole schema to a data source view.

Any ideas and hints on how to start approaching this (either reading
schema and/or visualizing it) using .NET (preferably C#) are welcome!
Regards,
Max

May 17 '07 #2
On 17 Mai, 15:10, Kerry Moorman
<KerryMoor...@d iscussions.micr osoft.comwrote:
http://support.microsoft.com/kb/309488

I usually display the schema table info in a grid by binding the returned
table to a control like a datagridview.
Thanks a lot for this hint, Kerry! Using the code presented in the
knowledge base article I was able to read the basic schema
information.

Now that I have the schema information, the problem is visualizing it
neatly in a GUI. Something like: Tables are depicted as boxes,
containing the fields of the table as rows showing the name and type
of the field. Fields acting as primary or foreign keys are specially
marked. Relationships between tables are depicted as lines connecting
the tables. The graphical representation should be used to enable the
user to navigate the schema, select a table and perform basic
operations on them.

Which .NET framework could I use to realize such a graphical
representation of the schema?
Regards,
Max

May 18 '07 #3
Max,

I have always used the schema information for myself as a developer, so my
presentation usually just consists of displaying the data in a grid.

For your needs you might want to model your presentation on something like
SQL Server's Management Studio.

You could use a Treeview control in a pane on the left and a grid control in
a pane on the right to allow the user to view, navigate and interact with the
data.

Anything more sophisticated would really be turning into an
Entity-Relationship Diagramming application and that would be a considerable
undertaking.

Kerry Moorman
"se************ ***@googlemail. com" wrote:
On 17 Mai, 15:10, Kerry Moorman
<KerryMoor...@d iscussions.micr osoft.comwrote:
http://support.microsoft.com/kb/309488

I usually display the schema table info in a grid by binding the returned
table to a control like a datagridview.

Thanks a lot for this hint, Kerry! Using the code presented in the
knowledge base article I was able to read the basic schema
information.

Now that I have the schema information, the problem is visualizing it
neatly in a GUI. Something like: Tables are depicted as boxes,
containing the fields of the table as rows showing the name and type
of the field. Fields acting as primary or foreign keys are specially
marked. Relationships between tables are depicted as lines connecting
the tables. The graphical representation should be used to enable the
user to navigate the schema, select a table and perform basic
operations on them.

Which .NET framework could I use to realize such a graphical
representation of the schema?
Regards,
Max

May 18 '07 #4
You mean besides the Database Diagrams supported in SQL Server EM and MS and
since VB classic?

--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

<se************ ***@googlemail. comwrote in message
news:11******** **************@ e65g2000hsc.goo glegroups.com.. .
Hi experts,

which approaches would you suggest for:

- Reading a database schema (tables, fields, relationships) from SQL
Server 2005?
- Visualizing the DB schema?

For developing a DB tool the schema should be read from the server and
then be visualized, e.g. like the SQL Server BI Development Studio
does when importing the whole schema to a data source view.

Any ideas and hints on how to start approaching this (either reading
schema and/or visualizing it) using .NET (preferably C#) are welcome!
Regards,
Max

May 18 '07 #5
On 18 Mai, 22:45, "William \(Bill\) Vaughn"
<billvaRemoveT. ..@betav.comwro te:
You mean besides the Database Diagrams supported in SQL Server EM and MS and
since VB classic?
Database Diagrams would be a good option for visualizing a database
schema. But if I decide to offer this representation to the users of
an application, the question arises, how to automatically generate a
Database Diagram from a given database and how Database Diagrams can
be (re)used to offer the user a visual design environment in my own
application. The user of the application should be able to browse/
navigate the database schema in a graphical way, select some tables
and perform some (nontrivial) operations on them.

I'm quite interested in any way to embed such a kind of visualization
or design environment in a .NET application. Which frameworks can I
use, to minimize my development effort? Is it possible to reuse /
embed some specialized components for this from SQL Server or BI
Development Studio in a .NET application?

Regards,
Max

May 20 '07 #6
On 18 Mai, 18:02, Kerry Moorman
<KerryMoor...@d iscussions.micr osoft.comwrote:
Anything more sophisticated would really be turning into an
Entity-Relationship Diagramming application and that would be a considerable
undertaking.
I think I'm realizing this more and more. Isn't there any possibility
to reuse a design environment component offered by the SQL Server
products, like e.g. for designing Database Diagrams or Data Source
Views in SQL Server BI Development Studio? Or at least, to use the
framework these design environments are based on? Perhaps something
like the Eclipse Modeling Framework (EMF) existing in the Java world
or even more sophisticated and specialized for database schema
modeling?

Perhaps let's make it more general: Which framework I can use, if I
want to create a .NET application offering a visual modeling
environment (e.g. for UML, ER, ...)?

Any ideas, hints, suggestions?

Regards,
Max

May 20 '07 #7
The diagramming tool will automatically build a diagram from an existing
schema--mapping the relationships and all.

--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

<se************ ***@googlemail. comwrote in message
news:11******** **************@ a26g2000pre.goo glegroups.com.. .
On 18 Mai, 22:45, "William \(Bill\) Vaughn"
<billvaRemoveT. ..@betav.comwro te:
>You mean besides the Database Diagrams supported in SQL Server EM and MS
and
since VB classic?

Database Diagrams would be a good option for visualizing a database
schema. But if I decide to offer this representation to the users of
an application, the question arises, how to automatically generate a
Database Diagram from a given database and how Database Diagrams can
be (re)used to offer the user a visual design environment in my own
application. The user of the application should be able to browse/
navigate the database schema in a graphical way, select some tables
and perform some (nontrivial) operations on them.

I'm quite interested in any way to embed such a kind of visualization
or design environment in a .NET application. Which frameworks can I
use, to minimize my development effort? Is it possible to reuse /
embed some specialized components for this from SQL Server or BI
Development Studio in a .NET application?

Regards,
Max

May 21 '07 #8
On 21 Mai, 18:01, "William \(Bill\) Vaughn"
<billvaRemoveT. ..@betav.comwro te:
The diagramming tool will automatically build a diagram from an existing
schema--mapping the relationships and all.
This seems to be some kind of misunderstandin g. I'm aware of the fact,
that there are tools which offer the possibility to read the schema
and build visualizations of it. That's not the point. The point is,
that I'm planning to develop a .NET (C#) application and need to add a
small "design environment" to this application which shows such a
database / schema diagramm and offers the user the possibility to
browse the schema in a graphical way, select some tables and perform
operations on it. (Note that the operations I mentioned are very
special and not offered by any exiting tool.)

The question is, which .NET frameworks exist to simplify this and cut
down development efforts. As I figured out, reading the meta-data is
quite easy, but until now I have no idea how to start building the
"design/modeling environment" (e.g. creating dragable graphical tables
and a neat layout of connecting relationship lines). Perhaps there is
a possibility to reuse the frameworks or components the Microsoft
tools are based on?

Any suggestions? (Apart from suggesting the use of some closed-source
tools? :-)

Regards,
Max

May 21 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7116
by: Stefan Rotter | last post by:
Hi, I'm trying to load a schema into an XmlSchema object with the Read and Compile methods. I use Read with a ValidationEventHandler. No errors occurs but when I look at the XmlSchema properties it contains NOTHING. The schema file is correct because I can use it to validate xmldocuments with the XMLValidatingReader. What am I doing wrong here? Code:
12
2872
by: James Norton-Jones | last post by:
Hi, Am I trying to hold the data of a DataGrid in a label so that when the form is reposted the DataGrid can be repopulated. The problem I am having is that I don't understand how to get the text into a stream in order to be able to use DataSetOutcomes1.ReadXML(MyStream). Thanks in advance, James
7
9498
by: Enrico Castagnola | last post by:
Hi, I have a problem. How can I print a file pdf on server without to visualize it? Thanks Best regard
5
2027
by: Arvind P Rangan | last post by:
Hi, i like to read an existing xml file which has a schema defined to it, and then write or add data to the existing xml file using vb.net/c#. May be this Question has been answered earlier. Pls if anyone knows the link or example let me know Thanks ARvind.
0
11265
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema information for the". I am using Cassini as the web server on my PCand I can still run my site from within VWD. Does anyone know what I have done to cause these messages to appear? Could not find schema information for the element...
8
19332
by: fireball | last post by:
I wihsh to discuss whether to use fully qualified names: ..object of objects to operate (create, query..) on is good or not? If someone change order of sql code blocks in my script - this may cause lose of it's context (like: use master / use <mydb>..). I wish to have my sript independed on changes like this and always produce correct result. Does using full name make use of 'use <db>' statement unnecessary?
0
1089
by: =?Utf-8?B?c3FsZXh0cmVtZQ==?= | last post by:
Hi Asp.net has some problem to read schema colletion of Sql Server 2005 or can read it as a xml normal? Thank Cristián
8
4098
by: send.me.all.email | last post by:
Hi experts, which approaches would you suggest for: - Reading a database schema (tables, fields, relationships) from SQL Server 2005? - Visualizing the DB schema? For developing a DB tool the schema should be read from the server and then be visualized, e.g. like the SQL Server BI Development Studio
6
2982
by: Peter | last post by:
I have a WebService which returns a List of RunningReport class How do I read this XML data on the client side. How do I convert List<RunningReportfrom the WebService side to List<RunningReporton the client side I have tried the following: List<RunningReportreportList = null; localhost.ReportService localrs = new localhost.ReportService();
0
8565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9113
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8841
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7658
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6488
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4339
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.