Chapter 3 Building Physical Diagrams


Abstract Data Types (PDM)

An abstract data type (ADT) is a user-defined data type which can encapsulate a range of data values and functions. The functions can be both defined on, and operate on the set of values.

Abstract data types can be used in the following ways in a Physical diagram:

Abstract data type is
Description
Created You can create an abstract data type of any kind supported by your DBMS.

If you create an abstract data type of type JAVA, you can link it to a Java class in an OOM to access the Java class properties (see Linking an abstract data type to a Java class).
Reverse engineered An abstract data type in a database can be reverse engineered into a PDM.

If you also reverse engineer the JAVA classes into an OOM, then the abstract data types of the type JAVA in the PDM are automatically linked to the Java classes in the OOM (see Reverse-engineering a PDM linked to an OOM)

For more information on reverse engineering a database into a PDM, see chapter Reverse Engineering.

For more information on creating and reverse engineering Java classes into a PowerDesigner Object-Oriented Model, see the Object-Oriented Model User's Guide .

Depending on the current DBMS, the following kinds of abstract data types can be created in PowerDesigner:

Type Description Example
Array Fixed length collection of elements VARRAY (Oracle 8 and higher)
List Unfixed length collection of objects TABLE (Oracle 8 and higher)
Java Java class JAVA (Adaptive Server Anywhere, and Adaptive Server Enterprise)
Object Contains a list of attributes and a list of procedures OBJECT (Oracle 8 and higher)
SQLJ Object Contains a list of attributes and a list of procedures SQLJ OBJECT (Oracle 9i and higher)
Structured Contains a list of attributes NAMED ROW TYPE (Informix 9.x, and IBM DB2 5.2)

Example

An abstract data type for the Gregorian calendar which has functions defined to do the following:

 


Copyright (C) 2007. Sybase Inc. All rights reserved.