0% found this document useful (0 votes)
32 views68 pages

NoLic PowerArchitectUserGuide-0.9.13

This document provides a table of contents for a user guide about Power*Architect, an application for creating and managing relational and multidimensional data models. The table of contents outlines how to get started using the application, including setting up databases, designing data models, and forward engineering. It also summarizes how to create relational and multidimensional data models by working with tables, columns, relationships and more. Additional sections cover setting database preferences and support, reverse engineering data models, and analyzing data structures.

Uploaded by

Luisardo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views68 pages

NoLic PowerArchitectUserGuide-0.9.13

This document provides a table of contents for a user guide about Power*Architect, an application for creating and managing relational and multidimensional data models. The table of contents outlines how to get started using the application, including setting up databases, designing data models, and forward engineering. It also summarizes how to create relational and multidimensional data models by working with tables, columns, relationships and more. Additional sections cover setting database preferences and support, reverse engineering data models, and analyzing data structures.

Uploaded by

Luisardo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 68

Table of Contents

1. Introduction ............................................................................................................ 1
About Power*Architect ........................................................................................ 1
About This Guide ................................................................................................ 1
Power*Architect Licensing and Distribution ............................................................. 1
2. Getting Started ........................................................................................................ 2
About Data Models ............................................................................................. 2
About Data Structure Analysis ............................................................................... 2
Copying and Transforming Data ............................................................................ 3
About Advanced Features ..................................................................................... 3
About System Preferences .................................................................................... 3
Understanding the Power*Architect User Interface .................................................... 4
About the Database Tree .............................................................................. 4
About the Playpen ....................................................................................... 5
Using Power*Architect on Different Operating Systems ..................................... 5
Example - Creating a Data Model .......................................................................... 5
Setting Up Databases ................................................................................... 5
Designing a Database ................................................................................... 6
Forward Engineer ........................................................................................ 7
Comparing Data Models ............................................................................... 8
3. Creating a relational Data Model ................................................................................ 11
Working with Tables ........................................................................................... 11
Creating New Tables ................................................................................... 11
Modifying Tables ........................................................................................ 12
Copying Tables from external documents ........................................................ 12
Working with Columns ........................................................................................ 12
Creating New Columns ................................................................................ 12
Modifying Columns ..................................................................................... 14
Moving Columns ......................................................................................... 16
Copy Columns from external documents ......................................................... 16
Working with Primary Keys .................................................................................. 17
Working with Relationships .................................................................................. 17
About Identifying and Non-Identifying Relationships ......................................... 17
Creating Relationships .................................................................................. 18
Modifying a Relationship .............................................................................. 19
Working with Indices ........................................................................................... 23
Creating an Index ........................................................................................ 23
Modifying an Index ..................................................................................... 26
Deleting an Index ........................................................................................ 26
Working with Diagram Objects in the Playpen ......................................................... 26
Using Undo and Redo .................................................................................. 26
Selecting Multiple Objects in the Playpen ........................................................ 27
Deleting Diagram Objects in the Playpen ......................................................... 27
Rearranging Diagram Objects in the Playpen .................................................... 27
Automatically Arranging Tables in the Playpen ................................................. 27
Straightening Diagram Lines in the Playpen ..................................................... 28
Using the Playpen Zoom Options ................................................................... 28
Finding and Replacing Playpen Objects ........................................................... 28
Printing or Exporting a Data Model Diagram .................................................... 29
4. Creating a multidimensional (OLAP) Data Model .......................................................... 30
Creating a new multidimensional Data Model ........................................................... 30
Adding a Cube ........................................................................................... 30

iv
Power*Architect User Guide

Adding a Dimension .................................................................................... 31


Adding a Measure ....................................................................................... 31
Adding a Role ............................................................................................ 32
Importing a multidimensional Data Model ............................................................... 32
Exportng a multidimensional Data Model ................................................................ 32
5. Setting up Database Support ...................................................................................... 33
Supported Database ............................................................................................. 33
Setting up Database Types .................................................................................... 33
Adding a New Database Type ....................................................................... 34
Defining the JDBC Driver ............................................................................ 36
Setting up Database Connections ............................................................................ 37
Creating a New Database Connection ............................................................. 37
Adding or Removing Database Connections for a Project .................................... 39
Modifying or Deleting Database Connections ................................................... 39
6. Setting Preferences ................................................................................................... 41
Defining Project Settings ...................................................................................... 41
Setting User Preferences ....................................................................................... 43
7. Reverse Engineering a Data Model ............................................................................. 45
8. Forward Engineering a Data Model ............................................................................. 47
9. Analyzing Data Structures ......................................................................................... 50
Comparing Data Models ....................................................................................... 50
Data Model Comparison with English Descriptions ................................................... 51
Data Model Comparison in SQL Script ................................................................... 51
Profiling Data ..................................................................................................... 51
Setting the Profile Mode ............................................................................... 52
Creating a Profile ........................................................................................ 52
Viewing Profile Details ................................................................................ 53
Using Profile Graph View ............................................................................ 53
Using Profile Table View ............................................................................. 54
Deleting Profiles ......................................................................................... 55
Saving Your Profile Results in a PDF ............................................................. 55
Creating a Visual Mapping Report ......................................................................... 55
Exporting Column Mappings ................................................................................. 55
10. Copying and Transforming Data ............................................................................... 56
Copying Data Across Database Platforms ................................................................ 56
Using Kettle Jobs ................................................................................................ 57
Before Creating a Kettle Job ......................................................................... 57
Creating a Kettle Job ................................................................................... 57
11. Universal SQL Access ............................................................................................ 60
Output (Results) Window ..................................................................................... 60
Output Formats ................................................................................................... 61
12. Troubleshooting ..................................................................................................... 63
13. Glossary ............................................................................................................... 64
14. Appendices ........................................................................................................... 66
Appendix A: GNU GPL Version 3 ......................................................................... 66
Appendix B: Third Party Licenses .......................................................................... 75
The FAMFAMFAM Silk Icon Set .................................................................. 75
The Apache Software Foundation ................................................................... 75
JGoodies Karsten Lentzsch ........................................................................... 78
PostgreSQL JDBC Driver ............................................................................. 79
iText ......................................................................................................... 80
GNU LGPL version 3 .................................................................................. 86
JUnit ......................................................................................................... 88
Pentaho Data Integration ............................................................................... 89

v
Power*Architect User Guide

The Eclipse Foundation ................................................................................ 89


Sun Microsystems ....................................................................................... 89

vi
Chapter 1. Introduction
About Power*Architect
Power*Architect from SQL Power Group is a visual data modeling tool designed for data architects,
DBAs, analysts, designers, and other professionals. Quickly design every aspect of your data model using
diagrams and a hierarchical view of your model structure. Your data model remains platform-independent,
allowing you to maintain a single database schema that works well with multiple database platforms.

Power*Architect is also well-suited to data warehouse and data mart design. You can open multiple
source databases concurrently, then drag and drop objects (such as schemas, tables, and columns) into
Power*Architect's data modeling playpen to create a new model. After fine-tuning the data model in the
playpen, you can forward engineer the data model into new database on platforms such as Oracle, SQL
Server, DB2, PostgreSQL, or MySQL. Power*Architect also creates ETL (Extract, Transform, Load)
procedures you can use with Pentaho's popular open source Kettle ETL tool to populate the new database.

Power*Architect provides you with a variety of tools to view and compare data structures and mappings.
For example, you can compare the structure of any two databases, highlighting the differences and
similarities and generating the required DDL statements to synchronize them. You can also create a
visual mapping report listing the source tables used in your data model, or create an easy-to-read profile
summarizing the data contained in a database.

Whether you're building or maintaining a data model, Power*Architect provides the tools to help you
design your model in a fraction of the time.

About This Guide


The Power*Architect User Guide provides step-by-step instructions for using Power*Architect and covers
all of Power*Architect's features and capabilities.

The guide assumes you are familiar with basic database operations and terminology (please refer to
Chapter 13, Glossary for a list of some common database terms). If you plan to use Kettle jobs, the guide
assumes you have some knowledge about ETL (Extract, Transform, Load) procedures. If you are looking
for more information about ETL, two books you may want to try are Building the Data Warehouse by
W. H. Inmon and The Data Warehouse Toolkit: The Complete Dimensional Modeling by Ralph Kimball
and Margy Ross.

Power*Architect Licensing and Distribution


Power*Architect is free and open source software, meaning that the source code is readily available.
Everyone is free to inspect, comment on, and modify Power*Architect's source code. Anyone who
modifies the program code is invited (but not required) to contribute their changes back to the project.
All contributions are subject to review and acceptance by the Power*Architect team. We always welcome
suggestions from Power*Architect users, in the spirit of making the application easier to use and providing
the features that matter the most to you.

Power*Architect is distributed to the public under the GNU Public License Version 3. A copy of the license
is available in the section called “Appendix A: GNU GPL Version 3” of this User Guide.

1
Chapter 2. Getting Started
To get started using Power*Architect, begin by reading the section called “Understanding the
Power*Architect User Interface” . This section gives you a quick introduction to the main Power*Architect
areas, the playpen and the database tree. You may then want to work through the hands-on the section
called “Example - Creating a Data Model” . This example shows you how to create a simple data model,
set up a database connection, and forward engineer your model to any database you choose.

Power*Architect contains many features, and you may choose to use some or all of these features
depending on what you are trying to accomplish. Please see the following sections for an overview of
typical activities you would perform with Power*Architect.

• the section called “About Data Models”

• the section called “About Data Structure Analysis”

• the section called “Copying and Transforming Data”

• the section called “About Advanced Features”

• the section called “About System Preferences”

About Data Models


As a general guideline, you would typically follow these steps to create and use a data model:

1. Create a data model using the playpen. You can do this by creating a data model from scratch, reverse
engineering an existing database, or by using a combination of these two methods.

For more information, see:

• Chapter 3, Creating a relational Data Model

• Chapter 7, Reverse Engineering a Data Model

2. Forward engineer your data model to create the data structure in a new database. To use forward
engineering, you must first set up a database type and connection for the target database.

For more information, see:

• Chapter 8, Forward Engineering a Data Model

• Chapter 5, Setting up Database Support

3. Use a Kettle job to copy data into your new database.

For more information, see:

• the section called “Using Kettle Jobs”

About Data Structure Analysis


You can use Power*Architect's many data structure analysis features to view information about a data
model or database. You can:

2
Getting Started

• Compare two data models to view the differences and similarities. Generate and run a SQL script to
update an older database to match a newer data model.

For more information, see:

• the section called “Comparing Data Models”

• View a profile of the data in a database table.

For more information, see:

• the section called “Profiling Data”

• Create a report listing the source tables used for the tables in your Power*Architect data model.

For more information, see:

• the section called “Creating a Visual Mapping Report”

• Export the source-to-target column mappings between a source database and your Power*Architect data
model.

For more information, see:

• the section called “Exporting Column Mappings”

Copying and Transforming Data


Power*Architect provides two methods (one basic, one complex) for copying data between databases.
You can:

• Copy data across database platforms to create a verbatim copy of an existing database.

For more information, see:

• the section called “Copying Data Across Database Platforms”

• Create multiple transformations based on a data model.

For more information, see:

• the section called “Using Kettle Jobs”

About Advanced Features


Power*Architect contains a general-purpose SQL query tool that that allows you to work at the raw SQL
command level. This feature is meant as a convenience for advanced users. It is not necessary to use this
tool during routine data modeling, profiling, or database comparison activity.

For more information, see:

• Chapter 11, Universal SQL Access

About System Preferences


You can set project and user preferences for Power*Architect.

3
Getting Started

For more information, see:

• Chapter 6, Setting Preferences

Understanding the Power*Architect User


Interface
Each data model you create in Power*Architect is saved as a separate project. When you open a project, the
data model information is shown in Power*Architect's two main areas: the database tree and the playpen.

About the Database Tree


The database tree contains a hierarchical view of your project. The hierarchy includes:

• The objects in your data model (tables, columns, keys, indices, etc.).

• The database connections you've added to the project.

• Any objects you've obtained through reverse engineering an existing database. You can drag these
objects into the playpen to add them to the data model you're building in Power*Architect. (Large objects
may take some time to load in the playpen.)

You can expand the branches in the tree to view objects and can often right-click an object to perform
actions. The following icons are used in the database tree to identify the object type.

Database

Catalogue

Schema

4
Getting Started

Owner

Table

Column

Primary Key

Exported Key

Imported Key

Index

Unique Index

About the Playpen


The playpen is your main work area in Power*Architect, where you create and modify your data model.
You can use the playpen to experiment and manipulate tables and relationships. Your changes are not
saved until you decide to save them.

Your data model can includes tables, columns, indices, and relationships. You can create these objects
in Power*Architect or obtain them by reverse engineering an existing database. For more information on
working in the playpen, see Chapter 3, Creating a relational Data Model .

Using Power*Architect on Different Operating Systems


Power*Architect supports multiple operating systems, such as Windows, Macintosh and Linux.
Power*Architect works the same on all operating systems, with a few minor exceptions:

• On Windows and Linux, CTRL is used as the accelerator key. On Macintosh, CMD is the accelerator
key.

• On Windows and Linux, the Power*Architect menu bar is shown below the Power*Architect title bar.
On Macintosh, the menu bar is shown at the top of the Power*Architect window.

Example - Creating a Data Model


This section will show you how to set up a simple database "from scratch", just to get you started using
the tools, without modifying any live data. If you follow the example literally, you will create a trivial
"customer and orders database".

Important: You must create the target database needed in this example. You can use standard vendor-
specific database tools to create the database.

Setting Up Databases
1. Setup Driver. Select File->User Preferences if you are using Windows and Architect->Preferences if
you are using Macintosh. Then select the JDBC Drivers tab. Select the database connection type you

5
Getting Started

wish to use from the list on the left. If there is already a driver for the connection type you wish to use,
click OK and go on to the next step. Otherwise, click the Add JAR button, navigate to where you have
the driver Jar file installed, and click OK.

2. Create a Connection. In the Database Tree section of the main window, right click and choose Add
Source Connection->New Connection. For this example you can use a name like SampleDB for the
Connection Name. Then select a data type you wish to use, which should be the driver you set before.
Then fill the hostname, port, database, file if asked. The JDBC URL will automatically generate when
you fill those blanks, so you don't have to type it an extra time. Fill in the Username and password
(which is set on the server machine).

Designing a Database
You are now ready to design some tables. For this example, we will create the Customer and Orders table
shown here.

1. Click the New Table icon at the right side. The cursor will change to a crosshair. Move the cursor near
the left of the Playpen area, and click. A "New Table" will appear.

2. Also, the Table Properties Dialog will appear. Rename this table to Customers.

3. Click the Insert Column icon, and a column property window will appear for the new column. Rename
the column to customer_id and make it part of the primary key.

4. Insert additional columns for Firstname, Lastname, Address, City, Province, Country Code 1 and Postal
Code. The table should look something like the following:

5. Create a second table, and name it Orders.

6. Create columns named order_id (in the primary key), Quantity, Total Amount, and customer_id. Your
project should now look something like the following:

6
Getting Started

7. We need a relationship between these tables. An order should have a foreign key that refers to the
customer. Click the "New Non-Identifying Relationship" icon. Select the Customers table, then the
Orders table, and a link will be drawn as shown. Click this link and the keys that take part in the
relationship will be highlighted in red.

Forward Engineer
1. If you're happy with the database layout (you can always change it later), it's time to create the database.
Click on the Forward Engineer button. You should see a window similar to the following:

2. Set the "Create in" database to be the source connection we defined earlier. Set the database type to be
the type that was set in the user preferences. Fill in the remaining fields based on the database type that
was selected and press ok. You should see a window similar to:

7
Getting Started

3. If this looks plausible, click Execute, and the tables and their relationship will be created.
Congratulations! You have now created a simple database using the visual tools in Power*Architect.

Comparing Data Models


Suppose that after using this database, you realize that there should be a "shipping amount" field in the
Order table (we never promised this would be completely realistic example).

1. Select the Order table by clicking on its title.

2. Click the Insert Column field and, as before, rename the New Column, this time to Shipping_Amount.
Change its type to Decimal with precision 10 and scale 2.

8
Getting Started

3. Now we need to compare two different Data Models, the original database and the current project. Click
the Compare DM icon. Set the "Older" to Physical Database SampleDB (you may need to change the
Schema to Public). Set the "Newer" to "Current Project" (since it is now newer than the database you
created in Step 6). Set the output format to SQL.

PS: swap button can help you easily swap the newer the the older.

4. Click Start. You should see the SQL Preview window again, but this time with just an ADD for the
column you just added:

5. Click Execute, and the new column will be added to your database table.

9
Getting Started

When you exit the program, it will ask to save your project. Since you might want to alter this in future,
to experiment with some of the other tools without damaging any live data, you may wish to save the
Project file.

The remainder of this document provides a more comprehensive explanation of the various functions that
Power*Architect offers.

10
Chapter 3. Creating a relational Data
Model
Use the Power*Architect playpen to create a data model diagram that includes tables, columns, indices,
and relationships. Before you begin, be sure to read Chapter 2, Getting Started , which explains how to
use the playpen and the database tree.

When you create a data model in Power*Architect, the model is saved in its own project. The project
contains the data model diagram in the playpen and the database tree. You can have multiple projects (and
therefore multiple data models) open in Power*Architect at once. Each project opens in a separate window.

Working with Tables


Creating New Tables
To create a new table:

1.
Click in the side toolbar. The cursor changes to a +.

Note: To cancel creating a new table, press ESC.

Alternate methods:

• Right-click in the playpen, then click New Table.

• Place the cursor over the playpen, then press T.

2. Click in the playpen where you want to create the table. The Table Properties dialog box appears.

3. Enter the following information:

Table Name Enter a table name.


Primary Key Name You cannot enter a primary key name until you
have added columns to the table and defined the
primary key. The primary key name is used when
you forward engineer the data model. For more

11
Creating a relational Data Model

In this field ... Do this ...


information, see the section called “Creating New
Columns” .

Note: Primary key names are not used when


forward engineering to a MySQL database
(MySQL does not support custom primary key
names).
Remarks Enter a description of the table. When you forward
engineer the data model, the remarks will be
included as comments in the database.

4. Click OK.

Modifying Tables
To modify a table:


Click a table in the playpen, then click in the side toolbar.

The Table Properties dialog box appears.

Alternate methods:

• Right-click a table in the playpen, then click Table Properties.

• Click a table in the playpen, then press Enter.

• Modify the table properties as required. For a description of the properties, see the section called
“Creating New Tables” .

• Click OK.

Copying Tables from external documents


To copy tables from external documents (for example spreadsheets) into Power*Architect you can select
& copy the table names from your external documents and paste (CTRL + V) them into the Playpen.

Working with Columns


Creating New Columns
When you create a column, you can choose where the new column is inserted in the table.

12
Creating a relational Data Model

To add a column to a table:

1. Click a table in the playpen. The location you click determines where the column will be inserted in
the table.

• If you click the table name or if the table does not contain any columns, the new column is added
to the end of the column list.

• If you click an existing column, the new column is added above the selected column.

2.
Click in the side toolbar. The Column Properties dialog box appears.

Alternate methods:

• Right-click a table, then click New Column.

• Click a table, then press C.

3. You can enter the following information:

Name Enter the column name.


Type Select the type of data the column holds.

13
Creating a relational Data Model

In this field ... Do this ...


Precision Set the data precision.
Scale Set the scale.
In Primary Key Select the check box if the column is in the primary
key.
Allows Nulls Select the check box if the column handles null
information.
Auto Increment Select the check box if auto increment is allowed.
Sequence Name When Power*Architect creates a table in a
database platform that uses sequences (such as
Oracle or PostgreSQL), Power*Architect creates
a sequence for each auto-increment column in the
table. Enter the name to use for the sequence.

Note: This option is only available if you have


selected the Auto Increment option for the column.
Remarks Enter comments about the column. When you
forward engineer the data model, the remarks will
be included as comments in the database.
Default Value Enter a default value for the column.

Note: Power*Architect does not validate the


default value, so ensure you use a valid format.
The following examples show valid formats for
different data types:

• 'word' for a String

• {d '2007-12-10'} for a Date

• {t '5:38:00'} for a Time

• {ts '2007-12-10 5:38:00'} for a Timestamp

4. Click OK.

Modifying Columns
To modify a column:

1.
Click a column, then click in the side toolbar.

Alternate methods:

• Right-click a column, then click Column Properties.

• Click a column, then press ENTER.

The Column Properties dialog box appears.

14
Creating a relational Data Model

If you added this column to your data model using reverse engineering, the source database and table
from which the column originated are shown at the top of the Column Properties dialog box.

2. For modifying multiple columns at a same time: select multiple columns, then open column properties
as above. The window looked like this:

15
Creating a relational Data Model

You can modify the properties of every column you selected by checking the checkboxes in front of
them.

3. Modify the column properties as required. For a description of the properties, see the section called
“Creating New Columns” .

4. Click OK.

Moving Columns
You can move a column from one table to another or rearrange columns within a table.

• To move a column, click the column and drag it to a new location.

• To move multiple columns, use CTRL+click to select the columns, then drag them to a new location.

Note: You can also add or remove columns from the primary key. For more information, see the section
called “Working with Primary Keys” .

You can also use cut and paste to move to a column from one table to another. The column keeps the
source for ETL mapping from the original table.

Copy Columns from external documents


To copy column from external documents (for example spreadsheets) into Power*Architect:

16
Creating a relational Data Model

1. Select & copy the columns from your external document

2. Select the table in the Playpen you want to add the column to

3. Press CTRL + V to copy the columns into the table

Working with Primary Keys


After adding one or more columns to a table, you can define the column(s) used for the primary key.

To add a primary key:

1. Select one or more columns.

2. Drag the column(s) to the primary key area in the table.

To remove a primary key:

1. Select the column(s) in the primary key area.

2. Drag the column(s) from the primary key area to the table's column list.

Note: You can change the primary key name for the table. For more information, see the section called
“Modifying Tables” .

Working with Relationships


About Identifying and Non-Identifying Relationships
You can create relationships between tables. For example, a typical one-to-many relationship might
describe how invoices and invoice line items relate to each other. The relationship might indicate that the
invoice_line table is a child of the invoice table, and every row in the invoice_line table relates to exactly
one row in the invoice table.

You can create identifying and non-identifying relationships:

• In an identifying relationship, the child table cannot be uniquely identified without the parent.

• In a non-identifying relationship, the child can be identified independently of the parent.

You could choose to create the invoice and invoice line relationship from the previous example as either
an identifying or non-identifying relationship.

• If you create an identifying relationship, an invoice line cannot be uniquely identified without also
knowing the invoice number it belongs to. For example, assume that invoice line numbers always start
at 0 or 1 within each invoice. The same line numbers will appear in different invoices - each invoice
will have a line 0, line 1, line 2, etc.

17
Creating a relational Data Model

• If you create a non-identifying relationship, an invoice can be uniquely identified without knowing
the invoice number it belongs to. For example, assume each invoice line has its own unique identifier
(invoice_line_id). In this example, invoice_line_id is referred to as a "surrogate key," because it's just
a made-up number which has no special meaning in terms of the invoice line.

For this relationship, you would also want to create a unique index on the combination of
(invoice_number, line_number) to guarantee there are no two line items with the same line number on
the same invoice. In the identifying relationship example, the primary key enforces this rule.

Creating Relationships
To create a new relationship:

1. Do one of the following:


To define an identifying relationship, click in the side toolbar, or press R. The cursor changes
to a +.


To define a non-identifying relationship, click in the side toolbar, or press SHIFT+R. The cursor
changes to a +.

Note: To cancel creating a relationship, press ESC or click a blank area in the playpen.

2. Click the parent table, then click the child table. A relationship is created between the two tables and
is shown as a line.

The mapping between the tables is based on the parent table's primary key. For each column in the
primary key of the parent table:

• If the child table contains a column with the same name and this is the first relationship between the
two tables, the relationship is mapped to the existing column in the child table.

18
Creating a relational Data Model

• If the child table does not contain a column with the same name, or the child table contains a column
that has the same name but the column has a different data type, or a relationship already exists
between the tables, a new column is created in the child table. The relationship is mapped to the
new column.

3. To view the columns that are mapped by the relationship, click the relationship link. The mapped
columns are shown in red.

You can now define the relationship properties, view the individual column mappings or change the
mapping of the child table to the parent table. For more information, see the section called “Modifying
a Relationship” .

Note: You can automatically straighten the relationship lines between tables. For more information, see
the section called “Straightening Diagram Lines in the Playpen” .

Modifying a Relationship
To modify a relationship:

1.
Click a relationship link in the playpen, then click in the side toolbar. The Relationship Properties
dialog box appears.

Alternate method:

• Right-click the relationship link, then click Relationship Properties.

19
Creating a relational Data Model

2. You can enter the following information on the Relationship tab:

Relationship Name Enter a name for the relationship. When you


forward engineer the data model, the relationships
are created as foreign key constraints in the
target database. These constraints are named based
on the relationship name. You can also view a
relationship's name in the playpen when you hover
over the relationship line.
Relationship Type Select the type of relationship (identifying or non-
identifying).
Cardinality Select the end cardinality for the primary and
foreign keys.
Deferrability Select the deferrability options.

• Not Deferrable - Foreign key constraints are


checked immediately at the time an INSERT,
UPDATE, or DELETE statement is issued.

• Deferrable, Initially Deferred - If the database


transaction doesn't specify whether to defer
constraint checks, the foreign key constraints
will be deferred, meaning that they are not
checked until the INSERT, UPDATE, or
DELETE transaction is committed.

• Deferrable, Initially Immediate - If the database


transaction doesn't specify whether to defer
constraint checks, foreign key constraints are
checked immediately at the time an INSERT,
UPDATE, or DELETE statement is issued.

Important: Before selecting an option, read


the following description to ensure you fully
understand the effect of each option.

When manipulating data in a database (using


INSERT, UPDATE, and DELETE statements),
the foreign key constraints created by
Power*Architect are used to ensure data integrity
between the two tables. The deferrability options
control when these constraints are enforced.

Within the context of a transaction, deferred


constraints are not checked until the transaction
is committed, while immediate constraints are
checked at the time the INSERT, UPDATE, or
DELETE statement is issued (in the middle of
the transaction). This means that if you are using
immediate constraints, you must be careful about
the order in which data is changed. With deferred
constraint checking, you can make changes in any

20
Creating a relational Data Model

order as long as all constraints have been satisfied


by the time you commit.

For databases that support deferred and immediate


constraint checking, each transaction can specify
whether to defer constraint checks or carry
them out immediately. If a transaction does not
specify this option, each deferrable foreign key
constraint is evaluated according to its "initially
immediate" or "initially deferred" option. On the
other hand, constraints marked as "not deferrable"
will always be checked immediately regardless of
the transaction's setting.

Important Notes:

• For data manipulation done outside the context


of a database transaction, there is no difference
between immediate constraint checking and
deferred constraint checking.

• Not all database platforms support this


option. Some only support deferred constraint
checking, while others only support immediate.
When Power*Architect forward engineers to
these types of systems, the DDL script includes
comments warning about this lack of support.
Delete Rule • Restrict - Prevents deletion of a referenced row.

• No Action - If any referencing rows still exist


when the constraint is checked, an error raised;
this is the default behavior if you do not specify
anything. (The essential difference between two
choices is that No Action allows the check to be
deferred until later in the transaction, whereas
Restrict does not.)

• Casecade - When a referenced row is deleted,


row(s) referencing it should be automatically
deleted as well.

• Set Null - Cause the referencing columns to be


set to nulls when the referenced row is deleted.

• Set Default - Cause the referencing columns to


be set to default values when the referenced row
is deleted.

NOTE: Set Default and Set Nulls do not


excuse you from observing any constraints. For
example, if an action specifies Set Default but
the default value would not satisfy the foreign
key, the operation will fail.
Update Rule

21
Creating a relational Data Model

In this field ... Do this ...


Analogous to Delete Rule there is also Update
Rule which is invoked when a referenced column
is changed (updated). The possible actions are the
same.
Platform Supports • Oracle - Supports only Restrict, No Action in the
Update Rules and everything except Set Default
in the Delete Rules.

• PostgreSQL - Supports every rule.

• MySQL - Supports everything except Set


Default in both the Update and Delete Rules.

• IBM DB2 - Supports only Restrict, No Action in


Update Rules and everything except Set Default
in Delete Rules.

• HSQLDB - Supports everything except Restrict


in both Update and Delete Rules.

• SQL Server 2000 - Supports only Casecade and


No Action in both Update Rule and Delete Rule.

• SQL Server 2005 - Supports everything except


Restrict in both Update and Delete Rule.

3. On the Mappings tab, you can change the mapping to the child table. Click and drag the relationship
link to the column in the child table that is mapped to the parent table.

Note: If a column in the child table has [FK] beside it, this means the column is a foreign key in another
parent table. This alerts you that the column is already "in use", since you wouldn't normally use the
same column as a foreign key in multiple tables.

22
Creating a relational Data Model

4. Click OK.

Working with Indices


Creating an Index
You can create multiple indices for a table.

To create an index:

1.
Select a table in the playpen, then click in the side toolbar. The Index Properties dialog box appears.

23
Creating a relational Data Model

Alternate methods:

• Left-click a table in the playpen, then press I.

• Right-click a table in the playpen, then click New Index.

• Right-click a table in the database tree, then click New Index.

2. You can enter the following information:

Index Name Enter a name for the index.


Unique Select the check box if the index will act as
a constraint which guarantees the values in this
index's columns are unique across all rows in the
table. This is similar to the primary key constraint,
with two exceptions: A unique index may contain
nullable columns, and a table can have any number
of unique indices.
Primary Key

24
Creating a relational Data Model

Select the check box to set this index as the table's


primary key. The primary key is a special type
of index which enforces uniqueness: The values
in the primary key's columns are unique across
all rows in the table. A table can only have one
primary key, and none of the columns in the
primary key may be nullable. It is considered good
practice to have a primary key on every table in the
data model.
Clustered Select the check box to create a clustered index.
Many databases support the notion of a clustered
index. The exact meaning varies by platform, but
marking an index as clustered often affects the
physical ordering of the rows within the table
(which may increase or decrease performance
based on the types of SQL queries being run). Most
database platforms allow only one clustered index
per table.
Index Type Select the index type. The list includes all known
index types for all database types configured in
your user preferences. If you are building a cross-
platform data model, it's best to leave this setting
at "platform default." However, if you are tuning
your data model for a specific target database,
you may choose the desired index type for your
platform.
List of columns Select the In Index check box beside each column
you want to include in the index. For each column,
select the sort order (Ascending, Descending, or
Unspecified).

Use the arrows at the bottom of the dialog box


to set the order of the columns within the index.
Columns higher in the list will come first in the
index's column list.

Notes:

• If the table contains columns in the primary key,


a separate index will always be created for the
primary key column(s), even if you don't select
any columns.

• On some database platforms, the column order


in the index and the column order in the SQL
WHERE clause must match in order for the
query optimizer to use the index.

• On most database platforms, a WHERE clause


that references a subset of a multi-column index
can usually be used when those columns in the
WHERE clause are the leading columns in the
index.

25
Creating a relational Data Model

In this field ... Do this ...


Example: Table A has columns B, C, D, E, F.
Table A has an index on (F, E, D).

SELECT * FROM a WHERE f='x'; - index can


be used on most platforms

SELECT * FROM a WHERE e='x'; - index can


not be used on most platforms

SELECT * FROM a WHERE f='x' AND e='x'


AND d='x'; - index can be used

SELECT * FROM a WHERE d='x' AND e='x'


AND f='x' ; - index can be used on some
platforms, but index order and WHERE clause
order are different so some platforms will not
use the index

3. Click OK.

Modifying an Index
To modify an index:

1. Right-click a table in the playpen, then click Index Properties. If there are multiple indices for the table,
select the index you want to modify.

Alternate method:

• Right-click the index in the database tree, then click Index Properties.

The Index Properties dialog box appears.

2. Modify the index properties as required. For a description of the properties, see the section called
“Creating an Index” .

3. Click OK.

Deleting an Index
Right-click the index in the database tree, then click Delete Selected.

Working with Diagram Objects in the Playpen


Using Undo and Redo
Power*Architect keeps track of your actions and allows you to undo them at a later time. The 100 most
recent actions you have performed are remembered and can be undone in sequence.

If you undo an action accidentally, you can choose to redo the action. However, be careful: If you make
a new change after undoing one or more actions, your redo history is lost.

26
Creating a relational Data Model

To undo an action, click in the top toolbar. You can also select Edit » Undo or press CTRL+Z.

To redo an action, click in the top toolbar. You can also select Edit » Redo or press CTRL+Y.

Selecting Multiple Objects in the Playpen


To select multiple objects (tables, columns, or relationships) in the playpen, do any of the following:

• Press CTRL or SHIFT and click the objects.

• Click a blank area in the playpen, then drag to form a grey box around the objects.

• Press CTRL+A to select all the objects in the playpen.

To cancel the selection, click a blank area in the playpen.

Deleting Diagram Objects in the Playpen


To delete a diagram object (table, column, or relationship) in the playpen, select one or more objects in

the playpen, then click in the side toolbar.

Alternate methods:

• Right-click an object, then click Delete Selected.

• Select one or more objects, then press DELETE.

Rearranging Diagram Objects in the Playpen


You can change the layout of your data model diagram by rearranging the tables in the playpen. You can
also change where relationship links visually connect to a table in the diagram. (To change the columns
mapped by a relationship link, you must modify the relationship. For more information, see the section
called “Modifying a Relationship” .)

Notes:

• You can rearrange columns within a table or move columns from one table to another. For more
information, see the section called “Moving Columns” .

• You can automatically arrange the tables in the playpen. For more information, see the section called
“Automatically Arranging Tables in the Playpen” .

• You can automatically straighten the relationship lines between tables. For more information, see the
section called “Straightening Diagram Lines in the Playpen” .

To move a table, select one or more tables, then drag the table(s) to a new location in the playpen.

To move the placement of a relationship link, select a relationship link, then drag either end of the link
to a new location on the parent or child table.

Automatically Arranging Tables in the Playpen


You can automatically arrange tables in the playpen. Automatic layout works best when you have a large
or medium-sized collection of tables, and may not work as well with a small number of tables.

27
Creating a relational Data Model

To automatically arrange tables, select several tables in the playpen, then click in the top toolbar.

Note: If you don't select any tables or select only one table, all of the tables will be arranged.

Straightening Diagram Lines in the Playpen


You can automatically create straight lines for the relationship links in your data model diagram. All
relationship links will be changed to horizontal or vertical straight lines, as long as the tables connected
by the link are aligned horizontally or vertically. If the tables are not aligned, the relationship link will
not be changed.

To straighten the relationship lines, right-click a blank area in the playpen, then click Straighten Lines.

Using the Playpen Zoom Options


You can use the zoom options on the side toolbar to control the magnification level in the playpen. The
four zoom buttons, in order from top to bottom, are:


Zoom in


Zoom out


Reset the zoom to the default level


Zoom to fit

To use the zoom options on specific objects in the playpen, select the objects before clicking a zoom
button. If you don't select any objects in the playpen, the zoom options affect the entire diagram.

Finding and Replacing Playpen Objects


You can search for objects in the playpen. You can then quickly rename the items or select them in the
playpen.

1. Select Edit » Find/Replace, or press CTRL+F. The Find dialog box appears.

28
Creating a relational Data Model

2. Enter your search criteria, then click Search. The Search Results dialog box appears with your results.

3. To rename an object, select the object and click Rename Selected. You can also select multiple objects
if you want to rename all the objects using the same name.

4. To select an object in the playpen, select the object and click Show in Playpen.

You can also find tables in a model by selecting the table in the Playpen Database in the Database Tree

and clicking on 'Zoom to fit' in the Playpen Zoom tools on the right side.

Printing or Exporting a Data Model Diagram


To print the data model diagram currently in the playpen, select File » Print.

To export the data model diagram currently in the playpen:

1. Select File » Export Playpen to PDF. The Save dialog box appears.

2. Select the location and filename for the PDF, then click Save.

3. To hide the Creating PDF dialog box, click Run in Background.

29
Chapter 4. Creating a multidimensional
(OLAP) Data Model
Using the Power*Architect OLAP Schema Editor you can also create a multidimensional data model that
includes dimensions, cubes and measures.

The development of the OLAP Schema Editor is still in an early stage so not all it's functionality is
implemented yet. We welcome you to try it out and give us your feedback. This part of the manual covers
only a small part of the functionality and is intended for users with experiences in building Mondrian
OLAP schemas.

Creating a new multidimensional Data Model


To create an OLAP schema select OLAP->Edit Schema->New Schema. Select the database your schema
will be based on and enter a name for the new schema. The list of database connections corresponds to the
databases available in the DB Tree in the main Architect frame. If you'd like to base your OLAP schema on
an existing database, simply connect to that database in the DB Tree before creating your OLAP schema.

Now you can easily add cubes, measures and dimensions to your schema by clicking on the according
icon on the right side. The cursor will change to a crosshair. Move the cursor near the left of the Playpen
area, and click. The properties box will appear.

Adding a Cube
To add a cube:

1.
Click on to create a new cube. You can also press "c" instead.

2. The cursor will change to a crosshair. Move the cursor near the left of the Playpen area, and click. The
Cube Properties box will appear.

30
Creating a multidimensional
(OLAP) Data Model

3. Enter the following information:

In this field ... Do this ...


Name Enter a measure name.
Caption Enter the measure caption.
Default measure (optional) Enter the default measure. Leave this field empty
if you create a new cube.
Fact table Either select an existing table or create a new view
using a SQL statement.

4. Click on OK.

5. You can now add measures to the cube.

Adding a Dimension
To add a shared dimension:

1.
Click on to create a new dimension.

2. The cursor will change to a crosshair. Move the cursor near the left of the Playpen area, and click.

3. The dimension properties dialog box appears.

4. Enter the following information:

In this field ... Do this ...


Name Enter the dimension name.
Caption Enter the dimension caption.
Type Select if your dimension is a standard dimension
or a time related dimension.

Adding a Measure
To add a measure:

1. Select the cube you want to add the measure to.

2.
Click on to add a measure to the cube.

3. Enter the following information:

In this field ... Do this ...


Name Enter a measure name.
Caption Enter the measure caption.
Aggregator Select the aggregate function (sum, count, min,
max, avg, distinct-count).
Value Either select the column the measure is based on
or write an expression.

31
Creating a multidimensional
(OLAP) Data Model

Adding a Role
The creation and editing of roles is not supported yet.

Importing a multidimensional Data Model


To import an OLAP schema select OLAP->Import Schema. After selecting the schema file you can enter
the name of the schema and select the related database.

Exportng a multidimensional Data Model


You can export OLAP schemes to PDF and XML with right-clicking on the Playpen in the OLAP Schema
Editor. To export it to XML select 'Export Schema...', to export it to PDF select 'Export Playpen to PDF'.

32
Chapter 5. Setting up Database
Support
There are many features within Power*Architect that involve connecting to a database, such as reverse and
forward engineering. Power*Architect allows you to use any JDBC- or ODBC-accessible source database.
For more information on supported databases, see the section called “Supported Database” .

Connecting to a database with Power*Architect involves the following steps:

1. Define general settings and drivers for the database platform you plan to connect to (such as SQL Server
or Oracle). For more information, see the section called “Setting up Database Types” .

2. Create a connection to a specific database server. This connection uses the general settings and drivers
you have configured for the database platform. For more information, see the section called “Setting
up Database Connections” .

Supported Database
Power*Architect provides full or partial support for the following database platforms.

Database Support Notes


Oracle Fully supported.
SQL Server Fully supported.
PostgreSQL Fully supported.
MySQL Fully supported.
IBM DB2 Partial support; needs more testing.
HSQLDB Works; used in samples.
Derby Preliminary support exists. Reverse engineering
databases in Derby 10.3.2 or later is possible. Derby-
specific forward engineering is not yet available;
however, you can try using the forward engineering
support for another platform such as MySQL or
HSQLDB. Please post to our web support forum if
you are interested in forward engineering your data
models to Derby.

Setting up Database Types


You must define general settings for the database platforms you plan to work with (such as SQL Server,
MySQL, Oracle, DB2, etc.). These settings will be used by Power*Architect when you set up a connection
to a specific database server.

Note: Remember, at this point you are configuring general settings only and are not connecting to a specific
database. For more information on connecting to a database, see the section called “Setting up Database
Connections” .

• General settings for several database platforms are already pre-configured in Power*Architect. If you
plan to work with one of these database platforms, all you need to do is define the location of the JDBC
driver. For more information, see the section called “Defining the JDBC Driver” .

33
Setting up Database Support

• You can also define additional database platforms in Power*Architect. For more information, see the
section called “Adding a New Database Type” .

Adding a New Database Type


To add a new database type:

1. Select File » User Preferences.

Alternate method:

• Select Connections » Database Connection Manager or Window » Database Connection Manager.


On the Database Connection Manager dialog box, click JDBC Drivers.

The User Preferences dialog box appears, with the JDBC Drivers tab open. Existing database types,
including the pre-defined database types included with Power*Architect, are listed on the left.

Note: You can modify an existing database type by clicking on it in the list.

2. Click + below the list of database types.

3. Enter the following information on the General Tab:

Name Name for the database type (for example,


PostgreSQL or SQL Server).
Driver Class Java class name of the driver. This is the driver
class within the JDBC driver JAR file that will be
used for database connections.
Connection String Template

34
Setting up Database Support

General format of the JDBC URL for the database


platform.

Important: You are not creating a connection for


a specific database - you are entering a generic
connection string that applies to the database
platform. Later on, when you set up a connection
to a specific database, Power*Architect will use
this template to create the URL to connect to the
database.

The connection string template must conform to a


specific pattern that includes literals and variables.

• Literals are entered like normal text but may


not contain angle brackets (< or >), which are
reserved for defining variables. As the name
implies, literals appear in the URL in the same
position and way they appear in the template.

• Variables are used to for values that change


often, such as the schema or database
name you wish to connect to. To define
a variable in the template, use the format
<variable_name:default_value> (to include a
default value) or <variable_name> (if you don't
want to include a default value). If you use
a default value. it is entered automatically
when you create a database connection. You
can modify the value if the database you are
connecting to is configured to use a different
value.

Each variable you define is shown below the


Connection String Template field. This provides
you with a preview of the values you will be able
to modify when creating a database connection.

For example, the connection string template to


connect to a Microsoft SQL Server database might
look like this:

jdbc:sqlserver://<Hostname>:<Port:1433>

When you create a connection to a specific


SQL Server database, Power*Architect will use
this template to create the connection URL. In
this example, the template will create the URL
"jdbc:sqlserver://:1433", where 1433 is the default
port value. Since SQL Server databases listen to
port 1433 by default, it makes sense to include
this value in the template. When you're creating
the actual database connection, you can change the

35
Setting up Database Support

In this field ... Enter the following information ...


port value if the database you're connecting to is
configured differently.

4. The settings on the Kettle tab are only used when you create a Kettle job. For more information on
these settings, see the section called “Using Kettle Jobs” .

5. Click OK.

Next, you must define the location of the JDBC driver for the database type. For more information, see
the section called “Defining the JDBC Driver” .

Defining the JDBC Driver


Whether you are adding a new database platform to Power*Architect or want to use one of the pre-
configured platforms, the last step in setting up a database type is to locate the JAR file (or files) that
contain the JDBC drivers for the database platform.

Note: Remember, at this point you are just telling Power*Architect where the drivers are. You must set
up a database connection in order to connect to a specific database server (for more information, see the
section called “Setting up Database Connections” ).

Unlike most applications, which need a distinct driver program to communicate with each type of database,
Power*Architect uses Java-based drivers. These drivers normally come from the database vendor in the
form of JAR (Java Archive) files. JAR files are an extension to the file format used by PKZip/WinZip
archives.

36
Setting up Database Support

Most database platforms provide drivers that are fully backward compatible. This means that it is best
to use the newest driver available, regardless of the software version on the specific database server you
intend to connect to. One exception to this is the Oracle database. It is important to match the major version
number of your JDBC driver with the major version number of the Oracle database server you connect to.
For example, if you are connecting to an Oracle 10g database, use the latest Oracle 10g driver. If you are
connecting to an Oracle 9i database, use the Oracle 9i driver.

To define the JDBC driver for a database type:

1. If you do not have the JDBC driver for a specific database platform, you can usually obtain one
from the database vendor. If that fails, you can find a directory of databases drivers on Sun's
web site [http://developers.sun.com/product/jdbc/drivers] . There is also a permanent thread in the
Power*Architect user support forum [http://www.sqlpower.ca/forum/posts/list/401.page] , where you
can share information with other Power*Architect users about finding and configuring drivers for a
particular database platform.

2. Decide on a permanent location to store your JDBC drivers. A good strategy is to create a JDBC folder
under your Documents folder and collect all of you JDBC driver files there.

3. Save the JDBC driver (it will usually be one or more JAR files) in the location you've chosen.

4. If the User Preferences dialog box is not already open, select File » User Preferences.

5. On the JDBC Drivers tab, select a database type.

6. Click Add JAR.

7. Locate the JAR file and click Open. If there is a valid driver class in the JAR file, a file tree will appear
showing the JDBC driver classes within the JAR file.

8. Select the driver you want to use.

9. Click OK.

Setting up Database Connections


You must set up a connection to allow Power*Architect to connect to a specific database. When you
create a connection, it is automatically added to the current Power*Architect project. You can also use
the connection in all your projects.

Before creating a connection, you must define the general settings for the database platform. For more
information, see the section called “Setting up Database Types” .

Creating a New Database Connection


To create a new database connection:

1. Select Connections » Add Source Connection » New Connection.

Alternate methods:

• Select Connections » Database Connection Manager (or Window » Database Connection Manager),
then click New.

• Right-click a blank space in the database tree, then click Add Source Connection » New Connection.

The Database Connection dialog box appears.

37
Setting up Database Support

2. On the General tab, enter the following information:

In this field ... Do this ...


Connection Name Enter a name for the database connection.
Database Type Select the database platform you want to connect
to. Note: This list contains the database types
you defined in your user preferences. For more
information, see the section called “Setting up
Database Types” .
Connect Options and JDBC URL Enter the connection options for the database
driver. (Theses options are based on the database
type you select.)

If you are using one of the fully-supported drivers,


the connection option parameters are added into
the JDBC URL field in the order that the Java
driver expects to see them (this string is sometimes
called a "db URL" in Java terminology). In the
following example:

• The default port number from the database type


has been entered automatically in the Connect
Options.

Note: You would not usually change a


default value unless the database server you're
connecting to has been configured to use a
different value.

• The hostname and database name have been


entered manually in the Connect Options.

• The PostgreSQL driver is being used.


Username and Password If necessary, enter the username and password to
connect to the database.

38
Setting up Database Support

3. The settings on the Kettle tab are only used when you create a Kettle job. For more information on
these settings, see the section called “Using Kettle Jobs” .

4. Click OK. The new connection is added to the current project (you can view the connection in the
database tree) and is also added to the Database Connection Manager.

Adding or Removing Database Connections for a Project


You can add a previously created database connection to a project. (When you create a new connection,
it is automatically added to the current project. For more information, see the section called “Creating a
New Database Connection” .) You can also remove a connection from a project. You cannot remove a
connection if it is being used as a source connection in the playpen.

Note: You can permanently delete connections. For more information, see the section called “Modifying
or Deleting Database Connections” .

To add a database connection to a project, do one of the following:

• Select Connections » Add Source Connection, then select a database connection.

• Right-click a blank space in the database tree, click Add Source Connection, then select a database
connection.

The database connection is added to the database tree.

To remove a database connection from a project, do one of the following:

• Right-click a database connection in the database tree, then click Remove Connection.

• Click a database connection in the database tree, then select Connections » Remove Connection.

Modifying or Deleting Database Connections


You can modify a database connection's properties or permanently delete it. You cannot delete a connection
if it is being used as a source connection in the playpen.

Note: You can also remove a connection from a project without permanently deleting the connection. For
more information, see the section called “Adding or Removing Database Connections for a Project” .

To modify a database connection:

1. Select Connections » Database Connection Manager (or Window » Database Connection Manager).

2. Select a database connection, then click Edit.

Alternate methods:

• Right-click a database connection in the database tree, then click Connection Properties.

• Select a database connection in the database tree, then select Connections » Connection Properties.

The Database Connection dialog box appears.

3. Modify the connection settings. For information on the settings, see the section called “Creating a New
Database Connection” .

4. Click OK.

39
Setting up Database Support

To permanently delete a database connection:

1. Select Connections » Database Connection Manager (or Window » Database Connection Manager).

2. Select a database connection, then click Remove.

40
Chapter 6. Setting Preferences
Defining Project Settings
You can define several settings that apply to all Power*Architect projects.

1. Select File » Project Settings. The Project Settings dialog box appears.

2. Enter the following information:

Snapshot Entire Source Database in Project File? When you open a source database in
Power*Architect (for example, to use for
reverse engineering), the database's data structure
(catalogues, schemas, tables, etc.) is shown in the
database tree. Select this check box if you always
want to save the entire data structure in your
Power*Architect project. This allows you to view
the objects at any time without having to reconnect
to the source system.

Important: If you use this option, the first time you


save your project will be very time-consuming and
involve a lot of database activity.
Number of Common Values in Profiles When profiling a database using graph view, you
can view the most common values that occur
in a column. Use this option to set the number
of common values to include in the profile. For
example, enter 10 if you want to include the ten
most common values.

For more information about profiling, see the


section called “Profiling Data” .
Profile Creator Mode Select the mode used to create a profile.

41
Setting Preferences

• Remote Database - This mode sends a query


to the database and the database calculates all
of the statistics. This works well over a large
network because very little data is transferred.

• Local Reservoir - This mode transfers all of the


data to the local computer where it is sampled
and processed. This works well over a fast
network. This option is still experimental and is
known to cause an out of memory error when
profiling large tables.

For more information about profiling, see the


section called “Profiling Data” .

Draw Relationships With Select the method used to draw relationship lines
in the playpen.

Note: Changing this option affects new and


existing relationship lines.

• Rectilinear Lines - Use horizontal and vertical


line segments to connect tables. One to three line
segments will be used (at right angles to each
other) depending on the position of the tables at
each end of the relationship line.

• Direct Lines - Use a single line segment (usually


diagonal) to connect the tables.
Show Options Select how to display your project in the playpen.

Note: Changing these options affects new and


existing columns and tags.

• Show Primary Key Columns - display Primary


Key Columns if checked, else otherwise.

• Show Foreign Key Columns - display Foreign


Key Columns if checked, else otherwise.

• Show Indexed Key Columns - display Indexed


Key Columns if checked, else otherwise.

• Show Unique Key Columns - display Unique


Key Columns if checked, else otherwise.

• Show Remaining Key Columns - display rest


Columns if checked, else otherwise.

• Show PK tags - display [PK] tags for Primary


Key columns if checked, else otherwise.

• Show FK tags - display [FK] tags for Foreign


Key columns if checked, else otherwise.

42
Setting Preferences

In this field ... Do this ...


• Show AK tags - display [AK] tags for the
columns which belong to the unique indexes.

3. Click OK.

Setting User Preferences


You can set preferences that apply to all Power*Architect projects.

Note: This section describes general user preferences and default column settings only. For information on
JDBC drivers preferences, see Chapter 5, Setting up Database Support . You can also set project settings
(see the section called “Defining Project Settings” ).

1. Select File » User Preferences. For Macintosh, select Architect » Preferences.

The User Preferences dialog box appears.

2. On the General tab, enter the following information:

PL.INI File Enter the location for the pl.ini file. This file
stores the settings for the database connections you
create. If you leave this location blank, you will be
prompted to use a default location when you start
Power*Architect.

If you have a pl.ini file from another SQL


Power application, you can use the same file for
Power*Architect so that you don't have to re-enter
all of your database connection information.
ETL Log File
43
Setting Preferences

In this field ... Do this ...


Enter the location for the etl.log file. This log file
is written to when you use the ETL features in
Power*Architect.
Forward Engineering Log File Enter the location of the ddl.log file. This log file
is written to when you forward engineer a data
model.
Antialiased Rendering in PlayPen Turn on this option to improve the display of the
data model diagrams in the playpen, especially
when zoomed out. This option may cause slower
performance on some systems. Using this option
is recommended unless you experience poor
performance.
Error Reporting Turn on this option to send automatic error
reports to SQL Power. Error reports never include
any information that could be used to identify
you or the contents or subject matter of your
project. They simply include a Java stack trace
that tells developers where in the program code
Power*Architect encountered a failure, as well
as generic information such as the version of
your Java Runtime Environment and the amount
of RAM Power*Architect is currently using.
These error reports help the Power*Architect
development team prioritize bug fixes based on the
estimated number of times a particular problem has
been encountered.
Show Welcome Screen Turn this option on to view the welcome screen
when you start Power*Architect.

3. Click OK.

4. On the Default Column Setting, enter the following information:

In this field ... Do this ...


Column name by Default Enter the default column name.
Column type by Default Select the default column type.
Column Precision by Default Enter the default column precision.
Column Scale by Default Enter the default column scale.
Column in Primary Key by Default Select if column should be in primary key by
default.
Column Allows Nulls by Default Select if column should allow Nulls by default.
Column Auto Increment by Default Select if column should Auto Increment by default.
Column Remarks by Default Enter Column default remarks.
Value by Default Enter default value.

44
Chapter 7. Reverse Engineering a Data
Model
You can use reverse engineering to obtain a data model from an existing database, then work with the data
model in Power*Architect. You can also use Power*Architect to create an upgrade script for the original
database (for more information, see the section called “Comparing Data Models” ).

You can also use reverse engineering for data warehouse design, where your objective is to unify several
data models and then import the data from the multiple source systems. To do this, you would typically
reverse engineer one table at a time from several different source systems, then make modifications in
Power*Architect, using the playpen. You can then forward engineer the new data warehouse data model
to a new, separate database (for more information, see Chapter 8, Forward Engineering a Data Model ,
then use an ETL tool to transfer the data from the source systems to the data warehouse.

For more information, on ETL tools in Power*Architect, see the following sections:

• the section called “Using Kettle Jobs”

• the section called “Creating a Visual Mapping Report”

• the section called “Exporting Column Mappings”

To reverse engineer a data model:

1. To create a new Power*Architect project, select File » New Project.

2. If necessary, create a connection for the database you want to reverse engineer. For more information,
see Chapter 5, Setting up Database Support .

3. Add the database connection to your project. For more information, see the section called “Setting up
Database Connections” .

A database node is added to the database tree. Expand this node to view the hierarchy of objects in the
database (such as catalogues and schemas, tables, columns, indices, and relationships). The hierarchy
is presented the same way a native database tool for the source database platform would present the
hierarchy.

As you click objects in the database tree, the object changes from grey to black to indicate you've
viewed it. All viewed items are saved with the project so you can view them later without having to
reconnect to the source system.

Note: If you want to save the entire hierarchy in the project, enable the snapshot option in project
settings. For more information, see the section called “Defining Project Settings” .

4. You can now create a new data model using the objects from the database tree. Simply drag objects
from the tree into the playpen.

If you drag higher-level containers (such as a schema, catalogue, or the entire database), individual
tables, or multiple tables, all items within the container will be added to the playpen. For example, if
you drag a table into the playpen, all of the columns within the table will be added as well. You can
also drag individual or multiple columns from the database tree into tables in the playpen. Just drag the
columns to the position within the table where you want to insert them.

45
Reverse Engineering a Data Model

In addition to using objects from the database tree, you can create new objects (tables, columns, etc.) in the
playpen. For more information on working with the playpen, see Chapter 3, Creating a relational Data
Model .

You can also do the following:

• Create a report listing the source tables used for the tables in the playpen. For more information, see the
section called “Creating a Visual Mapping Report” .

• Compare your current data model to the original database. For more information, see the section called
“Comparing Data Models” .

• Forward engineer the schema. For more information, see Chapter 8, Forward Engineering a Data Model
.

• Use a Kettle job to move data from the original database to your new database. For more information,
see the section called “Using Kettle Jobs” .

46
Chapter 8. Forward Engineering a Data
Model
A key design principle of Power*Architect is that the data models you create always remain generic. This
allows you to use the same data model with a variety of database platforms. You can then use forward
engineering to transform a data model for a specific database platform.

When you forward engineer a data model, Power*Architect creates a physical model that represents the
idealized generic model as closely as possible, given the constraints of the target system. Power*Architect
then creates a SQL Script that you can run to place the components of the data model into a database.

It is important to note that Power*Architect creates the structure of the target database only and does not
create the actual database. Before using forward engineering, you must create the target database. You
would typically do this using the administrative tools provided for the database platform.

Note: You can view or change the location of the forward engineering log file in user preferences. For
more information, see the section called “Defining Project Settings” .

To forward engineer a data model:

1. Open the Power*Architect project containing the data model you want to use. Ensure that all of the
data model elements you want to forward engineer are included in the diagram in the playpen. Make
any required changes, such as:

• Creating new tables.

• Renaming or deleting existing tables.

• Creating new columns.

• Renaming or deleting existing columns.

• Moving columns between tables.

• Modifying column data types.

• Merging two or more tables together. (If the tables you merge have a parent-child relationship, this
is called denormalizing the data model.)

• Splitting a table into several related tables (this is often called normalization).

2. Create the target database. You would typically do this using the administrative tools provided for the
database platform.

3. If necessary, create a connection for the target database. For more information, see Chapter 5, Setting
up Database Support .

4. Add the database connection to your project. For more information, see the section called “Adding or
Removing Database Connections for a Project” .

5.
Click on the top toolbar, or select Tools » Forward Engineering. The Forward Engineer SQL Script
dialog box appears.

47
Forward Engineering a Data Model

6. Enter the following information:

In this field ... Do this ...


Create in Select the database connection for the target
database.
Generate DDL for Database Type Select the database platform. This is the same
database type you specified when you created the
connection for the target database.
All remaining fields Enter information appropriate to the database type
you selected.

7. Click OK. Power*Architect generates a SQL script to create the data structure currently in the playpen.

Note: As Power*Architect is generating the script, warnings or error reports may appear.

8. The Preview SQL Script dialog box appears. For example:

48
Forward Engineering a Data Model

9. To run the script, click Execute. The database objects are created in the target database.

49
Chapter 9. Analyzing Data Structures
Comparing Data Models
You can compare two data models to view the differences and similarities. You can compare a database
to a Power*Architect project or to another database.

The data model comparison provides you with a description of the two data models, highlighting their
differences and similarities, which you can copy into a document or save to a text file. You can also use
the data model comparison to generate and run a SQL script that will update the older database to match
the newer data model.

To compare two data models:

1.
Click on the top toolbar, or select Tools » Compare DM. The Compare Data Models dialog box
appears.

2. In the Compare Older and With Newer sections, select the data models you want to compare.

• Select Current Project - Include an open Power*Architect project in the comparison. The data model
currently in the playpen will be used.

• Physical Database - Include an existing database in the comparison. You must also select the
connection Power*Architect will use to connect to the database. For more information, see the section
called “Setting up Database Connections” .

• From File - Include an existing Power*Architect project in the comparison. Click Choose and select
the project.

Note: If you want to switch the items you've selected in the Compare Older and With New sections,
click Swap.

50
Analyzing Data Structures

3. In the Output Format area, select whether you want to create a SQL script or an English comparison.

4. Select the Suppress similarities check box if you want to include only the differences in the output.

5. Click Start. The data model comparison is created.

Note: The Start button is only available if both data models in the comparison are valid.

See the following sections for details on the information shown in the data comparison.

Data Model Comparison with English


Descriptions
If you chose English descriptions as the output format, the older and newer data models are shown side-
by-side. You can copy the results to the clipboard or save them to a text file.

The comparison includes descriptions to make the older data model the same as the newer data model.
The components are also colour coded to indicate similarities and differences.

The following table summarizes the meaning of the colour codes used in the data model comparison:

Colour Description
Black The component exists in both data models.
Green The component exists in this data model only.
Red The component does not exist in this data model but
does exist in the other data model.
Blue The component is a column and is on different keys
in the two data models.

Data Model Comparison in SQL Script


If you chose SQL script as the output format, a script is created to make the older data model the same as
the newer data model. You can copy the script to the clipboard or save it to a text file.

To run the script and apply the changes to the older database, click Execute.

Note: The Execute button is only available if the older database has a valid database connection. For more
information, see the section called “Setting up Database Connections” .

Profiling Data
Profiling allows you to view a summary of the data in a database. You can use profiles to quickly learn
the characteristics of data in an unfamiliar database. You can also use profiles for activities such as
database optimization and data migration. When you create a profile, the results are saved as part of the
Power*Architect project.

Note: Power*Architect contains two different menu items related to profiling. Use Profile » Profile only
when you want to create a new profile. If you want to view existing profiles, use Window » Profile
Manager. (The profile manager window is similar to the download manager window in a web browser.)

51
Analyzing Data Structures

Setting the Profile Mode


You can select the mode used to create a profile.

1. Select File » Project Settings.

2. In the Profile Creator Mode list, select one of the following options:

• Remote Database - This mode sends a query to the database and the database calculates all of the
statistics. This system works well over a large network because very little data is transferred.

Warning: Profiling moderate-to-large tables (for example, with over 250,000 rows) remotely will put
a significant demand on the database server's resources and may impact the database performance
for other users.

• Local Reservoir - This mode transfers all of the data to the local computer and then samples and
processes the data there. This works well over a fast network. This option is still experimental and
may cause an out of memory error when profiling large tables.

3. Click OK.

Creating a Profile
To create a profile:

1. Connect to the database you want to profile. For more information, see the section called “Setting up
Database Connections” .

2. In the database tree, select the tables you want to profile. (You can also select a column. If you do, a
profile will be created for the entire table.)

3.
Click in the top toolbar.

Alternate methods:

• Select the tables you want to profile, then select Profile » Profile.

• Right-click a table in the database tree, then click Profile.

The Table Profiles window opens. The new profile is listed in the window, along with previous profiles
you've created for the project.

52
Analyzing Data Structures

4. You can view details about each profile in the Table Profiles window. For more information, see the
section called “Viewing Profile Details” .

Note: To create a new profile of the same table, select the table in the Table Profiles window and click

. The previous profile will be retained as well. (Power*Architect will connect to the source database
to create the new profile, regardless of the profile mode you're using.)

Viewing Profile Details


To view profile details:

1. If the Table Profiles window is not already open, select Window » Profile Manager.

2. You can use the Search box and Order by options to find a profile.

3. To view details for all profiles, click View All.

4. To view details for some profiles only, select one or more profiles in the window, then click View
Selected.

You can view the profile details as a graph or table. For more information, see the section called “Using
Profile Graph View” and the section called “Using Profile Table View” .

Using Profile Graph View


To view the profile results in a graph:

• Click the Graph View tab.

53
Analyzing Data Structures

• On the left side of the window, select a column.

The column statistics are shown in the centre of the window. The most common values and their
frequency within the table are also shown.

The pie chart on the right side of the window shows the frequency of the most common values in the
column.

Note: You can set the number of common values to include in the comparison. For more information,
see the section called “Defining Project Settings” .

• To save the profile results in CSV, PDF or HTML format, click Save.

Using Profile Table View


To view the profile results in a table format:

1. Click the Table View tab.

2. To narrow the results, use the Search box in the top-right corner.

3. To sort a column in ascending or descesending order, click the column header.

4. In the Most Frequent column, hover over a cell to view the value and frequency of the most common
items in the column.

54
Analyzing Data Structures

5. To save the profile results in CSV, PDF or HTML format, click Save.

Deleting Profiles
To delete a profile:

1. If the Table Profiles window is not already open, select Window » Profile Manager.

2.
To delete a profile, click beside the profile or press delete.

3. To delete multiple profiles, use CTRL to select all the profiles you want to delete, then press delete.

4. To delete all the profiles, click Delete All.

Saving Your Profile Results in a PDF


You can easily create a PDF document that presents your profile results in an attractive format.

1. Create one or more profiles (see the section called “Creating a Profile” ).

2. Select Window » Profile Manager.

3. In the Table Profiles window, select the profiles you want to include in the PDF, then click View
Selected (see the section called “Viewing Profile Details” ). Or click View All to include all of the
profiles in the PDF.

4. Click Save.

5. Select PDF as the file type and enter a filename, then click Save.

Creating a Visual Mapping Report


When you create a data model using reverse engineering, you can create a report listing the source tables
used for the tables in the data model. You can export this report to a CSV (comma-separate values) file.

1. Select ETL » Visual Mapping Report.

2. To save the report to a CSV file, click Export to CSV.

Exporting Column Mappings


When you create a data model using reverse engineering, you can export a CSV (comma-separated values)
file describing the source-to-target column mappings between the original database and the data model
you created in Power*Architect.

1. Open the project containing the data model you want to use.

2. Select ETL » Export CSV. The Save dialog box appears.

3. Select the location and filename for the CSV file, then click Save.

55
Chapter 10. Copying and Transforming
Data
Copying Data Across Database Platforms
You can use Power*Architect to quickly copy data from one database platform (such as Oracle) and create a
verbatim copy on another database platform (such as PostgreSQL). Power*Architect automatically checks
for foreign key constraints in the target database and orders the inserts and deletes accordingly.

You can also use Power*Architect to copy data if the source and target databases are on the same database
platform. However, in this case, it's usually faster and more reliable to use the database vendor's own tools
to do a "dump-and-restore".

If you want to do something more complex than a verbatim copy, use an ETL tool such as Kettle. ETL
tools offer great flexibility in extracting, transforming, and loading data between databases. For more
information, see the section called “Using Kettle Jobs” .

To copy data:

1. Select Tools » Copy Table Data. The Copy table data dialog box appears.

2. Select the Source and Destination databases. If necessary, click Database Connection Manager to set
up a new database connection.

3. Select the Truncate Destination Table check box to delete all existing data in the destination tables
before copying the data from the source tables.

56
Copying and Transforming Data

Warning: Only use this option if you are sure you want to delete the existing data in the destination
tables.

4. Click OK.

Using Kettle Jobs


You can use Power*Architect to create a Kettle job, which you can then use to create multiple
transformations based on a data model you've created in Power*Architect. You would typically create a
Kettle job to copy data to a new database you've created through reverse engineering.

Note: The Kettle ETL tool is provided by Pentaho as free and open source software. SQL Power does not
maintain or distribute Kettle. To obtain a copy, visit kettle.pentaho.org [http://kettle.pentaho.org/] .

Before Creating a Kettle Job


Before you create a Kettle job, you must use reverse and forward engineering to create a new data model
and database.

1. Create a new data model in Power*Architect using reverse engineering (see Chapter 7, Reverse
Engineering a Data Model ).

2. Forward engineer the data model into a new database (see Chapter 8, Forward Engineering a Data
Model ). This creates the tables and relationships in the target database.

Creating a Kettle Job


Before creating a Kettle job, ensure you've completed the prerequisites (see the section called “Before
Creating a Kettle Job” ).

Note: You can view or change the location of the Kettle (ETL) log file in user preferences. For more
information, see the section called “Setting User Preferences” .

1. Open the project containing the data model you want to use for the Kettle job.

2. Select ETL » Create Kettle Job. The Create a Kettle Job dialog box appears.

57
Copying and Transforming Data

3. Enter the following information:

Job Name Enter a name for the job.


Target Database Select the database connection for the target
database.

Click Properties to view the connection and


modify it if necessary. Ensure the connection
contains the following information:

• General tab - Enter all the required connection


properties for the database platform. (See
the section called “Setting up Database
Connections” .)

• Kettle tab - Enter the hostname, port, and


database for the target database, if applicable. If
a field does not apply to the database platform,
it will be disabled. You do not have to enter a
login name and password.

Note: The hostname, port, and database


information may be entered automatically based
on the information on the General tab.
Schema Name Enter the name of the schema in the target database
that contains the target tables. If the target database
doesn't contain any schemas, or the target tables
are in the default schema, you can leave this field
blank.
Default Join Type Select the join type to use in all merge-joins.
Merge-joins are used to create tables with multiple
sources.

58
Copying and Transforming Data

In this field ... Do this ...


Note: Merge-joins that are created in
transformations from Power*Architect will
usually have to be updated manually, since
Power*Architect cannot tell which fields to
compare during the join.

Save Job to File Select this option to save the Kettle job settings and
transformations to a file. Click Browse and select
the location and filename.
Save Job to Repository Select this option to save the Kettle job settings and
transformations in a repository.

In the Repository list, select the database


connection for the repository. You can use a
connection you have set up previously (if the
database contains a repository) or you can set up
a new connection to a repository. (See the section
called “Setting up Database Connections” .)

Click Properties to view the connection and


modify it if necessary. Ensure the connection
contains the following information:

• General tab - Enter all the required connection


properties for the database platform. (See
the section called “Setting up Database
Connections” .)

• Kettle tab - Enter the hostname, port, and


database for the repository, if applicable. If a
field does not apply to the database platform, it
will be disabled. Enter the repository login name
and password.

Note: The hostname, port, and database


information may be entered automatically based
on the information on the General tab.

4. Click OK to create the Kettle job and transformation files.

If you are using a repository, you are prompted to select the directory location in the repository where
the files will be saved.

Once the job has been created, a window appears with the steps you need to complete before running the
Kettle job.

Note: The transformation files are stored in the same location as the Kettle job. You must use Kettle to
run the job.

59
Chapter 11. Universal SQL Access
Universal SQL Access is a "fall-back" tool that lets you work at the raw SQL command level. This is an
advanced topic and should only be used by those familiar with the intricacies of SQL commands and the
details of your database.

Universal SQL Access is started from the menu entry under the Tools menu, and begins with the GUI
window shown below. The first thing you should do is select which database connection you wish to use.
The list of Connections is the same as the main program uses, as set up in the JDBC Connections window.

The basic steps to using Universal SQL Access are to type a command in the top (SQL Command) section
of the window and click the Execute button; the results are displayed in the bottom (SQL Results) section.
To save you some typing, you can just drag the databases, tables and columns shown in the DB tree at the
left of the Universal SQL Access window and drop them on the top (SQL Command) section.

You can enter more than one SQL statement in the SQL Command section. If you do this, be sure to
terminate each one with a semicolon. If you enter only one SQL statement, the terminating semicolon is
unnecessary. The statements are not interpreted by Universal SQL Access itself, so anything that the given
database and driver accepts can be used. For example, with Oracle, you can use PL/SQL statements. With
most drivers you should be able to use stored procedures.

To execute your commands, use the mouse to press the execute button, or hit Ctrl-Enter (Command-Enter
on Mac). Normally, all statements in the SQL Command text area will be executed in sequence. However,
if there is a selection (in other words, some of the text is highlighted) when you execute, only the selected
text will be executed. So if you only want to execute a subset of the commands, simply select the part
you wish to execute.

By default, auto-commit is enabled, which means each SQL statement is executed in its own transaction
context. Be careful, because this means the effects of your update and delete statements are not undoable!
If you turn the Auto Commit off, and your database supports transactions (most do), you can manually
Commit or Rollback later.

Output (Results) Window


Command Output appears in the SQL Output window. A scrollbar will appear if the information cannot
all be seen at once.

60
Universal SQL Access

Universal SQL Access keeps a log of statements executed and errors encountered. If you run an undate-type
statement, or your statement is rejected by the database, the bottom half of the window will automatically
switch to the "Log" tab so you can see the row count or database error message, respectively. Conversely,
when you execute a select-type statement, the bottom half of the window switches to the tabular result set
view so you can see the data that was selected. Note that in this case, there will still be an entry in the log
tab with the date and time the query was executed, how long it took to execute, and how many rows were
selected. You can see this information by manually switching to the "Log" tab.

Output Formats
The output format in the result window is always Table mode, which provides a friendlier interface which
ensures all of the columns are lined up properly. If you right-click on a table or multiple tables, you can
save the results to a file in HTML or CSV format. The HTML format consists of a table containing results
of the select statement. The CSV format, produces a comma-separated values file with a header row, which
is suitable for importing to any spreadsheet program, such as Microsoft Excel or OpenOffice Calc.

CSV files are often used as a simple way to transfer a large volume of spreadsheet or database information
between programs, without worrying about special file types. For example, transferring a home-made
address book from Power*Architect into a database program such as Filemaker Pro could be done by
exporting the file as a CSV from Excel, then importing that CSV into Filemaker.

For example, here are the results of executing the select statement, "select * from art_logs":

You can view this same data in HTML by right-clicking the selected table, then choosing "Exported
selected to HTML..". Here is what the generated HTML looks like in a text editor:

61
Universal SQL Access

and formatted in a web browser:

With the addition of a custom CSS style sheet, this HTML page could fill a basic reporting need. For more
advanced report layout, be sure to try Wabit [http://www.sqlpower.ca/wabit], the open source reporting
tool from SQL Power.

62
Chapter 12. Troubleshooting
Although we have done our best to ensure you don't experience any problems when using Power*Architect,
there may be times when combinations of different database products, database configurations, and so on,
cause issues. We apologize in advance for any inconvenience this may cause.

If you are having trouble with Power*Architect, we ask that, in order to help us to diagnose the problem,
you take some or all of the following actions:

• Prepare a description of what you were doing.

• Prepare a copy of any errors you encountered.

• Post your problem to the Power*Architect help forum. [http://www.sqlpower.ca/forum/forums/show/


2.page]

63
Chapter 13. Glossary
This section lists some database-related terms and their meanings.

Some of these terms are from FolDoc, "The Free On-line Dictionary of Computing", http://
www.foldoc.org/, Editor Denis Howe.

Column The set of all instances of a given field from


all records in a table [http://foldoc.org/foldoc/
foldoc.cgi?table] .
Database One or more large structured sets of persistent
data, usually associated with software to update and
query [http://foldoc.org/foldoc/foldoc.cgi?query]
the data. A simple database might be a single
file containing many records [http://foldoc.org/
foldoc/foldoc.cgi?records] , each of which contains
the same set of fields [http://foldoc.org/foldoc/
foldoc.cgi?fields] where each field is a certain fixed
width.
Data Modelling The product of the database design process which
aims to identify and organize the required data
logically and physically.
Data Warehousing A database, often remote, containing recent
snapshots of corporate data. Planners and
researchers can use this database freely
without worrying about slowing down day-to-day
operations of the production database.
ETL Extraction, Transforming and Loading - the process
of maintaining and transforming data into and out of
a relational database.
Foreign key A column [http://foldoc.org/foldoc/
foldoc.cgi?column] in a database table [http:/
/foldoc.org/foldoc/foldoc.cgi?table] containing
values that are also found in some
primary key [http://foldoc.org/foldoc/
foldoc.cgi?primary+key] column (of a different
table). By extension, any reference to entities of a
different type.

Some RDBMSs [http://foldoc.org/foldoc/


foldoc.cgi?RDBMSs] allow a column to be
explicitly labelled as a foreign key and only allow
values to be inserted if they already exist in the
relevant primary key column.
Identifying Relationship Where the key of the parent table is a subset of the
key of the child table.
JDBC Java DataBase Connectivity, an unofficial acronym
for the "java.sql" package of functionality used to
access relational databases from programs written in
the Java programming language.

64
Glossary

Key A value used to identify a record [http://foldoc.org/


foldoc/foldoc.cgi?record] in a database, derived by
applying some fixed function to the record. The
key is often simply one of the fields [http:/
/foldoc.org/foldoc/foldoc.cgi?fields] (a column
[http://foldoc.org/foldoc/foldoc.cgi?column] if the
database is considered as a table with records
being rows, see " key field [http://foldoc.org/
foldoc/foldoc.cgi?key+field] "). Alternatively the
key may be obtained by applying some function,
e.g. a hash function [http://foldoc.org/foldoc/
foldoc.cgi?hash+function] , to one or more of the
fields. The set of keys for all records forms an
index [http://foldoc.org/foldoc/foldoc.cgi?index] .
Multiple indices may be built for one database
depending on how it is to be searched.
Primary key The candidate key [http://foldoc.org/foldoc/
foldoc.cgi?candidate+key] selected as being most
important for identifying a body of information (an
entity, object or record [http://foldoc.org/foldoc/
foldoc.cgi?record] ).
Record (row) One or more structured sets of persistent data,
usually associated with software to update and
query [http://foldoc.org/foldoc/foldoc.cgi?query]
the data. A simple database might be a single
file containing many records [http://foldoc.org/
foldoc/foldoc.cgi?records] , each of which contains
the same set of fields [http://foldoc.org/foldoc/
foldoc.cgi?fields] where each field is a certain fixed
width.
SQL Originally SEQUEL [http://en.wikipedia.org/wiki/
SQL#History] and still pronounced that way by
many practitioners, SQL is the Standard Query
Language; a unified language for creating queries
that is accepted (with some variations) by all modern
relational databases.
Table A collection of records [http://foldoc.org/foldoc/
foldoc.cgi?records] in a relational database [http://
foldoc.org/foldoc/foldoc.cgi?relational+database] .

65

You might also like