Chapter 3 Building Physical Diagrams
Creating an object (or a SQLJ object) abstract data type
When you select the type OBJECT (or SQLJ OBJECT) for an abstract data type, an Attributes tab and a Procedures tab are added to the property sheet of the abstract data type:
- The Attributes page allows you to specify an object (or SQLJ object) with a number of attributes to which are assigned appropriate data types
- The Procedures page allows you to specify an object (or SQLJ object) with a number of procedures to which are assigned appropriate parameters
Procedure inheritance
An object abstract data type with a supertype can inherit non-final procedures. You can use the Inherit Procedure tool in the Procedures page of the abstract data type to select a non-final procedure from a parent abstract data type. Inheritance only applies to non-finale procedures.
Object example
For example, you want to create an Address object with Street, City, and ZipCode attributes, and a Location procedure.
To create an object (or a SQLJ object) abstract data type:
- Select Model→Abstract Data Types to display the List of Abstract Data Types.
- Click a new line in the list.
or
Click the Add a Row tool.
An arrow appears at the beginning of the line.
- Type an abstract data type name and code.
- Click Apply to commit the creation of the new abstract data type.
- Click the Properties tool.
or
Double-click the arrow at the beginning of the line.
The property sheet of the abstract data type opens to the General page.
- In the Type dropdown lisbox, select OBJECT (or SQLJ_OBJECT).
The Attributes and Procedures tabs appear in the property sheet of the abstract data type.
- Click the Attributes tab to display the Attributes page.
- Click a blank line in the list.
- Type an attribute Name and Code.
- Select a data type class from the Data Type dropdown listbox.
Display the column you need
If you do not see the column you need, display it with the Customize Columns and Filter tool.
- Repeat steps 8 to 10 for every object attribute you want to define for the abstract data type.
For each attribute, you can check the Mandatory (M) column.
- Click the Procedures tab to display the Procedures page.
- Click a blank line in the list.
- Type a procedure Name and Code.
For each procedure, you can check the Final (F), Static (S) and Abstract (A) columns.
- Click OK in each of the dialog boxes.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|