5,696,576 members and growing! (19,691 online)
Email Password   helpLost your password?
Languages » VB.NET » Utilities     Intermediate License: The Microsoft Public License (Ms-PL)

Schema Generator

By ashu fouzdar

Utility to generate schema description from existing SQL Server database
C# (C# 2.0, C#), VB 7.x, VB 8.0, VB 9.0, VB 6, VB, .NET (.NET, .NET 2.0), WinForms, DBA, Dev

Posted: 20 May 2008
Updated: 3 Jun 2008
Views: 6,858
Bookmarked: 20 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
10 votes for this Article.
Popularity: 4.32 Rating: 4.32 out of 5
1 vote, 10.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
3 votes, 30.0%
4
6 votes, 60.0%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Introduction

In this article, I am introducing a small utility developed for the purpose of extracting schema from existing SQL Server database. The basic idea behind developing this utility is to emit the database schema from existing SQL Server database. From developer perspective it is sometimes very much handy to quickly take printout of database structure for creating UI layout or specify some validation rule. If database structure is available in printable format then it will serve the purpose robust programming and effective UI layout, because developer can establish spontaneity between database structure and UI elements. So now lets start exploring the utility in little depth.

After extracting the binary distribution, you will find executable SchemaGenerator.exe. Start the utility from SchemaGenerator.exe.

The first screen will be as follows:

Clipboard01n.gif

The screen shown above ask the input for :

  • Server/Instance name: This will be Server\Instance name. If not specified it will default to (local).
  • Database name: This is required input and must specify an existing database.
  • Username/Passsword: Optional, provide in case of non trusted connections.
  • In SQL server instance specified above.

Now, Fill the Server/Instance name i.e. (local)\SQLEXPRESS.

Clipboard02n.gif

Click, Generate to produce the report in printable format. Report will be rendered in preview, where one can see the generated schema output then print, if required.

The print preview window output the database structure in printable format, review the format and print if seems accurate in format.

Clipboard03small.GIF

I hope this will help some needful developer and avoid the duplication of efforts.

“Happy computing”

History

Initial revision 1.0 - May 20 2008. Description - Uploaded initial revision

Revision 1.1 - June 04 2008. Description - Updated for new feature of using explicit username and password, in non trusted environment. (Requested by users).

Revision 1.2 - June 05 2008. Description - Fixed the issue of printing reports from Print Preview dialog. (Requested by users).

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

About the Author

ashu fouzdar


Ashu has done Masters in Software Engineering from UPTU Lucknow, India. with merit rank. Currently he is working as Software Engineer in Software Product Development company at Bangalore(India) for 2+ years. He started to code with PASCAL, then moved to C and finally got into VB 5.0. He is currently working with VB.NET, C#, SQL Server and Perl(Occasionally but some time). He loves to works for Tool development and System Integration, and his favorite is VB. He is advocate of Open source and loves to share solutions with open source communities like nHibernate, SubSonic, SourceForge.

Award's :
Prize winner in Competition "Best VB.NET article of May 2008"

Ashu' Articles :
Click to see my CodeProject Articles

Ashu's Blog :
Share a solution | Explore the .NET world

Ashu's Favorite :
nHibernate - The best ORM.
nHibernate Contributed Tools
SubSonic - Best Auto generated DAL.


Click to send me your wishes :ashufouzdar@.in.com

Occupation: Software Developer
Company: Freelance Developer
Location: India India

Other popular VB.NET articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 15 of 15 (Total in Forum: 15) (Refresh)FirstPrevNext
GeneralPrint only one blank pagememberEdward1117:43 4 Jun '08  
GeneralRe: Print only one blank pagememberdnpro2:40 5 Jun '08  
GeneralRe: Print only one blank pagememberdnpro4:30 5 Jun '08  
GeneralRe: Print only one blank pagememberEdward11113:40 5 Jun '08  
GeneralRe: Print only one blank pagememberdnpro23:50 5 Jun '08  
QuestionWith 'sa' password?memberpvatanpour20:59 27 May '08  
AnswerRe: With 'sa' password?memberdnpro4:30 30 May '08  
AnswerRe: With 'sa' password?memberdnpro23:18 3 Jun '08  
GeneralAwsome!memberpvatanpour11:06 5 Jun '08  
GeneralMS VisiomemberGautam Sharma23:21 25 May '08  
General[Message Removed]memberMojtaba Vali1:54 25 May '08  
GeneralVery nice, simple and useful for a trusted connection.memberBuddy Stein7:33 20 May '08  
GeneralNeed correction before approvememberAbhijit Jana3:03 20 May '08  
GeneralRe: Need correction before approvememberashu fouzdar6:41 20 May '08  
GeneralRe: Need correction before approvememberAbhijit Jana20:18 20 May '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 3 Jun 2008
Editor: Sean Ewington
Copyright 2008 by ashu fouzdar
Everything else Copyright © CodeProject, 1999-2008
Web12 | Advertise on the Code Project