Dbintfc
Dbintfc
DOCUMENTATION
About this This document presents details of the treatments by PowerDesigner for many
document common databases.
Definition files
Much of the power and flexibility of PowerDesigner is derived from a
flexible and open architecture in which database specifics are applied when
the user selects the target RDBMS of the physical model.
PowerDesigner stores database syntax specifics in DEF (definition) files.
These files are a required component of PowerDesigner. They are used to
determine database specific capabilities and SQL syntax for all three areas it
supports: DDL script generation, trigger and procedure generation, and
reverse engineering.
Currently, PowerDesigner supports over 30 database brands, and several
versions of those brands, resulting in more than 75 DEF files. This includes
support for the majority of all production database systems.
Both the Conceptual Data Models (CDM) and Physical Data Models (PDM)
use the DEF files. PowerDesigner includes a DEF file for each database it
supports. DEF files reside in the \PWRS\PD6\DEF directory and they can be
customized to meet your specific needs.
2
Each DEF file is made up of the following sections, described below in
greater detail:
¨ Database characteristics
¨ Database command definition
¨ Data type translation tables
¨ Trigger parameters
¨ Trigger template definitions
Each section of the DEF file is composed of a series of fields with associated
values. These fields are parameters recognized by PowerDesigner. All of the
DEF files have the same structure, regardless of the target database. Certain
field values are customized depending on what the database supports. Values
for unsupported functionality will not appear in that database’s DEF field.
3
Every effort has been made to allow total control of the generation process
via the DEF file. However some functionality cannot be defined in the DEF
file. For example: The compute database size formula for the database
generation function is hard coded. Plus the specifications for triggers, stored
procedures, and views for the reverse engineering function are hard coded in
the application.
$ For more information on DEF files, see the Definition File Reference
Guide (DEFFILE.PDF) or the DEF FILE appendix in PowerDesigner User
Guides.
Database Filename
Microsoft Access 2.0 ACCESS20.DBC
Microsoft Access 95&97 ACCESS95.DBC
PARADOX 5 & 7 for Windows PDOXWIN5.DBC
Microsoft Visual FoxPro 3.0 VFOXPRO.DBC
Microsoft Visual FoxPro 5.0 VFOXPRO5.DBC
You can determine if the database is a NON SQL database by checking the
DEF file. If SQLSupport = NO then that database is a NON SQL database.
PowerDesigner automatically checks the ODBC Syntax option when it
creates a NON SQL database.
4
Generating a Script file
PowerDesigner will generate a script for ANSI SQL databases, such as
R:BASE, Teradata and UNIFY. A universal SQL interpreter can read the
scripts. PowerDesigner has the following two scenarios that it uses when it
generates the script file:
¨ NON SQL database script generation without the ‘ODBC syntax’ option
on will use the DEF file. For example, the output for a Microsoft Access
95 database is in BASIC.
Begin Table DIVISION
Name = Division
Begin Column
¨ NON SQL database script generation with the ‘ODBC syntax’ option on
will use the DBC file. For example, the output of a Microsoft Access 95
database is in ODBC format.
Create table DIVISION
(
DIVNUM Integer,
DIVNAME Text (30), …..
5
Database Generation
PowerDesigner will generate the database or the database creation script
from object definitions in the PDM (physical data model). Generation
parameters and options control the outcome of the generation process.
The availability of a generation parameter or option depends on the target
RDBMS. It is specified in the DEF file for the RDBMS. Parameters and
options that are not available for the target RDBMS are disabled in the
Parameters dialog box.
6
Generation Options
The generation parameters let you designate selected database objects for
generation. For example, the List parameter in the Tables group box lets you
select specific tables.
7
Object Option
Create Table Create physical database table and its columns.
Tables can be defined with either Names or Codes depending on
the Generation Option selected.
In specific database the primary key is autoindexed. In this case,
you cannot select the Primary Key Constraint option and the
Primary Index option at the same time.
Table Primary Not all databases support primary keys. The generation of a
Key primary key is RDBMS specific. User can either generate
primary key indexes or primary key constraints. PK
Constraint can be autoindexed to the primary key column.
In specific database the foreign key is auto indexed. In this case,
you can not select the Foreign Key Constraint option and the
Foreign Key Index option at the same time.
Table Foreign Not all databases support foreign keys. The generation of a
Key foreign key is RDMS specific. Users can either generate foreign
keys or foreign key constraints. The generation of foreign keys
and foreign key constraints is mutually exclusive.
Declarative If the RDBMS supports declarative integrity you can control the
integrity way it is generated by defining the type of generation in the
Generate Option dialog box. Select either Trigger or
Declarative Integrity.
Not all databases support declarative integrity. The generation of
declarative integrity is RBDMS specific. Each of the
available referential integrity actions may be specified
separately for updates and deletes of the foreign key.
Table Not all databases support alternate keys. The generation of an
Alternate Key alternate key is RBDMS specific. The alternate keys is used to
define unique constraints.
Table Check The generating of table check parameters and validation rules are
RDBMS specific. Check parameters and validate rules are
defined on the Table Properties dialog box.
Table Not all databases support the generation of physical options for a
Physical table. Example of physical option are: PCTFREE, PCTUSE,
Options MAXTRANS, TABLESPACE, etc.
Table Begin Inserts customized script before the table creation command.
Script This command is present for every database PowerDesigner
supports.
Table End Places customized script after the last command of the table
Script creation script. This command is present for every database
PowerDesigner supports.
Table Not all RDBMS support comments on tables. If the database
Comments does comments are enter in the Table Properties Label field.
8
Object Option
Drop table Not all databases support the drop table statement. If the
RDBMS supports and the table exists, drop table.
Indexes Not all RDBMS support the creation of indexes. Indexes
typically are used to improve the speed of data retrieval from
tables.
Primary Key Index built on the primary key column of the table. The
Index generation will define an index on all of the primary key columns
in the order in which they appear in the table. The generation of
primary key indexes depends on the check box in the index
definition.
Foreign Key Index built on the foreign key column of the table. The
Index generation of foreign key indexes depends on the check box in
the index definition.
Alternate Key Index built on the alternate key column of the table. You can
Index build a unique index on an alternate key. The generation of
alternate keys depends on the check box in the index definition.
Other Index Indexes built on non-key column of the table.
Index Generate physical options for the index.
Physical
Options
Drop Index If index exists, drop index.
Create Create physical database columns for a table.
Column Columns can be defined with either Name or Code depending on
the Generation Option selected.
Create Views Views are not supported by all RDBMS. Views can be based on
one or more tables. Based on your selection of tables,
columns, and references PowerDesigner generates a query in
SQL syntax.
The resulting query uses FROM statements for tables and
WHERE statements for reference column joins.
View Not all RDBMS support comments on views. Comments are
comments generated from labels entered on the View Properties sheet.
Drop View If view exists, drop the view before creating new view.
Column user Are user defined data type domains in the table definition.
defined type
Column Must be defined for the column on the Check Parameter List of
default value Value dialog box.
9
Object Option
Column Column check parameters and validation rules are RDBMS
Checks specific. They must be defined on the Check Parameter Standard
Parameter/ Validation Rule dialog box.
Comment Define as the labels on the Column Properties dialog box.
Reverse Engineering
PowerDesigner’s reverse engineering function generates a physical model
from an existing database. It uses either the DDL scripts or an ODBC
connection. Reverse engineering is the process of "reading" a database
catalog or database creation script to construct a PDM. Once your physical
model is created you can then convert it into a conceptual model.
If you are Reverse Engineering from several script files, it is recommended
that you combine them all into a single file before performing the reverse
engineering. One script makes it easier for PowerDesigner to interpret the
relationships between the tables it is creating the model for. When
PowerDesigner reverse engineers from a database creation script, it only uses
the data type section of the target DEF file. This process is the same for every
database that PowerDesigner reverse engineers.
10
Database scripts
With database scripts, you use an existing database script as the selection for
the reverse. When DataArchitect reverse engineers from a database creation
script, it uses the data types in the DEF file for the specified RDBMS
database.
11
ODBC has four basic components:
¨ Application
¨ ODBC Driver manager
¨ ODBC Driver
¨ Data source
ODBC driver The ODBC driver manager mediates the interactions between the
manager application and the driver. The primary purpose of the ODBC Driver
Manager is to load drivers that implement the ODBC function calls the
drivers themselves implement ODBC function calls and interacts with a data
source. The driver manager then calls the same function exported by the
driver. The only exception to this sequence occurs when the function is
handled directly by the driver manager.
Tasks performed by the driver manager include:
¨ Using the ODBC.INI file to map a data source name to the appropriate
DLL
¨ Processing the ODBC initialization call
¨ Providing parameter validation for ODBC function calls
Driver The driver interacts with the data source. It processes the ODBC function
calls and submits SQL requests to a specific data source and returns the
results to the application. If necessary, the driver also modifies the SQL
statements to conform to the syntax supported by the data source. It also
interacts with any software layers necessary to access the data source.
12
Tasks performed by the driver include:
¨ Establishing a connection to the data source
¨ Submitting requests to the data source
¨ Translating data to/from other formats as needed
¨ Formatting and returning error codes to the application
¨ Initiating transactions if required by the data source
Data source The data source is the data and any component of the RDBMS required to
access the data. It consists of the data the user wants to access and its
associated operating system, DBMS, and network platform (if any) used to
access the DBMS.
ODBC Conformance
To achieve the goal of interoperability the ODBC specification defined two
types of conformance:
Type Description
API conformance Categorizes function calls supported by the driver
SQL conformance Categorizes SQL grammar and data types supported
by the driver
13
Levels of SQL Conformance: There are three levels of SQL conformance:
¨ Minimum
¨ Core
¨ Extended
Every ODBC driver supplied by PowerDesigner conforms to the Level 1 API
conformance level and the Minimum SQL conformance level. In addition,
most of the extended functions in the API Level 2 and the Core SQL
grammar level are supported. Each driver supports the same set of
functionality.
Core compliance Core compliance allows the following tasks to be performed:
¨ Allocate and free environment, connection, and statement handles
¨ Connect to a data source
¨ Prepare and execute SQL statements
¨ Execute SQL statements
¨ Assign storage for parameters in SQL statements and result columns
¨ Retrieve data from a result set
¨ Commit or rollback transactions
¨ Retrieve error information
14
¨ Retrieve native form of an SQL statement
¨ Retrieve catalog information including privileges, keys, and procedures
¨ Call a translation DLL
Minimum SQL Minimum SQL conformance represents the smallest subset of the X/Open
conformance and SQL Access Group (SAG) specification usable by ODBC. This level of
conformance is defined for ISAM and flat file drivers. The following
functionality is required for minimum SQL conformance:
¨ Required data definition language statements
CREATE TABLE
DROP TABLE
¨ Required data manipulation language statements
SELECT
INSERT
UPDATE
DELETE
¨ Required expressions
Multiplication
Division
Addition
Subtraction
¨ Required data types
CHAR
VARCHAR
LONG VARCHAR
The following functionality is not required:
¨ ALTER TABLE
¨ CREATE VIEW
¨ DROP VIEW
¨ CREATE INDEX
¨ DROP INDEX
¨ Subqueries in SELECT statements
¨ Aggregate functions
15
To receive valid data types from reverse engineering a database, the DEF file
must contain a ‘Data types translation table from target ODBC data types to
database data types’ (OdbcPhysDataType). These sections must be present in
the DEF file because the ODBC driver contains ODBC data types that are
not DBMS specific data types.
The Btrieve driver is an example of a minimum SQL conformance driver.
This driver reverse engineers only the table codes and the column codes.
Core SQL The core SQL conformance represents the remainder of the X/Open and SAG
conformance SQL CAE specification. It is the most common subset of SQL implemented
by DBMS. The following functionality (in addition to that required for
minimum SQL conformance) is required for core SQL conformance:
Required data definition language statements:
¨ ALTER TABLE
¨ CREATE VIEW
¨ DROP VIEW
¨ CREATE INDEX
¨ DROP INDEX
Required data manipulation language functionality:
¨ Sub-queries
¨ Aggregate functions
Data control language statements:
¨ GRANT
¨ REVOKE
Required data types:
¨ DECIMAL
¨ NUMERIC
¨ SMALLINT
¨ INTEGER
¨ REAL
¨ FLOAT
16
With a Core SQL conformance driver, PowerDesigner will generate a more
Core SQL accurate translation of the database types. When you reverse engineer a
conformance
database tables, columns, data types, and indexes are brought back. The
impact
Access driver is an example of this level conformance.
Extended SQL Extended SQL conformance represents ODBC and vendor-specific
conformance extensions to SQL. The following list identifies the functionality required for
extended SQL conformance:
¨ SQL extensions unique to ODBC
¨ Advanced SQL features and data types specific to different vendors not
described in the SQL specification
¨ DATE data type based on the ISO SQL standard for DATE literals
¨ TIME data type based on the ISO SQL standard for TIME literals
¨ TIMESTAMP data type based on the ISO SQL standard for
TIMESTAMP literals
¨ Outer Joins based on a subset of the SQL92 specification for outer Joins
¨ Scalar functions
¨ Stored procedures
Additional PowerDesigner uses the standard ODBC functions to reverse engineer the
Information database via ODBC, except for the physical options, the index physical
options, and the unique constraints. These three elements are defined in the
DEF file.
17
The three values are in the DEF file and can be customized by the user. The
following three values are brought back for the database:
¨ SQLTableOptions, the physical options for the table
¨ SQLIndexOptions, the physical options for the index
¨ SQLAkeyIndex, the unique (alternate key) constraints
A specific SELECT statements is used to reverse engineer default values,
check parameters, triggers, stored procedures, views, tablespaces and storage
for the following databases: Oracle 7 & 8, Sybase 10 & 11, Adaptive Server
11.5, DB2 MVS, DB3 CS, Informix 7, Sybase SQL Anywhere, SQLBase,
and Watcom. PowerDesigner does not support these options in databases not
included in this list.
18
Supported SQL Commands
PowerDesigner supports the same level of elements as the selected database
does. If the database does not support a particular function PowerDesigner
can not support it.
19
SQL Commands Description
Create View Used to create a view which is made up of a subset of
columns from one or more tables. Views are an alternative
way of looking at the data in one or more tables. You
define a SQL query for each view.
Create Triggers Creates a trigger that is a special form of stored procedure
that goes into effect when you insert, delete, or update a
specified table or column. Use triggers to enforce
referential integrity.
Create Tablespace Creates tablespace to indicate the physical location of table
and index objects in the database. This refers to a partition
in a database. The definition of tablespace is RDBMS-
specific.
Create Storage Creates storage to reference the named partition that stores
tables and indexes. Storage refers to a partition on a
storage device.
Create Data Type Creates a Domain to define the set of values for which a
(domain) column is valid. Domains are associated with a Data type,
length and precision, Check parameters, Business rules,
Mandatory property, and Extended attributes.
20
Translating Conceptual Data Types
PowerDesigner supports both conceptual and physical data types.
A datatype conversion occurs when the conceptual data types are translated
into physical database types. If the conceptual datatype is not supported by
the RDBMS you selected for the physical data model, PowerDesigner uses
the following section of the DEF file for the conceptual to physical model
conversion: ‘Data types translation table from PowerDesigner’s internal data
types to target database’s data types’ (AmcDataType). You can modify an
existing data type or add in one of your own by using a text editor.
The following list defines the conceptual data types and their translation
assign by the DEF file.
A Integer data type can store a 32-bit integer numbers. Depending on the
RDBMS, short and long integers can be stored in the same way. Any
precision and length can be entered for this data type in the Standard Data
Types dialog box..
Short Integer (SI)
A Short Integer data type can store a 16-bit integer numbers. This data type
can be equal to the Integer data type if a Short Integer data type is not
supported in the targeted RDBMS.
Long Integer (LI)
A Long Integer data type can store 64-bit integer numbers. This data type can
be equal to the Integer data type if the targeted RDBMS does not support the
Long Integer data.
21
Number (N)
A Number data type can store numbers with a fixed decimal point. The
length is specified in the Length field and the precision in the Precision field
of the Standard Data Types dialog box.This data type can be equal to the
Decimal data type for certain RDBMSs.
Byte (BT)
A Byte data type can store at most 256 values. If the target RDBMS does not
support this data type, a translation to the Number data type with a length of
3 is done. Depending on RDBMS data type support, it can also be translated
to the Short Integer data type.
A length can also be entered for this datatype in the Standard Data Types
dialog box..
Decimal (DC)
A Decimal data type can store numbers with a fixed decimal point. A length
is specified in the Length field of the Standard Data Types dialog box, and a
precision given in the Precision field of the Standard Data Types dialog
box.This data type can be equal to the Number data type for certain
RDBMSs.
Float (F)
A Float data type can store 32 bit floating decimal point numbers. If you
enter a length for this data type it defines the storage of the Float data type in
the RDBMS.
Short Float (SF)
A Short Float data type can store floating decimal point numbers of less than
32 bits. This data type can be equal to the Float data type if there is no Short
Float.
Long Float (LF)
A Long Float data type can store a 64 bit floating decimal point numbers
(double precision for 15 or 16 digits, depending on the RDBMS). This data
type can be equal to the Float data type if there is no Long Float in the
targeted RDBMS.
22
Money (MN)
A Money data type has its length and the precision specified in the Length
and Precision fields of the Standard Data Types dialog box.The translated
representation of money depends upon the target RDBMS. If the target
RDBMS does not support the money data type, a translation to the Number
data type is performed for the PDM generation.The default length is 8 and
the default precision is 2.
Serial (NO)
A Serial data type can store serial numbers that are incremented
automatically.The length is specified in the Length field of the Standard Data
Types dialog box and has a default value of 6. If the target RDBMS does not
support this data type, a translation to the Number data type is performed for
the PDM generation.
Boolean (BL)
A Character data type can store character strings with a fixed length specified
in the Length field of the Standard Data Types dialog box.
Variable Characters (VA)
A Variable Characters data type can store character strings with a variable
length that does not surpass the specified value in the Length field of the
Standard Data Types dialog box. The variable length allows you to ignore
certain characters such as spaces at the end of a string. This data type can be
equal to the Characters data type with a length of 255 bytes for certain
RDBMSs.
23
Long Characters (LA)
A Long Character data type can store character strings longer than 255 bytes
with a fixed length specified in the length field.This data type is target DBMS
specific.If the target DBMS does not support this data type, a translation to
the Variable Characters data type is performed for the PDM generation. For
this datatype it’s possible to enter a length.
Long Var Characters (LVA)
A Long Var Character data type can store character strings longer than 255
bytes with a variable length in the length field. The variable length allows
you to ignore certain characters such as spaces at the end of a string. This
data type is target RDBMS specific. If the target DBMS does not support this
data type, a translation to the Long Characters data type is performed for the
PDM generation. For this datatype it’s possible to enter a length in the
Standard Data Types dialog box..
Text (TXT)
A Text data type can store character strings of variable length and longer than
255 characters. It is target RDBMS specific. If the target RDBMS does not
support this data type, a translation to the Long Characters data type is
performed for the PDM generation.
Multibyte (MBT)
A Multibyte data type can store multibyte character strings with a fixed
length specified in the Length field of the Standard Data Types dialog
box.This datatype can be equal to the National character if the target
RDBMS.If the database does not support multibyte, a translation to the
Characters data type is performed for the PDM generation.
Variable Multibyte (VMBT)
A variable multibyte data type can store multibyte character strings with a
variable length that does not surpass the specified value in the Length field of
the Standard Data Types dialog box. This datatype can be equal to the
National variable character if the target database supports it. If the database
does not support VMBT, a translation to the Variable Characters data type is
performed for the PDM generation.
24
Time data types
No length or precision can be entered for these datatypes.
Date (D)
A Date data type can store date with the day, month and year format. The
Date data type is translated into the target DBMS’s date format for the PDM
generation. If the target RDBMS does not support Date, it will be translated
into a character string with a length of 8.
Time (T)
A Time data type can store time with the hour, minutes and seconds format.
The representation format equals the format of the target RDBMS. If the
target RDBMS does not support this data type, a translation to the Date data
type is performed for the PDM generation.
Date & Time (DT)
A Date & Time data type is represented in date and time format and the
format is RDBMS specific. If the target RDBMS does not support this data
type, a translation to the Date data type is performed for the PDM generation.
Timestamp (TS)
A Timestamp data type represents the system date and time and the is
RDBMS specific. If the target RDBMS does not support this data type, a
translation to the Date data type is performed for the PDM generation.
A Binary data type can store binary strings with a length specified in the
Length field of the Standard Data Types dialog box. This is different from
the character data type which can be “converted”. The binary data type
results in information that cannot be converted to another data type. If the
target RDBMS does not support this data type, a translation to the Text data
type is performed for the PDM genreation.
25
Long Binary (LBIN)
A Long Binary data type can store binary strings of fixed length and is target
RDBMS specific.If the target RDBMS does not support this data type, a
translation to the Binary data type is performed for the PDM genreation.
Image (PIC)
A Image data type can store images. If the target DBMS does not support this
data type, a translation to the Long Binary data type is performed for the
PDM generation.
Bitmap (BMP)
A Bitmap data type can store images in the bitmap format (.bmp).If the target
DBMS does not support this data type, a translation to the Long Binary data
type is performed for the PDM generation.
OLE (OLE)
A OLE data type can store data concerning OLE links. If the target RDBMS
does not support this data type, a translation to the Long Binary data type is
performed for the PDM generation.
Other (*)
26
DB2 Connection using ODBC-32 bit
Overview
PowerDesigner supports the DB2/MVS and DB2 Common Server version
2.x databases. In order to establish a connection to a DB2 database you must
use an ODBC driver. You can use either the authenticated ODBC driver
provided with PowerDesigner or the proprietary driver supplied by IBM. We
recommend using the ODBC driver provided by IBM. The IBM driver –
Client Application Enabler for Windows 95 or Windows NT, will produce
the best results when you generate or reverse engine a DB2 database.
Install the IBM Database Client Application Enabler software (CAE) and
establish the appropriate ODBC link with the CLI-ODBC Administrator
program. The CAE software allows you to connect to and interact with
remote DB2 databases. The CAE Client Setup walks users through the
following:
¨ Catalog the Node (server)
¨ Catalog the Database
¨ Define an ODBC connect for the database via CLI/ODBC Administrator
Catalog Node
You must catalog each node (server) that has a database on it before you can
connect to it. Cataloging allows the client software to know the DB2 instance
on other servers.
Catalog Database
You must catalog each database that you want to connect to. Cataloging a
database defines what the database is called for the Client; it also defines
what the database is really called on the server and where it is located.
27
CLI-ODBC Administrator
Use the DB2 CLI-ODBC Administrator from the DB2 program group to add
a DB2 database as an ODBC data source. This typically is done by the
System Administrator or DBA.
To register a DB2 database as an ODBC data source, select a database form
the Catalog Database list and mark it as an ODBC Data Source. The
configuring of a database as an ODBC source makes an entry in the Registry
– HKEY_CURRENT_USER\Software\ODBC\ODBC.INI.
Binding
The CAE application that will access a DB2 database has a set of bind files
(.bnd) that must be bound to the system before you can use CAE. These files
must be bound once for each DB2 installation before you can connect using
PowerDesigner. Check with your DBA or System Administrator. They can
tell you if the bind has already been done. Binding is usually done by the
DBA or someone with SYSADM or DBADM authority.
$ For additional information related to ODBC usage reference the IBM s
“Installing and Using the DB2 Clients” manual.
28
DB2 MVS database generation
PowerDesigner supports the following for a DB2 MVS database generation:
Create Table ü ü
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
Null columns ü ü
Declarative integrity ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes 1 ü ü
View ü ü
Tablespace ü ü
Storage ü ü
Stored Procedures — —
Triggers — —
Users ü ü
29
PDM Objects Generates via script Generates via ODBC
Index type ü ü
Generation 1 DB2 only allows one "clustered" index on a table so you will see only
conditions footnote one "clustered" index in your list of indexes. Normally you can specify
cluster for multiple indexes on the same table in the Other Options
window.
DB2 MVS can be implemented for uppercase characters only. To
generate uppercase DDL script select the Uppercase option in the
Database Generation Options dialog box.
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
Null columns ü ü
Declarative integrity ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace ü ü
30
Create database Reverse Engineer Reverse Engineer
via script via ODBC
Storage ü ü
Stored Procedures — —
Triggers — —
Users ü ü
Index Type ü ü
Create Table ü ü
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
Null columns ü ü
Declarative integrity ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
31
PDM Objects Generates via script Generates via ODBC
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace ü ü
Storage — —
Stored Procedures ü ü
Triggers ü ü
Users ü ü
Function — —
Primary key physical options — —
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
Null columns ü ü
Declarative integrity ü ü
Checks ü ü
32
PDM Objects Reverse Engineer via Reverse Engineer via
script ODBC
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace ü ü
Storage — —
Stored Procedures ü ü
Triggers ü ü
Users ü ü
33
Informix 5 and 7 Connection using ODBC-32 bit
PowerDesigner uses ODBC to establish a connection with the Informix
database. PowerDesigner provides three authenticated ODBC drivers to
support Informix: 5.x, 6.x, or 7.x in the Windows 95 or Windows NT
environment.
Requirements
¨ For Informix 7, the ODBC driver is PD Informix-Connect and has a file
name of PDINF11.DLL. This driver has a version number of 3.x.
Informix Connect requires that the Informix-CLI Version 2.5 be installed
¨ For Informix 7, the ODBC driver is PD Informix 7 and has a file name
of PDINF709.DLL. This driver has a version number of 2.12.0000.
Informix 7 requires the following be installed: Informix Net 7.1 and
Informix host name or IP Address, socket number for Services file
¨ For Informix 5, the ODBC driver is PD Informix 5 and has a file name
of PDINF509.DLL. This driver has a version number of 2.12.0000.
Informix 5 requires that Informix Net 5.01 be installed. Informix host
name or IP Address, socket number for Services file and Informix Net
5.01
¨ The message file RDS.IEM and SQL.IEM must be located in the
INFORMIX subdirectory MSG
¨ The environment variable INFORMIXDIR must be set to the directory
where you have installed the INFORMIX client. For example; SET
INFORMIXDIR = c:\INFORMIX
34
Verify the client software: Typically Informix Net 7 will install Ilogin and
SetNet under the Informix program group.
35
v To configure an ODBC data source:
1 Start the ODBC Administrator.
36
Configuring the Informix ODBC Data Source
To define a ODBC data source required to select the appropriate ODBC
driver that the supports your database version. The dialog box that appears is
specific to Informix-Connect you will see the following dialog box. Under
the General tab, you will need to supply values for the Data Source Name,
database Name, and several Connection and Advanced connection
parameters.
Field Description
Data Source Name Used to identify the data source in a list of data sources. This
name is unique to the client machine. This does not identify
the server to connect to. That is determined by other
parameters
Description An optional field that allows a user to describe the use or
purpose of this particular data source
Database Name The name of the database on the Informix server that will be
the default database for any connection made through this
data source
37
4 Select the Connection tab, and configure the detailed database
connection parameters:
Field Description
Database List This is an optional parameter. If you do not supply a database
name, you may supply several names in this list, separated by
commas. This list will be a drop-down list box where you choose
a database from the list at connection time. If you supplied a
database name in the previous screen, it will override the list
Default User This is an optional field that may contain the user name to use by
Name default. It will appear in the user field at connection time
Host Name The machine that the Informix server is running on. This should
be the actual computer name
Service Name The service entry in the service file that identifies the TCP port
number being used by the Informix server. This represents the
Informix instance to connect to on the host machine
Server Name The name of the server in the SQL Hosts file. This is the server
alias that identifies the Informix server
Protocol Type The protocol for connecting to the Informix Server. For Informix
On Line servers using TCP/IP, it would be onsoctcp. For standard
engine, it would be sesoctcp
Use Default This checkbox, if selected, will have the default login from the
Login Informix registry (Configured in the Informix-CLI SetNet utility)
used for the connection
38
Configuring an INFORMIX CLI-2.5, PD Informix 7, or PD Informix 5
ODBC Data Source
Select the appropriate INFORMIX-CLI 2.5, PD Informix 7, PD Informix 5
driver. The following dialog box will appear where you need to supply values
for the Data Source Name, Database Name, and several Connection and
Advanced connection parameters.
The setup for all three of these ODBC drivers will be identical.
Field Description
Data Source A user-supplied name used to identify the data source in a list of
Name data sources. This name is unique to the client machine. This does
not identify the server to connect to. That is determined by other
parameters
Description An optional field that allows a user to describe in better detail the
use or purpose of this particular data source
Database The name of the database on the Informix server that will be the
Name default database for any connection made through this data source
39
Configuring detailed database connection parameters
Select the Advanced button, and configure the detailed database connection
parameters:
Field Description
Database List This is an optional parameter. If you do not supply a database
name, you may supply several names in this list, separated by
commas. This list will be a drop-down list box where you choose
a database from the list at connection time. If you supplied a
database name in the previous screen, it will override the list
Default User This is an optional field that may contain the user name to use by
Name default. It will appear in the user field at connection time
Host Name The machine that the Informix server is running on. This should
be the actual computer name
Service Name The service entry in the services file that identifies the TCP port
number being used by the Informix server. This represents the
Informix instance to connect to on the host machine
Protocol Type The protocol for connecting to the Informix Server. For Informix
OnLine servers using TCP/IP, it would be onsoctcp. For standard
engine, it would be sesoctcp
40
The following parameters may be left as their default values, as shown in the
screen shot above.
Yield Proc
Cursor Behavior
Enable Scrollable Cursors
Get DB List From Informix
$ For details on what these parameters are please consult the on-line help
by pressing the Help button.
41
Informix 7 Database Generation
PowerDesigner generates the following for an Informix database:
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
Declarative integrity ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Cluster indexes ü ü
View 1 ü ü
Tablespace — —
Storage — —
Stored Procedures ü ü
Triggers ü ü
Functions ü ü
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
Declarative integrity ü ü
Null columns ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace — —
Storage — —
Stored Procedures ü ü
Triggers ü ü
Function ü ü
Users ü ü
43
Microsoft Access 95 & Access 97 Connection-32
bit
Overview
Because Microsoft Access is a NON-SQL database you must be aware of
certain conditions when forward and reverse engineering this database.
Forward Engineering with PowerDesigner has the following considerations:
¨ DDL Script generated with the ‘ODBC syntax’ option off will use the
DEF file. This produces a script that will be in SQL format. The results
of this type of generation do not produce optimum results from
PowerDesigner
¨ DDL Script generation with the ‘ODBC syntax’ option on will use the
DBC file. The output of this generation will be in BASIC
¨ Script files are produced in 64 K bytes increments. Larger model might
produce more than more script file and these file will have a .Dot
extension
The following diagram shows the basic software components required for
Microsoft Access database access in PowerDesigner.
44
Reverse Engineering via ODBC
This does not product the capture as many database object as it does when
you perform the reverse engineering using the script file provided by
PowerDesigner.
45
4 This will select the ODBCJT32.DLL file in the Windows 95 System or
the Windows NT System32 directory.
5 Specify the values for the data source as follows:
Field Description
Data Source Name The string identifying the data source name
Description An optional long description of the data source name
All other settings are optional or left as defaults, for information check the
driver’s Help file.
46
Microsoft Access Database
PowerDesigner generates the following for a Microsoft Access database:
Create Column ü ü
Primary Key — —
Foreign Key — —
Alternate key ü ü
Declarative integrity ü —
NOTNULL columns 3,4 ü ü
Checks ü ü
Minimum value ü —
Maximum value ü —
Default value ü —
Validation rule on columns ü —
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü —
View ü ü
Tablespace — —
Storage — —
Stored Procedures — —
Triggers — —
Function — —
Users — —
47
2 Microsoft Access does not support the Drop Table option when
generating a database because it does not support “if exists() then”
statements. This limitation results in no way to test if a table already
exists in the Microsoft Access database. To work around this limitation a
user must first use the Archive database command then the Modify
database command when adding new tables to an existing database.
3 PowerDesigner support the definition of mandatory and non-mandatory
fields. However it does not currently support the definition of “Allow
Zero Length” fields for MS Access.
4 The Microsoft Access ODBC driver does not support the NULL or NOT
NULL constraint. If you want to obtain the mandatory option on a
column you should use the database script generation.
48
PDM object Reverse Engineer Reverse Engineer
via script via ODBC
Primary indexes 1 ü ü
Cluster indexes 1 ü —
View 1 ü —
Tablespace — —
Storage — —
Stored Procedures — —
Triggers — —
Users — —
Reverse 1 PowerDesigner supplies a script file that should be used when you are
Engineering Reverse Engineering an MS Access database. There are several versions
conditions footnote of the ACCREV. BAS files in the PD6\tools directory.
Use the appropriate ACCREVxx. BAS file to Reverse Engineer your
Microsoft Access database to obtain comments, business rules,
minimum, maximum and default values.
49
Microsoft SQL Server Connection using
ODBC-32 bit
Overview
PowerDesigner uses ODBC to establish a connection with the Microsoft SQL
Server database.
PowerDesigner If you are working with PowerDesigner MetaWorks version 6 or earlier, you
Version 6 or earlier should install both the Microsoft SQL Server proprietary ODBC driver and
the authenticated Microsoft SQL Server ODBC driver provided by
PowerDesigner. For optimum results when working with the PowerDesigner
MetaWorks repository the Microsoft SQL Server ODBC driver is required to
consolidate models into the MetaWorks repository and the PowerDesigner
ODBC is required to extract models from the MetaWorks repository. The
PowerDesigner ODBC driver for Microsoft SQL Server has a file name of
PDSS611.DLL and a version number of 3.x.
PowerDesigner If you are working with PowerDesigner MetaWorks version 6.1, you need
Version 6.1 only to install the Microsoft SQL Server ODBC driver. This driver will both
consolidate and extract models from the MetaWorks repository.
Requirements
In order to establish a connection between PowerDesigner and Microsoft
SQL Server databases you must have the Microsoft SQL Server DB-Library
and Net-Library version installed on your system. You will need to connect
your Microsoft SQL Server vendor to obtain the appropriate DB-Library and
Net-Library software for your environment.
DB-Library The DB-Library needs the NTWDBLIB.DLL in the Windows 95 System or
Windows NT directory. The path of DB-Library must be defined in the
PATH variable. You also need the following variables defined in your
environment: ISLVINI, LIBPATH, and VCSID.
Net-Library The version of Net-Library required depends on the network protocol you are
using to connect to the SQL Server. Named Pipes requires
DBNMPNTW.DLL
TCP/IP requires DBMSSOCN.DLL
50
You must have a copy of NTWDBLIB.DLL on your path or in the Windows
95 SYSTEM or Windows NT SYSTEM32 directory, a error message
appears.
The following diagram shows the basic software components required to
access a Microsoft SQL Server database.
51
3 Select the Microsoft SQL Server driver of your choice and click OK.
52
Field Description
Data Source The string identifying this SQL Server data source configuration
Name in the system information
Description An optional long description of the data source name
Server Name The name of the server that contains the SQL Server tables you
want to access
Database The name of the database to which you want to connect by default.
Name If you do not supply a specific value, the connection will be made
to a default database defined by SQL Server
All other settings are optional or left as defaults, for more information check
the driver’s HELP file.
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity 1 ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Alternate key ü ü
Unique indexes ü ü
53
PDM object Generates via script Generates via ODBC
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace — —
Storage ü ü
Stored Procedures ü ü
Function — —
Triggers ü ü
Identity ü ü
Reverse Engineering
PowerDesigner Reverse Engineering a Microsoft SQL Server database:
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
54
PDM object Reverse Engineer Reverse Engineer via
via script ODBC
User defined data type ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Alternate key ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace — —
Storage ü ü
Stored Procedures ü ü
Function — —
Triggers ü ü
User ü ü
Identity ü ü
55
Oracle 8 Connection using ODBC-32 bit
Overview
PowerDesigner uses ODBC to establish a connection with the Oracle
database. An authenticated Oracle ODBC driver is provided by
PowerDesigner. It has a file name of PDOR711.DLL and a version number
of 3.x.
Requirements
Before you can attempt to connect to an Oracle database you must have the
Oracle Networking Products installed in your environment. The following
elements are required:
¨ SQL *Net 2.3 client installation provides the following files, which are
needed by the ODBC driver: ORA73.DLL, CORE35.DLL,
NLSRTL32.DLL, CORE350.DLL, and OCIW32.DLL. If you attempt to
configure an Oracle 7 data source and do not have these DLLs on your
path or in the appropriate system directory you will receive error
messages
¨ An Oracle server name entry in the tnsnames.ora file
56
Accessing an Oracle database
The following diagram shows the basic software components required to
access an ORACLE7 database from PowerDesigner.
57
3 Select the Oracle driver of your choice and click OK.
4 The PowerDesigner ODBC Driver has a file name of PDOR711.DLL.
5 If you are configuring an existing data source, select the data source
name and click FINISH. The setup dialog box appears.
58
6 Specify the values for the data source as follows:
Field Description
Data Source The string identifying this Oracle data source
Name configuration in the ODBC.INI section of your registry
Description This is an optional long description of the data source
name
Server Name The SQL*NET connection string designating the server
and the database to be accessed. This information
depends on the version of SQL*NET driver you are
using. The server name specified here must match the
entry in your tnsname.ora file. This file is the SQL*NET
Configuration file generated by the SQL*Net Easy
Configuration. The tnsnames.ora file typically resides in
the c:\orawin95\network\admin\ directory
59
The following values are optional:
Value Description
Server List The list of SQL*NET connection strings that will appear
in the logon dialog box. This string needs to be separated
with commas. You must enclose the SQL*Net
connection string in quotation marks if it contains a
comma
Default User The default user name used to connect to your Oracle
Name database. This field is required if security is enabled on
your database
Lock Time Out Acceptable values are 0 or -1 they specify whether or not
Oracle should wait for a lock to be freed before raising
an error when processing a Select…For Update
statement. Possible values are -1 (wait forever) or 0
(don’t wait). The default is -1
Array Size The number of bytes the driver uses for fetching multiple
rows. Valid values are between 0 and 65536; the default
is 60000
Catalog Select this box to retrieve the contents of the
Comments COMMENTS columns for the catalog function.
Retrieving the COMMENTS columns will slow
performance of your data catalog operations
Translate Select to perform a translation of your data from one
character set to another. When the Select Translator
dialog box appears you can select the translator to
perform the translation. The translators listed in the
dialog box are those listed in the ODBC Translator
section of your odbcinst.ini file
60
Oracle 8 Database
PowerDesigner generates the following for an Oracle 8 database:
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity 1 ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace ü ü
Storage ü ü
Stored Procedures ü ü
Function ü ü
Triggers ü ü
User ü ü
61
Generation 1 Oracle does not support Referential Integrity defined as an Update
conditions footnote 'Cascade'. In Oracle this must be defined as a trigger. If you selected
Cascade for the Update constraint on the referential integrity and then
run Check Model you will obtain the following error:
“To solve the conflict between foreign key and triggers, only triggers
will be generated for reference ...”. Oracle does not support Cascade for
the declarative definition (the declarative definition means the definition
of the FK), so the trigger will always generate the Cascade
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Validation rule on ü ü
columns
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes — —
62
PDM object Reverse Engineer via Reverse Engineer via
script ODBC
View ü ü
Tablespace ü ü
Storage ü ü
Stored Procedures 1 ü ü
Function ü ü
Triggers ü ü
Reverse 1 Oracle database that uses the Package Body and Package Specification
Engineering features, PowerDesigner will reverse engineer the packages and the
conditions footnote bodies both as Stored Procedures, and give them the same Stored
Procedure name.
63
Sybase SQL Anywhere 5.x Connection using
ODBC-32 bit
Overview
PowerDesigner uses ODBC to connect to a Sybase SQL Anywhere database.
PowerDesigner provides an authenticated ODBC driver to support Sybase
SQL Anywhere 5.x. It has a file name of WOD50T.DLL.
Requirements
The client and server software can be obtained from the following Sybase
tools:
¨ PowerBuilder includes a Sybase SQL Anywhere standalone database
engine
¨ PowerDesigner AppModeler module includes a Sybase SQL Anywhere
engine and Net Impact Dynamo
¨ PowerDesigner MetaWorks provides an authenticated Sybase SQL
Anywhere server (used for the data dictionary) plus client
64
The following diagram shows the basic software components needed to
connect to a Sybase SQL Anywhere database.
65
3 Selected the Sybase SQL Anywhere driver from the list and click Finish.
66
Field Description
Data Source String identifying this Sybase SQL Anywhere data source
Name
Description This is an optional long description of the data source
User ID Optional name to be used when connecting. If the user ID is
omitted, most applications prompt you for a user ID and
password when connecting to the data source
Password Optional password the supplied User ID. Since the password
supplied is stored in ODBC.INI, setting the password here
may be a security risk. If the password is omitted, most
applications prompt you to enter your password when
connecting to the data source
Server Name The name of a SQL Anywhere database engine or server. If
not specified, the default engine is used. This field
corresponds to the EngineName connection parameter
Database Name Corresponds to the name of a database already running on a
SQL Anywhere database engine or SQL Anywhere network
server. This field corresponds to the DatabaseName
connection parameter
Database Startup The command used to run the database software when the
named database engine or server is not already executing.
You can select Local or Network, as appropriate, if the
default settings are satisfactory. Otherwise, select Custom
and enter the command including any command line
parameters by pressing the Options button
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
NOTNULL columns ü ü
67
PDM object Generates via script Generates via ODBC
Null columns ü ü
Declarative integrity 7 ü ü
Checks 6 ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Alternate key ü ü
Unique indexes 1, 2, 3, 5 ü ü
Primary indexes 1, 2, 3, 5 ü ü
Cluster indexes 1, 2, 3, 5 ü ü
View 4 ü ü
Tablespace ü ü
Storage — —
Stored Procedures ü ü
Function ü ü
Triggers ü ü
Generation 1 SQL Anywhere automatically creates indexes for primary keys and for
conditions unique constraints. These automatically-created indexes are held in the
footnotes same database file as the table.
2 You can place the index in a separate database file by specifying a
dbspace name in which to put the index. This feature is of use mainly for
large databases, to circumvent the limit of 2 GB per table.
3 Index ownership - There is no way of specifying the index owner in the
CREATE INDEX statement. Indexes are automatically owned by the
owner of the table on which they are defined. The index name must be
unique for each owner.
68
4 Indexes cannot be created for views.
5 The name of each index must be unique for a given table. For databases
created previous to release 5.5.01, the condition was more restrictive:
that each index name must be unique for a given user ID.
6 You can attach CHECK conditions to user-defined data types, and
columns defined on those data types inherit the CHECK conditions. A
CHECK condition explicitly specified for the column overrides that from
the user-defined data type.
7 Referential integrity actions are implemented using system triggers. The
trigger is defined on the primary table, and is executed using the
permissions of the owner of the primary table.
Transact SQL Use the Sybase Compatible Transact SQL target database to generate or
reverse transact SQL.
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Alternate key ü ü
Unique indexes ü ü
Primary indexes ü ü
69
PDM object Reverse Engineer Reverse Engineer
via script via ODBC
Cluster indexes ü ü
View ü ü
Tablespace ü ü
Storage — —
Stored Procedures ü ü
Function ü ü
Triggers ü ü
Use the Sybase Compatible transact SQL target database to reverse engineer
Transact SQL.
70
Sybase SQL Server System 10 and System 11
ODBC Connection-32 bit
Overview
PowerDesigner uses ODBC to establish a connection with the Sybase SQL
Server database. The Sybase ODBC driver provided by PowerDesigner 6 has
a file name of PDSYB11.DLL and a version number of 3.x. The Sybase
ODBC driver provided by PowerDesigner is produced by Intersolv, Inc..
Requirements
But before the to connect to Sybase from PowerDesigner you must have the
Sybase Open Client Library and the appropriate Sybase Net-Library installed
on your system. These programs must be installed before you can gain access
to the Sybase server. Check that the following primary files are present:
Libcs.DLL, Libcomm.DLL, and Libintl.DLL.
¨ Platform of Open/Client 32 bit 10.0.3 version or higher
¨ Set the environment variable SYBASE to the directory where you have
installed the Client. For example, SET SYBASE = C:\SQL10 or SET
SYBASE = C:\SQL11
¨ Server Name, Database Name, Network library driver (DLL), server’s
port number, Node, or, socket number
¨ Set the Connection Service Entry in SQL Edit per the Net-library driver.
For example: query = nlwnsck, Server Name, port number OR go into
the Interfaces driver with DS Edit and modify the attributes
71
The following diagram shows the basic software components required to
access a Sybase SQL Server System 10 or System 11 database in
PowerDesigner.
72
3 Select the Sybase driver and click OK.
Field Description
Data Source The string identifying this Sybase data source
Name configuration in the ODBC.INI file
Description An optional long description of the data source name
Server Name The name of the server that contains the System 10 or
System 11 tables you want to access. If you do not
specify a server name, the server name in the
DSQUERY environment variable is used. The name
defined here must match the entry in your SQL.INI file
Database Name The name of the database to which you want to connect
by default. If you do not supply a specific value, the
connection will be made to a default database set by the
DBA
73
All other settings are optional or left as defaults, for more information
check the driver’s HELP file.
74
Sybase SQL Server 11 database
Create Column ü ü
Foreign Key 3 ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity 4 ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Alternate key ü ü
SP Primary Key 1, 2 ü ü
SP Foreign Key 3 ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace — —
Storage ü ü
75
PDM object Generates via Generates via
script ODBC
Stored Procedures ü ü
Function — —
Triggers ü ü
User ü ü
Identity ü ü
Generation 1 The PowerDesigner Sybase DEF file controls whether the generation
conditions will build primary key and foreign key constraints or use sp_primarykey
footnotes or sp_foreighkey to identify keys, leaving the unique restriction and
referential integrity up to indexes and triggers. To generate both Primary
Keys and Primary Key Index at the same time the PKAutoIndex variable
must be changed in the DEF file.
cd#Primary key is auto-indexed. YES/NO
PKAutoIndex = NO
2 Modify the DEF file to change primary key generation for Constraints to
sp_primarykey. Find the UseSpPrimKey variable and change its value to
YES
# Use the sp_primarykey command to generate primary key
UseSpPrimKey = YES
4 It's possible to create an entirely optional relation which does not create
any update/insert/delete triggers – it just use the relation for reads.
76
Reverse Engineering a Sybase SQL Server 11 database
PowerDesigner Reverse Engineers the following for a Sybase SQL Server 11
database:
Create Column ü ü
Primary Key ü ü
Foreign Key ü ü
Alternate key ü ü
SP Primary Key ü ü
SP Foreign Key ü ü
NOTNULL columns ü ü
Null columns ü ü
Declarative integrity ü ü
Checks ü ü
Minimum value ü ü
Maximum value ü ü
Default value ü ü
Unique indexes ü ü
Primary indexes ü ü
Cluster indexes ü ü
View ü ü
Tablespace — —
Storage ü ü
Stored Procedures ü ü
Function — —
77
PDM object Reverse Engineer Reverse Engineer
via script via ODBC
Triggers ü ü
User ü ü
Identity ü ü
78