2.II.2.c) MODELOS Y PROPUESTAS ECLÉCTICOS
1.) MODELO DE SCHUHMACHER Y WENIGER
8.1 Creating a Schema
To create a new schema:
Locate the Schemas node in the Databases tab tree, Open the Create Schema dialog from the right-click menu, Enter all required information (database dependent), Click Execute to create the schema.
This feature is only available for some databases. Please execute the corresponding SQL in the SQL
if it is not available for your
Commander (http://confluence.dbvis.com/display/UG91/Working+with+SQL)
database.
8.2 Comparing Schemas
Only in DbVisualizer Pro
This feature is only available in the DbVisualizer Pro edition.
You can compare different aspects of a schema to another schema.
For instance, to compare the list of tables in one schema with the list of tables in another schema:
Double-click the schema node for the first schema to open its Object View tab and select the Tables tab, Do the same for the second schema,
Select Compare from the right-click menu in one of the Tables tabs to compare their grid content (see
.
page 258)
You can do the same for all the other schema object types, such as views and stored procedures. You can also dig deeper and compare the individual objects, such as comparing individual tables (see page 121).
1. 2. 3.
8.3 Viewing Entity Relationships
To see how a table is related to other tables through Foreign Keys: Locate the Tables node in the Databases tab tree,
Double-click the node to open its Object View tab, Select the References sub tab.
You can select among different graph layouts in the layout drop-down list in the toolbar: Hierarchic Organic, ,
, or .
1. 2. 3. 4.
The graph can be Exported to a file in JPG GIF PNG SVG, , , or PDF or Saved as a Graph Modeling Language (
) file that you can then open in the tool from yWorks
GML yEd (http://www.yworks.com/en/products_yed_about.html)
for further manipulation.
You can control whether the table names should be qualified with the schema/catalog (see page 276) in the graph.
8.4 Exporting a Schema
Only in DbVisualizer Pro
This feature is only available in the DbVisualizer Pro edition.
You can export all or selected objects in a schema using the Export Schema assistant.
Output Format (see page 152) Output Destination (see page 153) Object Types (see page 153) Options (see page 153)
Using Variables in Fields (see page 153) Saving And Loading Settings (see page 154)
To export a schema:
Select the schema node in the Databases tab tree,
Launch the Export Schema assistant from the right-click menu,
Select an Output Format Output Destination Objects, , to export and Options, Click Export.
8.4.1 Output Format
You can export objects in one of these formats: CSV HTML SQL XML XLS, , , , (Excel), or JSON.
The CSV HTML XSL, , and JSON formats are specifically for table data and are not supported for any other type of objects.
The SQL and XML formats can be used for all objects to export the DDL, and for tables you can also choose to include the table data in these formats.
You can control whether to use delimited identifiers and/or qualified names (see page 276) in the DDL and INSERT statements generated for the SQL format.
8.4.2 Output Destination
The destination can be one of:a file,
an open or new SQL Commander tab, with options for where in an open SQL Commander to insert the result,
to the system clipboard.
8.4.3 Object Types
In the Object Types area you select what to export. You can check the checkbox for an object type to export all objects of that type, or expand a type node and select individual objects.
8.4.4 Options
The options depend on the selected Output Format.
For the SQL and XML formats, you can choose to export the DDL, the DDL for indexes for a table and the table data: as INSERT statements for the SQL statement or in one of three XML formats.
For the XLS format, you can choose to export table data as either regular Binary Excel or OOXML for Excel 2007 and later.
Most formats also let you specify other options, such as delimiters, title and descriptions. Just select an Output Format to see which options are available.
You can also adjust the Data Formats specifically for the exported table data. By default, the formats defined in are used, but sometimes you need to export dates and numbers in a different format because Tool Properties
you intend to import the data into a different type of database.
In the Data Format Settings dialog you can also specify how to quote text data and how to handle quotes within the text value.
8.4.5 Using Variables in Fields
You can use some of the pre-defined DbVisualizer variables (see page 221) (${dbvis-date}$ ${,
, , , and
dbvis-time}$ ${dbvis-timestamp}$ ${dbvis-connection}$ ${dbvis-database-type}$ ${ ) in all fields that hold free text (e.g. title and description fields) and as part of the file name dbvis-object}$
Use the ${dbvis-object}$ variable as part of the filename if you want to export the DDL and/or data to a separate file for each object. The variable is replaced with the object type and object name, e.g. ${
becomes for a table named COUNTRIES.
dbvis_object}$.sql table_COUNTRIES.sql
8.4.6 Saving And Loading Settings
If you often use the same settings, you can save them as the default settings for this assistant. If you use a number of common settings, you can save them to individual files that you can load as needed. Use the Settings button menu to accomplish this:
Save as Default Settings
Saves all format settings as default. These are then loaded automatically when open an Export Schema dialog
Use Default Settings
Use this choice to initialize the settings with default values Remove Default Settings
Removes the saved defaults and restores the regular defaults Load
Use this choice to open the file chooser dialog, in which you can select a settings file Save As
Use this choice to save the settings to a file Copy Settings to Clipboard
Use this choice to copy all settings to the system clipboard. These can then be pasted into the SQL Commander to define the settings for the @export editor commands.
8.5 Filtering Schemas in the Tree
Only in DbVisualizer Pro
This feature is only available in the DbVisualizer Pro edition.
If you have many schema in the tree, it may be hard to find the ones of most interest. You can then define a filter so that only a few schemas are shown, as described in Filtering Database Objects (see page 49).