XSDfDB


home : XSDfDB

XSDfDB (XSD from DB) is a handy utiliy to extract an XSD definition (including foreign keys relations) of a given database. It is an useful companion to NDbUnit, which requires an XSD with relations between tables to feed data into the database.

If you install this program and have any questions or comments, drop me an e-mail.

Installation

XSDfDB requires the Microsoft .NET Framework 2.0 to run. You can check to see if you already have the .NET Framework 2.0 installed by clicking Start on your Windows desktop, selecting Control Panel, and then double-clicking the Add or Remove Programs icon. When that window appears, scroll through the list of applications. If you see Microsoft .NET Framework 2.0 listed, the latest version is already installed and you do not need to install it again. If you don't have it, download it here.

Once you have installed the framework, download this zip and unzip the files into a folder of your machine. Run XSDfDB.exe.

Usage

XSDfDB uses OleDb to extract the information it needs to generate the XSD. You will need to provide a connection string to connect to the database. If you are in doubt about the format of this string, take a look over here.

Next, click the connect button. If there is an error you will see it displayed in the status bar.

Once you are succesfully connected, select which table you need to extract information or (all tables) to extract the whole database schema. If you select a specific table, you will get a XSD containing the table and all the tables referenced directly or indirecty by it, the relations among the tables are created too.

Finally, click the Generate button. Database information will be extracted and the generated XSD will be displayed below the button. Also, it will be automagically copied to the clipboard.

Acknowlegments

This utility is based on a modified version of Roy Osherove's code published on his blog.

Disclaimer

I made this program as an utility for my everyday wok. I share it with you because I think it may be useful to you too. I can not guarantee it fits your specific needs and I can not be held responsible in the unlikely event it blows your machine away.

Hosted by www.Geocities.ws

1