Tag Archive for: database to xml

XML Development with Database Integration


Did you know that XMLSpy connects to relational databases? One of the most compelling features of the Altova MissionKit is that numerous tools in the suite include offer deep integration with relational databases, providing seamless access to back end data for bi-directional conversion, integration, analysis, and reporting. image Let’s take a look at what you can do when you connect XMLSpy to your databases. Other database-enabled MissionKit tools will be covered in subsequent posts.All popular relational databases are supported in XMLSpy:

  • Microsoft® SQL Server® 2000, 2005, 2008
  • IBM DB2® 8, 9
  • Oracle® 9i, 10g, 11g
  • Sybase® 12
  • MySQL® 4, 5
  • PostgreSQL 8
  • Microsoft Access 2003, 2007

First step: Connect to and query the database

When you select Query Database from the DB menu, XMLSpy helps you connect to your database with the step-by-step Database Connection Wizard. Then, the DB Query window makes it easy to explore and/or edit data in the database you’re working with, either by opening existing SQL files or creating SQL scripts from scratch using drag-and-drop and auto-complete functionality. Once you execute your query, you can edit the database data in the results window, review changed fields (highlighted in pink), and commit the changes back to the database. Querying a database in XMLSpy

Next: Convert between XML and databases

Another common requirement is converting between XML and database models, and XMLSpy supports this in both directions. You can easily export database data to XML. If no schema is required, you can simply export the data to XML in its basic tabular format. Or, you can use the Create XML Schema from DB Structure option first, then import database data maintaining all the relationships and dependencies defined in the content model. Numerous options are available to specify the format of the schema, whether columns should be imported as elements or attributes, and the database constraints that should be generated in the XML Schema. Get schema from DB data Or, to go in the other direction, it’s just as easy to go from XML to a relational model in XMLSpy. The Export to Database dialog (accessed via the Convert menu) allows you to specify where to start the export, how to handle export fields, and which elements to include. Then, the data is instantly converted and stored in your database. image For times when you want to define a database with the same rules as an existing XML Schema, the Create DB Structure from XML Schema dialog lets you do so with numerous options. Any identity constraints included in the schema will automatically transfer to the database structure. Alternatively, it’s easy to define relationships between elements manually. Learn more about all these features for working with XML and databases in XMLSpy, or check out all the database tools available in the MissionKit.

Tags: , , ,