Please enable JavaScript to view this site.

Altova DatabaseSpy 2020 Enterprise Edition

» No topics above this level «

Exporting Database Data

Scroll Home Prev Top Next More

DatabaseSpy can export database data to XML, CSV, HTML, and Excel 2007 or later (.xlsx) format. You can export data either directly from specific tables or views, or by generating or typing SQL SELECT statements. At table level, you can choose, for each column, whether it should be exported or omitted. If the export format is XML, you can choose whether to export each column as element or attribute, or not export it at all.

 

To export data, click the Export ic_export toolbar button or select the menu option Tools | Export database data... (Ctrl+E). This opens the "Export database data" dialog box, where you can select the data to be exported and define the export options.

dbs_export_dlg

The "Export database data" dialog box contains two tabs, Selection and Options. The Selection tab is the same for all export types while the Options tab depends on each export file type. You can change the export file type by clicking the respective icon in the left area of the dialog box.

 

In case of XML, you can choose whether the exported XML should reflect the child-parent (foreign key) relationships that exist between database tables—to do this, click XML Structure on the export dialog box. Below is an example of an XML file exported with the XML Structure option. Notice that the "addresses" table is a child table of "users" in the database. Namely, the "user_id" column in the "addresses" table references the "id" column in the "users" table.

 

<?xml version="1.0" encoding="UTF-8"?>
<Import name="users">
  <users>
    <id>3</id>
    <first_name>Totie</first_name>
    <last_name>Rea</last_name>
    <email>t.rea@nanonull.com</email>
    <created_at>2019-04-15 10:11:13</created_at>
    <addresses>
        <id>3</id>
        <user_id>3</user_id>
        <is_shipping>1</is_shipping>
        <is_billing>1</is_billing>
        <type>home</type>
        <city>Roseford</city>
        <street>Evergreen Lane</street>
        <number>34</number>
    </addresses>
  </users>
</Import>

 

The Source tree view is very similar to the Online Browser window, with all its features and options. Here you can select the individual tables for export, as further described in Selecting Database Data for Export.

© 2020 Altova GmbH